Skip to content

Commit b45fcc6

Browse files
ananglMaureenHelm
authored andcommitted
ext: hal: nordic: Update nrfx to version 1.3.1
Updates nrfx to the recently released version that corrects a few imperfections in NFCT and USBD drivers. Origin: nrfx License: BSD 3-Clause URL: https://github.com/NordicSemiconductor/nrfx/tree/v1.3.1 commit: d4ebe15f58de1442e3eed93b40d13930e7785903 Purpose: Provide peripheral drivers for Nordic SoCs Maintained-by: External Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent a7bf9de commit b45fcc6

File tree

5 files changed

+37
-33
lines changed

5 files changed

+37
-33
lines changed

ext/hal/nordic/nrfx/README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ nrfx
22
####
33

44
Origin:
5-
https://github.com/NordicSemiconductor/nrfx/tree/v1.3.0
5+
https://github.com/NordicSemiconductor/nrfx/tree/v1.3.1
66

77
Status:
8-
v1.3.0
8+
v1.3.1
99

1010
Purpose:
1111
With added proper shims adapting it to Zephyr's APIs, nrfx will provide
@@ -28,7 +28,7 @@ URL:
2828
https://github.com/NordicSemiconductor/nrfx
2929

3030
commit:
31-
67710e47c7313cc56a15748e485079831ee6a3af
31+
d4ebe15f58de1442e3eed93b40d13930e7785903
3232

3333
Maintained-by:
3434
External
@@ -37,4 +37,4 @@ License:
3737
BSD-3-Clause
3838

3939
License Link:
40-
https://github.com/NordicSemiconductor/nrfx/blob/v1.3.0/LICENSE
40+
https://github.com/NordicSemiconductor/nrfx/blob/v1.3.1/LICENSE

ext/hal/nordic/nrfx/drivers/include/nrfx_nfct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ void nrfx_nfct_autocolres_enable(void);
318318
void nrfx_nfct_autocolres_disable(void);
319319

320320

321-
void nrfx_nfct_irq_handler();
321+
void nrfx_nfct_irq_handler(void);
322322

323323

324324
/** @} */

ext/hal/nordic/nrfx/drivers/include/nrfx_usbd.h

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -149,25 +149,27 @@ typedef enum
149149
} nrfx_usbd_event_type_t;
150150

151151
/**
152-
* @brief Possible endpoint error codes.
152+
* @brief Endpoint status codes.
153153
*
154-
* Error codes that may be returned with @ref NRFX_USBD_EVT_EPTRANSFER.
154+
* Status codes that may be returned by @ref nrfx_usbd_ep_status_get or, except for
155+
* @ref NRFX_USBD_EP_BUSY, reported together with @ref NRFX_USBD_EVT_EPTRANSFER.
155156
*/
156157
typedef enum
157158
{
158-
NRFX_USBD_EP_OK, /**< No error */
159+
NRFX_USBD_EP_OK, /**< No error occured. */
159160
NRFX_USBD_EP_WAITING, /**< Data received, no buffer prepared already - waiting for configured transfer. */
160161
NRFX_USBD_EP_OVERLOAD, /**< Received number of bytes cannot fit given buffer.
161-
* This error would also be returned when next_transfer function has been defined
162-
* but currently received data cannot fit completely in current buffer.
163-
* No data split from single endpoint transmission is supported.
164-
*
165-
* When this error is reported - data is left inside endpoint buffer.
166-
* Clear endpoint or prepare new buffer and read it.
167-
*/
162+
* This error would also be returned when next_transfer function has been defined
163+
* but currently received data cannot fit completely in current buffer.
164+
* No data split from single endpoint transmission is supported.
165+
*
166+
* When this error is reported - data is left inside endpoint buffer.
167+
* Clear endpoint or prepare new buffer and read it.
168+
*/
168169
NRFX_USBD_EP_ABORTED, /**< EP0 transfer can be aborted when new setup comes.
169-
* Any other transfer can be aborted by USB reset or driver stopping.
170-
*/
170+
* Any other transfer can be aborted by USB reset or driver stopping.
171+
*/
172+
NRFX_USBD_EP_BUSY, /**< A transfer is in progress. */
171173
} nrfx_usbd_ep_status_t;
172174

173175
/**
@@ -702,12 +704,11 @@ void * nrfx_usbd_feeder_buffer_get(void);
702704
* @param[in] ep Endpoint number.
703705
* @param[out] p_size Information about the current/last transfer size.
704706
*
705-
* @retval NRFX_SUCCESS Transfer already finished.
706-
* @retval NRFX_ERROR_BUSY Ongoing transfer.
707-
* @retval NRFX_ERROR_DATA_SIZE Too much of data received that cannot fit into buffer and cannot be splited into chunks.
708-
* This may happen if buffer size is not a multiplication of endpoint buffer size.
707+
* @return Endpoint status.
708+
*
709+
* @sa nrfx_usbd_ep_status_t
709710
*/
710-
nrfx_err_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size);
711+
nrfx_usbd_ep_status_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size);
711712

712713
/**
713714
* @brief Get number of received bytes.

ext/hal/nordic/nrfx/drivers/src/nrfx_nfct.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ static void nrfx_nfct_field_poll(void)
380380

381381
static void nrfx_nfct_field_timer_handler(nrf_timer_event_t event_type, void * p_context)
382382
{
383-
UNUSED_PARAMETER(p_context);
383+
(void)p_context;
384384

385385
if (event_type != NRF_TIMER_EVENT_COMPARE0)
386386
{
@@ -463,7 +463,7 @@ nrfx_err_t nrfx_nfct_init(nrfx_nfct_config_t const * p_config)
463463
m_nrf52840.eng_bc = nrfx_nfct_type_52840_final_check();
464464
#endif // NRF52840_XXAA
465465

466-
memcpy(&m_nfct_cb.config, p_config, sizeof(nrfx_nfct_config_t));
466+
m_nfct_cb.config = *p_config;
467467
nrfx_nfct_hw_init_setup();
468468

469469
#ifdef USE_TIMER_WORKAROUND
@@ -572,7 +572,7 @@ nrfx_err_t nrfx_nfct_tx(nrfx_nfct_data_desc_t const * p_tx_data,
572572
nrfx_nfct_rxtx_int_enable(NRFX_NFCT_TX_INT_MASK);
573573
nrf_nfct_task_trigger(NRF_NFCT_TASK_STARTTX);
574574

575-
NRF_LOG_INFO("Tx start");
575+
NRFX_LOG_INFO("Tx start");
576576
return NRFX_SUCCESS;
577577
}
578578

ext/hal/nordic/nrfx/drivers/src/nrfx_usbd.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,8 @@ void nrfx_usbd_irq_handler(void)
15791579
*((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7A9;
15801580
*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = uii;
15811581
rb = (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804));
1582-
NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" uii: 0x%.2x (0x%.2x)", uii, rb);
1582+
NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" uii: 0x%.2x (0x%.2x)", uii, rb);
1583+
(void)rb;
15831584
}
15841585

15851586
*((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AD;
@@ -1591,7 +1592,8 @@ void nrfx_usbd_irq_handler(void)
15911592
*((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AA;
15921593
*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = uoi;
15931594
rb = (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804));
1594-
NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" uoi: 0x%.2u (0x%.2x)", uoi, rb);
1595+
NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" uoi: 0x%.2u (0x%.2x)", uoi, rb);
1596+
(void)rb;
15951597
}
15961598

15971599
*((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AE;
@@ -1610,7 +1612,8 @@ void nrfx_usbd_irq_handler(void)
16101612
*((volatile uint32_t *)(NRF_USBD_BASE + 0x800)) = 0x7AB;
16111613
*((volatile uint32_t *)(NRF_USBD_BASE + 0x804)) = usbi;
16121614
rb = (uint8_t)*((volatile uint32_t *)(NRF_USBD_BASE + 0x804));
1613-
NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" usbi: 0x%.2u (0x%.2x)", usbi, rb);
1615+
NRFX_USBD_LOG_PROTO1_FIX_PRINTF(" usbi: 0x%.2u (0x%.2x)", usbi, rb);
1616+
(void)rb;
16141617
}
16151618

16161619
if (0 != (m_simulated_dataepstatus &
@@ -1797,7 +1800,7 @@ void nrfx_usbd_enable(void)
17971800

17981801
if (nrfx_usbd_errata_187())
17991802
{
1800-
CRITICAL_REGION_ENTER();
1803+
NRFX_CRITICAL_SECTION_ENTER();
18011804
if (*((volatile uint32_t *)(0x4006EC00)) == 0x00000000)
18021805
{
18031806
*((volatile uint32_t *)(0x4006EC00)) = 0x00009375;
@@ -1808,7 +1811,7 @@ void nrfx_usbd_enable(void)
18081811
{
18091812
*((volatile uint32_t *)(0x4006ED14)) = 0x00000000;
18101813
}
1811-
CRITICAL_REGION_EXIT();
1814+
NRFX_CRITICAL_SECTION_EXIT();
18121815
}
18131816
}
18141817

@@ -2228,14 +2231,14 @@ void * nrfx_usbd_feeder_buffer_get(void)
22282231
return m_tx_buffer;
22292232
}
22302233

2231-
nrfx_err_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size)
2234+
nrfx_usbd_ep_status_t nrfx_usbd_ep_status_get(nrfx_usbd_ep_t ep, size_t * p_size)
22322235
{
2233-
nrfx_err_t ret;
2236+
nrfx_usbd_ep_status_t ret;
22342237

22352238
usbd_ep_state_t const * p_state = ep_state_access(ep);
22362239
NRFX_CRITICAL_SECTION_ENTER();
22372240
*p_size = p_state->transfer_cnt;
2238-
ret = (p_state->handler.consumer == NULL) ? p_state->status : NRFX_ERROR_BUSY;
2241+
ret = (p_state->handler.consumer == NULL) ? p_state->status : NRFX_USBD_EP_BUSY;
22392242
NRFX_CRITICAL_SECTION_EXIT();
22402243
return ret;
22412244
}

0 commit comments

Comments
 (0)