mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
cpu/stm32_common: special case for STM32L0 cpu family
This commit is contained in:
parent
79b2fd89bb
commit
55bb8874f3
@ -104,7 +104,7 @@ void uart_write(uart_t uart, const uint8_t *data, size_t len)
|
|||||||
assert(uart < UART_NUMOF);
|
assert(uart < UART_NUMOF);
|
||||||
|
|
||||||
for (size_t i = 0; i < len; i++) {
|
for (size_t i = 0; i < len; i++) {
|
||||||
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3)
|
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32F3)
|
||||||
while (!(dev(uart)->ISR & USART_ISR_TXE)) {}
|
while (!(dev(uart)->ISR & USART_ISR_TXE)) {}
|
||||||
dev(uart)->TDR = data[i];
|
dev(uart)->TDR = data[i];
|
||||||
#else
|
#else
|
||||||
@ -115,7 +115,7 @@ void uart_write(uart_t uart, const uint8_t *data, size_t len)
|
|||||||
|
|
||||||
/* make sure the function is synchronous by waiting for the transfer to
|
/* make sure the function is synchronous by waiting for the transfer to
|
||||||
* finish */
|
* finish */
|
||||||
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3)
|
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32F3)
|
||||||
while (!(dev(uart)->ISR & USART_ISR_TC)) {}
|
while (!(dev(uart)->ISR & USART_ISR_TC)) {}
|
||||||
#else
|
#else
|
||||||
while (!(dev(uart)->SR & USART_SR_TC)) {}
|
while (!(dev(uart)->SR & USART_SR_TC)) {}
|
||||||
@ -136,7 +136,7 @@ void uart_poweroff(uart_t uart)
|
|||||||
|
|
||||||
static inline void irq_handler(uart_t uart)
|
static inline void irq_handler(uart_t uart)
|
||||||
{
|
{
|
||||||
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3)
|
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32F3)
|
||||||
|
|
||||||
uint32_t status = dev(uart)->ISR;
|
uint32_t status = dev(uart)->ISR;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user