102
102
* |___/|_|
103
103
*/
104
104
105
- /**
106
- * Missing event typedefs.
107
- */
108
- typedef enum {
109
- NRF_UARTE_EVENT_TXDRDY = offsetof(NRF_UARTE_Type , EVENTS_TXDRDY ),
110
- } nrf_uarte_event_extra_t ;
111
-
112
105
113
106
/**
114
107
* Internal struct for storing each UARTE instance's state:
@@ -910,12 +903,12 @@ void serial_init(serial_t *obj, PinName tx, PinName rx)
910
903
nrf_uarte_enable (nordic_nrf5_uart_register [instance ]);
911
904
912
905
/* In order to support printing with interrupts disabled serial_putc
913
- * must busy wait on NRF_UARTE_EVENT_TXDRDY . This event cannot be set
906
+ * must busy wait on NRF_UARTE_EVENT_TXDDY . This event cannot be set
914
907
* manually but must be set by the UARTE module after a character has
915
908
* been sent.
916
909
*
917
910
* The following code sends a dummy character into the void so that
918
- * NRF_UARTE_EVENT_TXDRDY is correctly set.
911
+ * NRF_UARTE_EVENT_TXDDY is correctly set.
919
912
*/
920
913
921
914
/* Ensure pins are disconnected. */
@@ -934,11 +927,11 @@ void serial_init(serial_t *obj, PinName tx, PinName rx)
934
927
nrf_uarte_event_clear (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_ENDTX );
935
928
nrf_uarte_task_trigger (nordic_nrf5_uart_register [instance ], NRF_UARTE_TASK_STARTTX );
936
929
937
- /* Wait until NRF_UARTE_EVENT_TXDRDY is set before proceeding. */
930
+ /* Wait until NRF_UARTE_EVENT_TXDDY is set before proceeding. */
938
931
bool done = false;
939
932
do {
940
933
done = nrf_uarte_event_check (nordic_nrf5_uart_register [instance ],
941
- ( nrf_uarte_event_t ) NRF_UARTE_EVENT_TXDRDY );
934
+ NRF_UARTE_EVENT_TXDDY );
942
935
} while (done == false);
943
936
}
944
937
@@ -1284,7 +1277,7 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
1284
1277
Driver uses DMA to perform uart transfer and TxIrq is generated after the transfer is finished.
1285
1278
Trigger TxIrq interrupt manually on enabling the TxIrq. */
1286
1279
if (irq == TxIrq ) {
1287
- if (nrf_uarte_event_check (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDRDY )) {
1280
+ if (nrf_uarte_event_check (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDDY )) {
1288
1281
nordic_swi_tx_trigger (instance );
1289
1282
}
1290
1283
}
@@ -1365,10 +1358,10 @@ void serial_putc(serial_t *obj, int character)
1365
1358
1366
1359
/* Wait until UART is ready to send next character. */
1367
1360
do {
1368
- done = nrf_uarte_event_check (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDRDY );
1361
+ done = nrf_uarte_event_check (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDDY );
1369
1362
} while (done == false);
1370
1363
1371
- nrf_uarte_event_clear (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDRDY );
1364
+ nrf_uarte_event_clear (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDDY );
1372
1365
1373
1366
/* Arm Tx DMA buffer. */
1374
1367
nordic_nrf5_uart_state [instance ].tx_data = character ;
@@ -1431,7 +1424,7 @@ int serial_writable(serial_t *obj)
1431
1424
int instance = uart_object -> instance ;
1432
1425
1433
1426
return (!core_util_atomic_load_bool (& nordic_nrf5_uart_state [instance ].tx_in_progress ) &&
1434
- (nrf_uarte_event_check (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDRDY )));
1427
+ (nrf_uarte_event_check (nordic_nrf5_uart_register [instance ], NRF_UARTE_EVENT_TXDDY )));
1435
1428
}
1436
1429
1437
1430
const PinMap * serial_tx_pinmap ()
0 commit comments