added prescaler for 16 bit pwm in LPC1347 target
Fork of mbed-dev by
Diff: targets/hal/TARGET_STM/TARGET_STM32F3/serial_api.c
- Revision:
- 7:cf567a118ec7
- Parent:
- 0:9b334a45a8ff
- Child:
- 144:ef7eb2e8f9f7
diff -r 56506fac7794 -r cf567a118ec7 targets/hal/TARGET_STM/TARGET_STM32F3/serial_api.c --- a/targets/hal/TARGET_STM/TARGET_STM32F3/serial_api.c Wed Oct 07 08:00:09 2015 +0100 +++ b/targets/hal/TARGET_STM/TARGET_STM32F3/serial_api.c Fri Oct 16 07:45:35 2015 +0100 @@ -94,11 +94,13 @@ __HAL_RCC_USART2_CONFIG(RCC_USART2CLKSOURCE_SYSCLK); obj->index = 1; } +#if defined(UART3_BASE) if (obj->uart == UART_3) { __USART3_CLK_ENABLE(); __HAL_RCC_USART3_CONFIG(RCC_USART3CLKSOURCE_SYSCLK); obj->index = 2; } +#endif #if defined(UART4_BASE) if (obj->uart == UART_4) { __UART4_CLK_ENABLE(); @@ -155,11 +157,13 @@ __USART2_RELEASE_RESET(); __USART2_CLK_DISABLE(); } +#if defined(UART3_BASE) if (obj->uart == UART_3) { __USART3_FORCE_RESET(); __USART3_RELEASE_RESET(); __USART3_CLK_DISABLE(); } +#endif #if defined(UART4_BASE) if (obj->uart == UART_4) { __UART4_FORCE_RESET(); @@ -248,10 +252,12 @@ uart_irq(UART_2, 1); } +#if defined(UART3_BASE) static void uart3_irq(void) { uart_irq(UART_3, 2); } +#endif #if defined(UART4_BASE) static void uart4_irq(void) @@ -290,10 +296,12 @@ vector = (uint32_t)&uart2_irq; } +#if defined(UART3_BASE) if (obj->uart == UART_3) { irq_n = USART3_IRQn; vector = (uint32_t)&uart3_irq; } +#endif #if defined(UART4_BASE) if (obj->uart == UART_4) {