Skip to content

Commit

Permalink
[ update ] rx, CONFIG_USE_UART
Browse files Browse the repository at this point in the history
  • Loading branch information
texane committed Nov 24, 2012
1 parent 8fee289 commit fb9b446
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/atmega328p/audio/rx/main.c
Expand Up @@ -3,10 +3,15 @@
#include <avr/interrupt.h>
#include "../../common/spi.c"
#include "../../common/nrf24l01p.c"
#include "../../common/uart.c"
#include "dac7554.c"


#define CONFIG_USE_UART 0
#if (CONFIG_USE_UART == 1)
#include "../../common/uart.c"
#endif


/* sample type */
/* must match with tx definition */
#define CONFIG_SIZEOF_SAMPLE 2
Expand Down Expand Up @@ -150,7 +155,9 @@ int main(void)
spi_setup_master();
spi_set_sck_freq(SPI_SCK_FREQ_FOSC2);

#if (CONFIG_USE_UART == 1)
uart_setup();
#endif

nrf24l01p_setup();

Expand Down Expand Up @@ -204,10 +211,12 @@ int main(void)
/* enable interrupts */
sei();

#if (CONFIG_USE_UART == 1)
uart_write((uint8_t*)"rx side\r\n", 9);
uart_write((uint8_t*)"press space\r\n", 13);
uart_read_uint8();
uart_write((uint8_t*)"starting\r\n", 10);
#endif

nrf24l01p_standby_to_rx();

Expand Down

0 comments on commit fb9b446

Please sign in to comment.