modules: hal_nordic: nrfx: update API version to 3.3.0

Update i2s nrfx driver to pass buffer size alongside buffer pointers.
No functional changes.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This commit is contained in:
Tomasz Moń 2023-12-01 11:05:46 +01:00 committed by Carles Cufí
commit 2dee952a95
2 changed files with 9 additions and 3 deletions

View file

@ -226,6 +226,10 @@ static void free_rx_buffer(struct i2s_nrfx_drv_data *drv_data, void *buffer)
static bool supply_next_buffers(struct i2s_nrfx_drv_data *drv_data, static bool supply_next_buffers(struct i2s_nrfx_drv_data *drv_data,
nrfx_i2s_buffers_t *next) nrfx_i2s_buffers_t *next)
{ {
uint32_t block_size = (drv_data->active_dir == I2S_DIR_TX)
? drv_data->tx.cfg.block_size
: drv_data->rx.cfg.block_size;
drv_data->last_tx_buffer = next->p_tx_buffer; drv_data->last_tx_buffer = next->p_tx_buffer;
if (drv_data->active_dir != I2S_DIR_TX) { /* -> RX active */ if (drv_data->active_dir != I2S_DIR_TX) { /* -> RX active */
@ -236,6 +240,8 @@ static bool supply_next_buffers(struct i2s_nrfx_drv_data *drv_data,
} }
} }
next->buffer_size = block_size / sizeof(uint32_t);
LOG_DBG("Next buffers: %p/%p", next->p_tx_buffer, next->p_rx_buffer); LOG_DBG("Next buffers: %p/%p", next->p_tx_buffer, next->p_rx_buffer);
nrfx_i2s_next_buffers_set(drv_data->p_i2s, next); nrfx_i2s_next_buffers_set(drv_data->p_i2s, next);
return true; return true;
@ -661,10 +667,10 @@ static int start_transfer(struct i2s_nrfx_drv_data *drv_data)
: drv_data->rx.cfg.block_size; : drv_data->rx.cfg.block_size;
nrfx_err_t err; nrfx_err_t err;
initial_buffers.buffer_size = block_size / sizeof(uint32_t);
drv_data->last_tx_buffer = initial_buffers.p_tx_buffer; drv_data->last_tx_buffer = initial_buffers.p_tx_buffer;
err = nrfx_i2s_start(drv_data->p_i2s, &initial_buffers, err = nrfx_i2s_start(drv_data->p_i2s, &initial_buffers, 0);
block_size / sizeof(uint32_t), 0);
if (err == NRFX_SUCCESS) { if (err == NRFX_SUCCESS) {
return 0; return 0;
} }

View file

@ -18,7 +18,7 @@
/** @brief Symbol specifying minor version of the nrfx API to be used. */ /** @brief Symbol specifying minor version of the nrfx API to be used. */
#ifndef NRFX_CONFIG_API_VER_MINOR #ifndef NRFX_CONFIG_API_VER_MINOR
#define NRFX_CONFIG_API_VER_MINOR 2 #define NRFX_CONFIG_API_VER_MINOR 3
#endif #endif
/** @brief Symbol specifying micro version of the nrfx API to be used. */ /** @brief Symbol specifying micro version of the nrfx API to be used. */