mirror of https://github.com/ARMmbed/mbed-os.git
NRF52: serial: fix build warnings
parent
e9a3ca6259
commit
8eaf87cd50
|
@ -672,12 +672,12 @@ static void nordic_nrf5_uart_configure_object(serial_t *obj)
|
|||
|
||||
/* Enable flow control and parity. */
|
||||
nrf_uarte_configure(nordic_nrf5_uart_register[uart_object->instance],
|
||||
uart_object->parity,
|
||||
uart_object->hwfc);
|
||||
(nrf_uarte_parity_t) uart_object->parity,
|
||||
(nrf_uarte_hwfc_t) uart_object->hwfc);
|
||||
|
||||
/* Set baudrate. */
|
||||
nrf_uarte_baudrate_set(nordic_nrf5_uart_register[uart_object->instance],
|
||||
uart_object->baudrate);
|
||||
(nrf_uarte_baudrate_t) uart_object->baudrate);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -940,7 +940,8 @@ void serial_init(serial_t *obj, PinName tx, PinName rx)
|
|||
/* Wait until NRF_UARTE_EVENT_TXDRDY is set before proceeding. */
|
||||
bool done = false;
|
||||
do {
|
||||
done = nrf_uarte_event_check(nordic_nrf5_uart_register[instance], NRF_UARTE_EVENT_TXDRDY);
|
||||
done = nrf_uarte_event_check(nordic_nrf5_uart_register[instance],
|
||||
(nrf_uarte_event_t) NRF_UARTE_EVENT_TXDRDY);
|
||||
} while(done == false);
|
||||
}
|
||||
|
||||
|
@ -1025,7 +1026,7 @@ void serial_baud(serial_t *obj, int baudrate)
|
|||
struct serial_s *uart_object = obj;
|
||||
#endif
|
||||
|
||||
nrf_uart_baudrate_t new_rate = NRF_UART_BAUDRATE_9600;
|
||||
nrf_uarte_baudrate_t new_rate = NRF_UART_BAUDRATE_9600;
|
||||
|
||||
/* Round down to nearest supported baud rate. */
|
||||
if (baudrate < 2400) {
|
||||
|
|
Loading…
Reference in New Issue