From: Keith Packard Date: Tue, 28 Mar 2023 18:56:27 +0000 (-0700) Subject: altos/lpc: Validate UART pin config X-Git-Tag: 1.9.16~1^2~12 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=cbc7a40fd29dd9a2e5f55dd58e9d50e009e7fb22 altos/lpc: Validate UART pin config Make sure some UART pin configuration has been selected Signed-off-by: Keith Packard --- diff --git a/src/lpc/ao_serial_lpc.c b/src/lpc/ao_serial_lpc.c index 1a833b38..2362c674 100644 --- a/src/lpc/ao_serial_lpc.c +++ b/src/lpc/ao_serial_lpc.c @@ -156,8 +156,7 @@ ao_serial_init(void) (0 << LPC_IOCONF_HYS) | (0 << LPC_IOCONF_INV) | (0 << LPC_IOCONF_OD)); -#endif -#if SERIAL_1_13_14 +#elif SERIAL_1_13_14 lpc_ioconf.pio1_13 = ((LPC_IOCONF_FUNC_PIO1_13_TXD << LPC_IOCONF_FUNC) | (LPC_IOCONF_MODE_INACTIVE << LPC_IOCONF_MODE) | (0 << LPC_IOCONF_HYS) | @@ -168,6 +167,8 @@ ao_serial_init(void) (0 << LPC_IOCONF_HYS) | (0 << LPC_IOCONF_INV) | (0 << LPC_IOCONF_OD)); +#else +#error No serial pin configuration selected #endif /* Turn on the USART */