From 9492f90b5c1714f9a76ef9b233ada7f1126894b5 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 19 Feb 2018 15:34:14 +0000 Subject: [PATCH] f4 build --- targets/stm32/jshardware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/stm32/jshardware.c b/targets/stm32/jshardware.c index c1c5ae901a..0b2f7aab5f 100644 --- a/targets/stm32/jshardware.c +++ b/targets/stm32/jshardware.c @@ -585,13 +585,13 @@ USART_TypeDef* getUsartFromDevice(IOEventFlags device) { switch (device) { case EV_SERIAL1 : return USART1; case EV_SERIAL2 : return USART2; -#if USART_COUNT>=3 +#if USART_COUNT>=3 && defined(USART3) case EV_SERIAL3 : return USART3; #endif -#if USART_COUNT>=4 +#if USART_COUNT>=4 && defined(UART4) case EV_SERIAL4 : return UART4; #endif -#if USART_COUNT>=5 +#if USART_COUNT>=5 && defined(UART5) case EV_SERIAL5 : return UART5; #endif #if USART_COUNT>=6