Permalink
Browse files

[ update ] rx, CONFIG_USE_UART

  • Loading branch information...
1 parent 8fee289 commit fb9b4462ab2010d81420a8628ae1b2637a4f8bee @texane committed Nov 24, 2012
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/atmega328p/audio/rx/main.c
@@ -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
@@ -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();
@@ -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();

0 comments on commit fb9b446

Please sign in to comment.