diff --git a/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h b/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h index a61800ab801e..db01f405f238 100644 --- a/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h +++ b/subsys/mpsl/fem/common/include/mpsl_fem_twi_drv.h @@ -14,7 +14,7 @@ /** @brief Structure representing an I2C bus driver for a Front-End Module. */ typedef struct { const struct device *dev; - nrfx_twim_evt_handler_t nrfx_twim_callback_saved; + nrfx_twim_event_handler_t nrfx_twim_callback_saved; void *nrfx_twim_callback_ctx_saved; mpsl_fem_twi_async_xfer_write_cb_t fem_twi_async_xfwr_write_cb; void *fem_twi_async_xfwr_write_cb_ctx; diff --git a/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c b/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c index dfd8f94fdd17..afbebaa86fef 100644 --- a/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c +++ b/subsys/mpsl/fem/common/mpsl_fem_twi_drv.c @@ -28,29 +28,29 @@ static int32_t mpsl_fem_twi_drv_impl_xfer_write(void *p_instance, uint8_t slave_ } static inline void mpsl_fem_twi_drv_nrfx_twim_callback_replace(mpsl_fem_twi_drv_t *drv, - nrfx_twim_evt_handler_t callback) + nrfx_twim_event_handler_t callback) { const struct i2c_nrfx_twim_common_config *config = drv->dev->config; - nrfx_err_t err; + int err; - nrfx_twim_callback_get(&config->twim, &drv->nrfx_twim_callback_saved, + nrfx_twim_callback_get(config->twim, &drv->nrfx_twim_callback_saved, &drv->nrfx_twim_callback_ctx_saved); - err = nrfx_twim_callback_set(&config->twim, callback, drv); + err = nrfx_twim_callback_set(config->twim, callback, drv); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err >= 0); (void)err; } static inline void mpsl_fem_twi_drv_nrfx_twim_callback_restore(mpsl_fem_twi_drv_t *drv) { const struct i2c_nrfx_twim_common_config *config = drv->dev->config; - nrfx_err_t err; + int err; - err = nrfx_twim_callback_set(&config->twim, drv->nrfx_twim_callback_saved, + err = nrfx_twim_callback_set(config->twim, drv->nrfx_twim_callback_saved, drv->nrfx_twim_callback_ctx_saved); - __ASSERT_NO_MSG(err == NRFX_SUCCESS); + __ASSERT_NO_MSG(err >= 0); (void)err; } @@ -91,26 +91,20 @@ static int32_t mpsl_fem_twi_drv_impl_xfer_write_async(void *p_instance, uint8_t .p_primary_buf = (uint8_t *)p_data, .primary_length = data_length, }; - nrfx_err_t err; - int32_t ret = 0; + int err; drv->fem_twi_async_xfwr_write_cb = p_callback; drv->fem_twi_async_xfwr_write_cb_ctx = p_context; mpsl_fem_twi_drv_nrfx_twim_callback_replace(drv, mpsl_fem_twi_drv_nrfx_twim_evt_handler); - err = nrfx_twim_xfer(&config->twim, &cur_xfer, 0); + err = nrfx_twim_xfer(config->twim, &cur_xfer, 0); - if (err != NRFX_SUCCESS) { + if (err < 0) { mpsl_fem_twi_drv_nrfx_twim_callback_restore(drv); - if (err == NRFX_ERROR_BUSY) { - ret = -EBUSY; - } else { - ret = -EIO; - } } - return ret; + return err; } static uint32_t mpsl_fem_twi_drv_frequency_hz_get(mpsl_fem_twi_drv_t *drv) diff --git a/west.yml b/west.yml index 80c46100bc5f..0bf557a02e90 100644 --- a/west.yml +++ b/west.yml @@ -66,7 +66,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 079d80388a6240f572442ce7021f1aab31a56139 + revision: pull/3395/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -280,7 +280,7 @@ manifest: path: nrfx groups: - nrfx - revision: 7ed74ac12ab94f561af820da8fb7089a0323e6de + revision: pull/984/head # West-related configuration for the nrf repository. self: