Add EFM32 serial driver

This commit is contained in:
Gregory Nutt 2014-10-19 18:55:44 -06:00
parent 74db6df61f
commit 1524c67a17
3 changed files with 1258 additions and 2 deletions

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff