mirror of https://github.com/ARMmbed/mbed-os.git
SiLabs Pearl: Keep UART enabled during single byte transfers
We need to explicitly enable the transmitter on Pearl when using the serial_putc function, to match the disable in the asynch abort.pull/1501/head
parent
15b4341162
commit
e865f1fe6f
|
@ -1072,6 +1072,14 @@ int serial_getc(serial_t *obj)
|
|||
*/
|
||||
void serial_putc(serial_t *obj, int c)
|
||||
{
|
||||
#ifdef _SILICON_LABS_32B_PLATFORM_2
|
||||
if(LEUART_REF_VALID(obj->serial.periph.leuart)) {
|
||||
LEUART_Enable(obj->serial.periph.leuart, leuartEnable);
|
||||
} else {
|
||||
USART_Enable(obj->serial.periph.uart, usartEnable);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Emlib USART_Tx blocks until buffer is writable (non-full), so we don't
|
||||
* need to use serial_writable(). */
|
||||
if(LEUART_REF_VALID(obj->serial.periph.leuart)) {
|
||||
|
|
Loading…
Reference in New Issue