Skip to content

Commit

Permalink
nrfx 2.10.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nika-nordic committed Oct 25, 2022
1 parent f5a9b04 commit 23fb443
Show file tree
Hide file tree
Showing 97 changed files with 4,576 additions and 3,165 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# Changelog
All notable changes to this project are documented in this file.

## [2.10.0] - 2022-10-25
### Added
- Added NRFX_CONFIG_API_VER_2_9 and NRFX_CONFIG_API_VER_2_10 symbols that guard API-breaking changes. Deprecated API is used by default.
- Added new signature for the event handler in the IPC driver that accepts event index instead of event bitmask. The previous signature is deprecated.
- Added nrfx_ipc_gpmem_get() function that is used to get data from the GPMEM register in IPC. It should be now used instead of nrfx_ipc_mem_get(), which is deprecated.
- Added samples for the following drivers: EGU, PWM, RNG, SAADC, SPIM, SPIS, TEMP, TIMER, TWIM, TWIS, UARTE. They are a part of `zephyrproject-rtos/hal_nordic/nrfx` repository.
- Introduced the NRFX_{PERIPH}_INST_HANDLER_GET() macro for getting interrupt handler associated with the specified driver instance.
- Introduced the NRFX_{PERIPH}_INST_GET() macro for getting pointer to the structure of the registers of the specified peripheral.
- Introduced the NRF_TIMER_PRESCALER_CALCULATE() macro for computing prescaler value for given TIMER base frequency and desired frequency.
- Introduced the NRF_TIMER_BASE_FREQUENCY_GET() macro for getting base frequency in Hz for the specified TIMER instance.
- Added missing NRFX_RESET_REASON_CTRLAP_MASK in nrfx_reset_reason_mask_t for nRF9160.
- Added missing NRFX_RESET_REASON_SREQ_MASK in nrfx_reset_reason_mask_t.

### Changed
- Updated MDK to version 8.51.0.
- Refactored the TIMER driver to allow user handler to be NULL.
- Removed magic numbers from nrf_twim_event_t type in TWIM HAL.

### Fixed
- Fixed the NRFX_ROUNDED_DIV() macro for negative numbers.
- Disabled array bounds warning for nrf_clock_is_running() function that was false positive in GCC 12 and above.

## [2.9.0] - 2022-07-19
### Added
- Added configuration parameter NRFX_NFCT_PARAM_ID_FDT_MIN that allows settting the value of the FRAMEDELAYMIN register.
Expand Down
12 changes: 2 additions & 10 deletions doc/nrfx.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ PROJECT_NAME = "nrfx"

### EDIT THIS ###

PROJECT_NUMBER = "2.9"
PROJECT_NUMBER = "2.10"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -2077,15 +2077,7 @@ INCLUDE_FILE_PATTERNS =
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = SUPPRESS_INLINE_IMPLEMENTATION \
__NRFX_DOXYGEN__ \
CONFIG_PURGE_ENABLED=1 \
CONFIG_DISASSOCIATE_ENABLED=1 \
CONFIG_GTS_ENABLED=1 \
CONFIG_ORPHAN_ENABLED=1 \
CONFIG_RXE_ENABLED=1 \
CONFIG_START_ENABLED=1 \
CONFIG_SYNC_ENABLED=1 \
CONFIG_PANID_CONFLICT_ENABLED=1
__NRFX_DOXYGEN__

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
11 changes: 7 additions & 4 deletions doc/sphinx/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sphinx~=3.5
sphinx-ncs-theme~=0.6.2
breathe~=4.28
m2r2~=0.2
Sphinx!=5.0.0,<6,>=4.0
sphinx-ncs-theme==0.6.5
sphinx-rtd-theme==0.5.2
breathe==4.34.0
m2r2==0.3.2
Jinja2==3.0.3
docutils<0.17
6 changes: 4 additions & 2 deletions drivers/include/nrfx_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,17 @@ void nrfx_clock_calibration_timer_start(uint8_t interval);
/** @brief Function for stopping the calibration timer. */
void nrfx_clock_calibration_timer_stop(void);

/**@brief Function for returning a requested task address for the clock driver module.
/**
* @brief Function for returning a requested task address for the clock driver module.
*
* @param[in] task One of the peripheral tasks.
*
* @return Task address.
*/
NRFX_STATIC_INLINE uint32_t nrfx_clock_ppi_task_addr(nrf_clock_task_t task);

/**@brief Function for returning a requested event address for the clock driver module.
/**
* @brief Function for returning a requested event address for the clock driver module.
*
* @param[in] event One of the peripheral events.
*
Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_egu.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ void nrfx_egu_trigger(nrfx_egu_t const * p_instance, uint8_t event_idx);
*/
void nrfx_egu_uninit(nrfx_egu_t const * p_instance);

/**
* @brief Macro returning EGU interrupt handler.
*
* param[in] idx EGU index.
*
* @return Interrupt handler.
*/
#define NRFX_EGU_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_egu_, idx, _irq_handler)

/** @} */

void nrfx_egu_0_irq_handler(void);
Expand Down
33 changes: 31 additions & 2 deletions drivers/include/nrfx_ipc.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,25 @@ extern "C" {
* @brief Interprocessor Communication (IPC) peripheral driver.
*/

#if NRFX_CHECK(NRFX_CONFIG_API_VER_2_10) || defined(__NRFX_DOXYGEN__)
/**
* @brief IPC driver handler type.
*
* @param[in] event_idx IPC event index.
* @param[in] p_context Context passed to the interrupt handler, set on initialization.
*/
typedef void (*nrfx_ipc_handler_t)(uint8_t event_idx, void * p_context);
#elif NRFX_CHECK(NRFX_CONFIG_API_VER_2_9)
/**
* @brief IPC driver handler type.
*
* @note This function is deprecated. Use @ref NRFX_CONFIG_API_VER_2_10 variant instead.
*
* @param[in] event_mask Bitmask with events that triggered the interrupt.
* @param[in] p_context Context passed to the interrupt handler, set on initialization.
*/
typedef void (*nrfx_ipc_handler_t)(uint32_t event_mask, void * p_context);
#endif

/** @brief IPC configuration structure. */
typedef struct
Expand All @@ -67,7 +79,7 @@ typedef struct
* @brief Function for initializing the IPC driver.
*
* @param irq_priority Interrupt priority.
* @param handler Event handler provided by the user. Cannot be NULL.
* @param handler Event handler provided by the user.
* @param p_context Context passed to event handler.
*
* @retval NRFX_SUCCESS Initialization was successful.
Expand All @@ -93,21 +105,34 @@ void nrfx_ipc_config_load(nrfx_ipc_config_t const * p_config);
NRFX_STATIC_INLINE void nrfx_ipc_signal(uint8_t send_index);

/**
* @brief Function for storing data in GPMEM register in the IPC peripheral.
* @brief Function for storing data in the general purpose memory register.
*
* @param mem_index Index of the memory cell.
* @param data Data to be saved.
*/
NRFX_STATIC_INLINE void nrfx_ipc_gpmem_set(uint8_t mem_index, uint32_t data);

#if NRFX_CHECK(NRFX_CONFIG_API_VER_2_10) || defined(__NRFX_DOXYGEN__)
/**
* @brief Function for getting data from the general purpose memory register.
*
* @param mem_index Index of the memory cell.
*
* @return Saved data.
*/
NRFX_STATIC_INLINE uint32_t nrfx_ipc_gpmem_get(uint8_t mem_index);
#elif NRFX_CHECK(NRFX_CONFIG_API_VER_2_9)
/**
* @brief Function for getting data from the GPMEM register in the IPC peripheral.
*
* @note This function is deprecated. Use @ref nrfx_ipc_gpmem_get instead.
*
* @param mem_index Index of the memory cell.
*
* @return Saved data.
*/
NRFX_STATIC_INLINE uint32_t nrfx_ipc_mem_get(uint8_t mem_index);
#endif

/** @brief Function for uninitializing the IPC module. */
void nrfx_ipc_uninit(void);
Expand Down Expand Up @@ -183,7 +208,11 @@ NRFX_STATIC_INLINE void nrfx_ipc_gpmem_set(uint8_t mem_index, uint32_t data)
nrf_ipc_gpmem_set(NRF_IPC, mem_index, data);
}

#if NRFX_CHECK(NRFX_CONFIG_API_VER_2_10)
NRFX_STATIC_INLINE uint32_t nrfx_ipc_gpmem_get(uint8_t mem_index)
#elif NRFX_CHECK(NRFX_CONFIG_API_VER_2_9)
NRFX_STATIC_INLINE uint32_t nrfx_ipc_mem_get(uint8_t mem_index)
#endif
{
NRFX_ASSERT(mem_index < NRFX_ARRAY_SIZE(NRF_IPC->GPMEM));
return nrf_ipc_gpmem_get(NRF_IPC, mem_index);
Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,15 @@ NRFX_STATIC_INLINE uint32_t nrfx_pwm_event_address_get(nrfx_pwm_t const * p_inst
}
#endif // NRFX_DECLARE_ONLY

/**
* @brief Macro returning PWM interrupt handler.
*
* param[in] idx PWM index.
*
* @return Interrupt handler.
*/
#define NRFX_PWM_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_pwm_, idx, _irq_handler)

/** @} */


Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,15 @@ NRFX_STATIC_INLINE uint32_t nrfx_rtc_event_address_get(nrfx_rtc_t const * p_inst
}
#endif // NRFX_DECLARE_ONLY

/**
* @brief Macro returning RTC interrupt handler.
*
* param[in] idx RTC index.
*
* @return Interrupt handler.
*/
#define NRFX_RTC_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_rtc_, idx, _irq_handler)

/** @} */


Expand Down
6 changes: 4 additions & 2 deletions drivers/include/nrfx_saadc.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ nrfx_err_t nrfx_saadc_simple_mode_set(uint32_t channel_mask,
* @retval NRFX_SUCCESS Initialization was successful.
* @retval NRFX_ERROR_BUSY There is a conversion or calibration ongoing.
* @retval NRFX_ERROR_INVALID_PARAM Attempt to activate channel that is not configured.
* @retval NRFX_ERROR_NOT_SUPPORTED Attempt to activate internal timer or oversampling without burst
* with multiple channels enabled.
* @retval NRFX_ERROR_NOT_SUPPORTED Attempt to activate either of the following:
* * internal timer in the blocking mode,
* * internal timer with multiple channels enabled,
* * oversampling without burst with multiple channels enabled.
*/
nrfx_err_t nrfx_saadc_advanced_mode_set(uint32_t channel_mask,
nrf_saadc_resolution_t resolution,
Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ nrfx_err_t nrfx_spi_xfer(nrfx_spi_t const * p_instance,
*/
void nrfx_spi_abort(nrfx_spi_t const * p_instance);

/**
* @brief Macro returning SPI interrupt handler.
*
* param[in] idx SPI index.
*
* @return Interrupt handler.
*/
#define NRFX_SPI_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_spi_, idx, _irq_handler)

/** @} */


Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_spim.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,15 @@ uint32_t nrfx_spim_end_event_get(nrfx_spim_t const * p_instance);
*/
void nrfx_spim_abort(nrfx_spim_t const * p_instance);

/**
* @brief Macro returning SPIM interrupt handler.
*
* param[in] idx SPIM index.
*
* @return Interrupt handler.
*/
#define NRFX_SPIM_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_spim_, idx, _irq_handler)

/** @} */


Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_spis.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@ nrfx_err_t nrfx_spis_buffers_set(nrfx_spis_t const * p_instance,
uint8_t * p_rx_buffer,
size_t rx_buffer_length);

/**
* @brief Macro returning SPIS interrupt handler.
*
* param[in] idx SPIS index.
*
* @return Interrupt handler.
*/
#define NRFX_SPIS_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_spis_, idx, _irq_handler)

/** @} */


Expand Down
12 changes: 10 additions & 2 deletions drivers/include/nrfx_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ typedef void (* nrfx_timer_event_handler_t)(nrf_timer_event_t event_type,
*
* @param[in] p_instance Pointer to the driver instance structure.
* @param[in] p_config Pointer to the structure with the initial configuration.
* @param[in] timer_event_handler Event handler provided by the user.
* Must not be NULL.
* @param[in] timer_event_handler Event handler provided by the user. Can be NULL.
*
* @retval NRFX_SUCCESS Initialization was successful.
* @retval NRFX_ERROR_INVALID_STATE The instance is already initialized.
Expand Down Expand Up @@ -386,6 +385,15 @@ NRFX_STATIC_INLINE uint32_t nrfx_timer_ms_to_ticks(nrfx_timer_t const * p_instan
}
#endif // NRFX_DECLARE_ONLY

/**
* @brief Macro returning TIMER interrupt handler.
*
* param[in] idx TIMER index.
*
* @return Interrupt handler.
*/
#define NRFX_TIMER_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_timer_, idx, _irq_handler)

/** @} */


Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_twi.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,15 @@ NRFX_STATIC_INLINE nrfx_err_t nrfx_twi_bus_recover(uint32_t scl_pin, uint32_t sd
}
#endif

/**
* @brief Macro returning TWI interrupt handler.
*
* param[in] idx TWI index.
*
* @return Interrupt handler.
*/
#define NRFX_TWI_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_twi_, idx, _irq_handler)

/** @} */


Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_twim.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,15 @@ NRFX_STATIC_INLINE nrfx_err_t nrfx_twim_bus_recover(uint32_t scl_pin, uint32_t s
}
#endif

/**
* @brief Macro returning TWIM interrupt handler.
*
* param[in] idx TWIM index.
*
* @return Interrupt handler.
*/
#define NRFX_TWIM_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_twim_, idx, _irq_handler)

/** @} */

void nrfx_twim_0_irq_handler(void);
Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_twis.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,15 @@ NRFX_STATIC_INLINE size_t nrfx_twis_rx_amount(nrfx_twis_t const * p_instance)
}
#endif // NRFX_DECLARE_ONLY

/**
* @brief Macro returning TWIS interrupt handler.
*
* param[in] idx TWIS index.
*
* @return Interrupt handler.
*/
#define NRFX_TWIS_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_twis_, idx, _irq_handler)

/** @} */


Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_uart.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,15 @@ NRFX_STATIC_INLINE uint32_t nrfx_uart_event_address_get(nrfx_uart_t const * p_in
}
#endif // NRFX_DECLARE_ONLY

/**
* @brief Macro returning UART interrupt handler.
*
* param[in] idx UART index.
*
* @return Interrupt handler.
*/
#define NRFX_UART_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_uart_, idx, _irq_handler)

/** @} */


Expand Down
9 changes: 9 additions & 0 deletions drivers/include/nrfx_uarte.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,15 @@ NRFX_STATIC_INLINE uint32_t nrfx_uarte_event_address_get(nrfx_uarte_t const * p_
}
#endif // NRFX_DECLARE_ONLY

/**
* @brief Macro returning UARTE interrupt handler.
*
* param[in] idx UARTE index.
*
* @return Interrupt handler.
*/
#define NRFX_UARTE_INST_HANDLER_GET(idx) NRFX_CONCAT_3(nrfx_uarte_, idx, _irq_handler)

/** @} */


Expand Down
Loading

0 comments on commit 23fb443

Please sign in to comment.