@@ -173,7 +173,7 @@ static nordic_uart_state_t nordic_nrf5_uart_state[NRFX_UARTE_ENABLED_COUNT] = {
173
173
*/
174
174
static NRF_UARTE_Type * nordic_nrf5_uart_register [NRFX_UARTE_ENABLED_COUNT ] = {
175
175
NRF_UARTE0 ,
176
- #if UART1_ENABLED
176
+ #if NRFX_UARTE1_ENABLED
177
177
NRF_UARTE1 ,
178
178
#endif
179
179
};
@@ -184,7 +184,7 @@ static NRF_UARTE_Type *nordic_nrf5_uart_register[NRFX_UARTE_ENABLED_COUNT] = {
184
184
*/
185
185
NRF_ATFIFO_DEF (nordic_nrf5_uart_fifo_0 , uint8_t , UART0_FIFO_BUFFER_SIZE );
186
186
187
- #if UART1_ENABLED
187
+ #if NRFX_UARTE1_ENABLED
188
188
NRF_ATFIFO_DEF (nordic_nrf5_uart_fifo_1 , uint8_t , UART1_FIFO_BUFFER_SIZE );
189
189
#endif
190
190
@@ -193,7 +193,7 @@ NRF_ATFIFO_DEF(nordic_nrf5_uart_fifo_1, uint8_t, UART1_FIFO_BUFFER_SIZE);
193
193
*/
194
194
static uint8_t nordic_nrf5_uart_swi_mask_tx_0 = 0 ;
195
195
static uint8_t nordic_nrf5_uart_swi_mask_rx_0 = 0 ;
196
- #if UART1_ENABLED
196
+ #if NRFX_UARTE1_ENABLED
197
197
static uint8_t nordic_nrf5_uart_swi_mask_tx_1 = 0 ;
198
198
static uint8_t nordic_nrf5_uart_swi_mask_rx_1 = 0 ;
199
199
#endif
@@ -313,7 +313,7 @@ static void nordic_nrf5_uart_swi0(void)
313
313
}
314
314
315
315
316
- #if UART1_ENABLED
316
+ #if NRFX_UARTE1_ENABLED
317
317
if (nordic_nrf5_uart_swi_mask_tx_1 ) {
318
318
319
319
nordic_nrf5_uart_swi_mask_tx_1 = 0 ;
@@ -350,7 +350,7 @@ static void nordic_swi_tx_trigger(int instance)
350
350
nordic_nrf5_uart_swi_mask_tx_0 = 1 ;
351
351
NVIC_SetPendingIRQ (SWI0_EGU0_IRQn );
352
352
}
353
- #if UART1_ENABLED
353
+ #if NRFX_UARTE1_ENABLED
354
354
else if (instance == 1 ) {
355
355
356
356
nordic_nrf5_uart_swi_mask_tx_1 = 1 ;
@@ -371,7 +371,7 @@ static void nordic_swi_rx_trigger(int instance)
371
371
nordic_nrf5_uart_swi_mask_rx_0 = 1 ;
372
372
NVIC_SetPendingIRQ (SWI0_EGU0_IRQn );
373
373
}
374
- #if UART1_ENABLED
374
+ #if NRFX_UARTE1_ENABLED
375
375
else if (instance == 1 ) {
376
376
377
377
nordic_nrf5_uart_swi_mask_rx_1 = 1 ;
@@ -554,7 +554,7 @@ static void nordic_nrf5_uart0_handler(void)
554
554
nordic_nrf5_uart_event_handler (0 );
555
555
}
556
556
557
- #if UART1_ENABLED
557
+ #if NRFX_UARTE1_ENABLED
558
558
/**
559
559
* @brief UARTE1 ISR.
560
560
*/
@@ -876,7 +876,7 @@ void serial_init(serial_t *obj, PinName tx, PinName rx)
876
876
NRFX_IRQ_PRIORITY_SET (UARTE0_UART0_IRQn , APP_IRQ_PRIORITY_HIGHEST );
877
877
NRFX_IRQ_ENABLE (UARTE0_UART0_IRQn );
878
878
879
- #if UART1_ENABLED
879
+ #if NRFX_UARTE1_ENABLED
880
880
/* Initialize FIFO buffer for UARTE1. */
881
881
NRF_ATFIFO_INIT (nordic_nrf5_uart_fifo_1 );
882
882
nordic_nrf5_uart_state [1 ].fifo = nordic_nrf5_uart_fifo_1 ;
@@ -1015,7 +1015,7 @@ void serial_free(serial_t *obj)
1015
1015
* (volatile uint32_t * )0x40002FFC ;
1016
1016
* (volatile uint32_t * )0x40002FFC = 1 ;
1017
1017
}
1018
- #if UART1_ENABLED
1018
+ #if NRFX_UARTE1_ENABLED
1019
1019
else {
1020
1020
* (volatile uint32_t * )0x40028FFC = 0 ;
1021
1021
* (volatile uint32_t * )0x40028FFC ;
@@ -1505,7 +1505,7 @@ int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx
1505
1505
valid = true;
1506
1506
}
1507
1507
}
1508
- #if UART1_ENABLED
1508
+ #if NRFX_UARTE1_ENABLED
1509
1509
else {
1510
1510
if (nrfx_is_in_ram (tx ) || (tx_length <= UART1_FIFO_BUFFER_SIZE )) {
1511
1511
valid = true;
0 commit comments