Add EFM32 serial driver
This commit is contained in:
parent
74db6df61f
commit
1524c67a17
@ -95,7 +95,7 @@ CHIP_ASRCS += efm32_vectors.S
|
||||
endif
|
||||
|
||||
CHIP_CSRCS = efm32_start.c efm32_clockconfig.c efm32_irq.c efm32_timerisr.c
|
||||
CHIP_CSRCS += efm32_gpio.c efm32_lowputc.c
|
||||
CHIP_CSRCS += efm32_gpio.c efm32_lowputc.c efm32_serial.c
|
||||
|
||||
ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
||||
CHIP_CSRCS += efm32_idle.c
|
||||
|
@ -213,7 +213,16 @@ void efm32_lowsetup(void)
|
||||
#ifdef HAVE_SERIAL_CONSOLE
|
||||
void efm32_lowputc(uint32_t ch)
|
||||
{
|
||||
#warning Missing logic
|
||||
/* The TX Buffer Level (TXBL) status bit indicates the level of the
|
||||
* transmit buffer. If TXBIL is set, TXBL is set whenever the transmit
|
||||
* buffer is half-full or empty.
|
||||
*/
|
||||
|
||||
while ((getreg32(CONSOLE_BASE + EFM32_USART_STATUS_OFFSET) & USART_STATUS_TXBL) == 0);
|
||||
|
||||
/* Then send the character */
|
||||
|
||||
putreg32((uint32_t)ch, CONSOLE_BASE + EFM32_USART_TXDATA_OFFSET);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
1247
arch/arm/src/efm32/efm32_serial.c
Normal file
1247
arch/arm/src/efm32/efm32_serial.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user