Skip to content

Commit 0c9648f

Browse files
mstasiaknordicmasz-nordic
authored andcommitted
[nrf fromlist] samples: nordic: nrfx_prs: remove deprecated UARTE API
nrfx_uarte_rx is deprecated and will be soon removed. Replaced by new API. Upstream PR #: 96153 Signed-off-by: Michał Stasiak <[email protected]>
1 parent f43c322 commit 0c9648f

File tree

1 file changed

+8
-2
lines changed
  • samples/boards/nordic/nrfx_prs/src

1 file changed

+8
-2
lines changed

samples/boards/nordic/nrfx_prs/src/main.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,15 @@ static bool uarte_transfer(const uint8_t *tx_data, size_t tx_data_len,
260260
{
261261
nrfx_err_t err;
262262

263-
err = nrfx_uarte_rx(&uarte, rx_buf, rx_buf_size);
263+
err = nrfx_uarte_rx_buffer_set(&uarte, rx_buf, rx_buf_size);
264264
if (err != NRFX_SUCCESS) {
265-
printk("nrfx_uarte_rx() failed: 0x%08x\n", err);
265+
printk("nrfx_uarte_rx_buffer_set() failed: 0x%08x\n", err);
266+
return false;
267+
}
268+
269+
err = nrfx_uarte_rx_enable(&uarte, NRFX_UARTE_RX_ENABLE_STOP_ON_END);
270+
if (err != NRFX_SUCCESS) {
271+
printk("nrfx_uarte_rx_enable() failed: 0x%08x\n", err);
266272
return false;
267273
}
268274

0 commit comments

Comments
 (0)