X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/fnordlicht-mini/blobdiff_plain/e06282dce0420369b589ec793c567a8a2cc48603..debcd33150933b420a307d73cccb77c5b66c0afb:/firmware/fnordlicht-firmware/remote.c diff --git a/firmware/fnordlicht-firmware/remote.c b/firmware/fnordlicht-firmware/remote.c index fcaf672..016a866 100644 --- a/firmware/fnordlicht-firmware/remote.c +++ b/firmware/fnordlicht-firmware/remote.c @@ -45,12 +45,6 @@ #define R_PIN _INPORT(REMOTE_INT_PORT) #define INTPIN REMOTE_INT_PIN -#define M_PORT _OUTPORT(REMOTE_MASTER_PORT) -#define M_DDR _DDRPORT(REMOTE_MASTER_PORT) -#define M_PIN _INPORT(REMOTE_MASTER_PORT) -#define M_PIN1 REMOTE_MASTER_PIN1 -#define M_PIN2 REMOTE_MASTER_PIN2 - struct remote_state_t { /* serial communication */ @@ -95,14 +89,6 @@ static void parse_powerdown(void); void remote_init(void) { - /* master mode check: check if PIN2 pulls down PIN1 */ - /* configure M_PIN1 as input with pullup */ - M_DDR &= ~_BV(M_PIN1); - M_PORT |= _BV(M_PIN1); - /* configure M_PIN2 as output, set low */ - M_DDR |= _BV(M_PIN2); - M_PORT &= ~_BV(M_PIN2); - /* initialize offsets */ global_remote.offsets.saturation = 255; global_remote.offsets.value = 255; @@ -430,10 +416,15 @@ void parse_config_startup(struct remote_msg_config_startup_t *msg) storage_save_config(); } +#if UART_TX_ENABLED static void wait_for_uart(void) { while (fifo_fill((fifo_t *)&global_uart.tx) != 0 || !uart_send_complete()); } +#else +/* no need to wait for me */ +#define wait_for_uart() +#endif void parse_bootloader(struct remote_msg_bootloader_t *msg) {