Bug fix release
Fork of MODSERIAL by
Diff: INIT.cpp
- Revision:
- 26:3c3982fbdf18
- Parent:
- 25:ae0408ebdd68
--- a/INIT.cpp Tue Jan 08 18:01:03 2013 +0000 +++ b/INIT.cpp Mon Feb 16 10:32:36 2015 +0000 @@ -39,10 +39,21 @@ #else switch( _serial.index ) { +#ifdef TARGET_NXP case 0: _base = LPC_UART0; break; case 1: _base = LPC_UART1; break; case 2: _base = LPC_UART2; break; case 3: _base = LPC_UART3; break; +#elif defined TARGET_STM + case 0: _base = USART1_BASE; break; + case 1: _base = USART2_BASE; break; + case 2: _base = USART3_BASE; break; + case 3: _base = USART4_BASE; break; + case 4: _base = USART5_BASE; break; + case 5: _base = USART6_BASE; break; +#else + error("MODSERIAL is not supported for your target"); +#endif default: _base = NULL; break; } #endif