Added support for UART4 and UART5 in STM32L1xx Category 5 devices
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9476 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
5ea09ccb8f
commit
90a2b166cb
|
@ -226,7 +226,8 @@
|
|||
#error "UART4 not present in the selected device"
|
||||
#endif
|
||||
|
||||
#if !defined(STM32F2XX) && !defined(STM32F4XX)
|
||||
#if !defined(STM32F2XX) && !defined(STM32F4XX) && !defined(STM32L151xE) && \
|
||||
!defined(STM32L152xE) && !defined(STM32L162xE)
|
||||
#error "UART4 DMA access not supported in this platform"
|
||||
#endif
|
||||
#endif /* STM32_UART_USE_UART4 */
|
||||
|
@ -236,7 +237,8 @@
|
|||
#error "UART5 not present in the selected device"
|
||||
#endif
|
||||
|
||||
#if !defined(STM32F2XX) && !defined(STM32F4XX)
|
||||
#if !defined(STM32F2XX) && !defined(STM32F4XX) && !defined(STM32L151xE) && \
|
||||
!defined(STM32L152xE) && !defined(STM32L162xE)
|
||||
#error "UART5 DMA access not supported in this platform"
|
||||
#endif
|
||||
#endif /* STM32_UART_USE_UART5 */
|
||||
|
|
|
@ -75,11 +75,14 @@
|
|||
#define STM32_USART1_HANDLER VectorD4
|
||||
#define STM32_USART2_HANDLER VectorD8
|
||||
#define STM32_USART3_HANDLER VectorDC
|
||||
#define STM32_UART4_HANDLER Vector100
|
||||
#define STM32_UART5_HANDLER Vector105
|
||||
|
||||
#define STM32_USART1_NUMBER 37
|
||||
#define STM32_USART2_NUMBER 38
|
||||
#define STM32_USART3_NUMBER 39
|
||||
|
||||
#define STM32_UART4_NUMBER 48
|
||||
#define STM32_UART5_NUMBER 49
|
||||
/*
|
||||
* USB units.
|
||||
*/
|
||||
|
|
|
@ -744,6 +744,56 @@
|
|||
* @api
|
||||
*/
|
||||
#define rccResetUSART3() rccResetAPB1(RCC_APB1RSTR_USART3RST)
|
||||
|
||||
/**
|
||||
* @brief Enables the UART4 peripheral clock.
|
||||
*
|
||||
* @param[in] lp low power enable flag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
#define rccEnableUART4(lp) rccEnableAPB1(RCC_APB1ENR_UART4EN, lp)
|
||||
|
||||
/**
|
||||
* @brief Disables the UART4 peripheral clock.
|
||||
*
|
||||
* @param[in] lp low power enable flag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
#define rccDisableUART4(lp) rccDisableAPB1(RCC_APB1ENR_UART4EN, lp)
|
||||
|
||||
/**
|
||||
* @brief Resets the UART4 peripheral.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
#define rccResetUART4() rccResetAPB1(RCC_APB1RSTR_UART4RST)
|
||||
|
||||
/**
|
||||
* @brief Enables the UART5 peripheral clock.
|
||||
*
|
||||
* @param[in] lp low power enable flag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
#define rccEnableUART5(lp) rccEnableAPB1(RCC_APB1ENR_UART5EN, lp)
|
||||
|
||||
/**
|
||||
* @brief Disables the UART5 peripheral clock.
|
||||
*
|
||||
* @param[in] lp low power enable flag
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
#define rccDisableUART5(lp) rccDisableAPB1(RCC_APB1ENR_UART5EN, lp)
|
||||
|
||||
/**
|
||||
* @brief Resets the UART5 peripheral.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
#define rccResetUART5() rccResetAPB1(RCC_APB1RSTR_UART5RST)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue