![]() |
nrfx 4.5.0
|
Hardware access layer with cache and barrier support for managing the SAADC peripheral. More...
Data Structures | |
| struct | nrfy_saadc_buffer_t |
| Structure describing SAADC sampling buffer. More... | |
| struct | nrfy_saadc_config_t |
| SAADC configuration structure. More... | |
| struct | nrfy_saadc_channel_input_t |
| SAADC channel input configuration structure. More... | |
Macros | |
| #define | NRFY_SAADC_HAS_SHORTS 1 |
| #define | NRFY_SAADC_HAS_CAL 1 |
| #define | NRFY_SAADC_HAS_CALREF 1 |
| #define | NRFY_SAADC_HAS_LIN_CAL 1 |
Functions | |
| NRFY_STATIC_INLINE void | nrfy_saadc_periph_configure (NRF_SAADC_Type *p_reg, nrfy_saadc_config_t const *p_config) |
| Function for configuring the SAADC. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_int_init (NRF_SAADC_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable) |
| Function for initializing the specified SAADC interrupts. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_int_uninit (NRF_SAADC_Type *p_reg) |
| Function for uninitializing the SAADC interrupts. | |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_events_process (NRF_SAADC_Type *p_reg, uint32_t mask, nrfy_saadc_buffer_t const *p_desc) |
| Function for processing the specified SAADC events. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_channel_configure (NRF_SAADC_Type *p_reg, uint8_t channel, nrf_saadc_channel_config_t const *p_config, nrfy_saadc_channel_input_t const *p_input) |
| Function for configuring the specified SAADC channel. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_buffer_set (NRF_SAADC_Type *p_reg, nrfy_saadc_buffer_t const *p_desc, bool latch, bool wait) |
| Function for setting the SAADC sampling buffer. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_buffer_latch (NRF_SAADC_Type *p_reg, bool wait) |
| Function for latching the SAADC sampling buffer. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_sample_start (NRF_SAADC_Type *p_reg, nrfy_saadc_buffer_t const *p_desc) |
| Function for starting the SAADC sampling. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_abort (NRF_SAADC_Type *p_reg, nrfy_saadc_buffer_t const *p_desc) |
| Function for aborting the ongoing SAADC sampling. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_stop (NRF_SAADC_Type *p_reg, bool wait) |
| Function for stopping the SAADC. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_calibrate (NRF_SAADC_Type *p_reg, bool wait) |
| Function for calibrating the SAADC. | |
| NRFY_STATIC_INLINE void | nrfy_saadc_task_trigger (NRF_SAADC_Type *p_reg, nrf_saadc_task_t task) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_task_address_get (NRF_SAADC_Type const *p_reg, nrf_saadc_task_t task) |
| NRFY_STATIC_INLINE bool | nrfy_saadc_event_check (NRF_SAADC_Type const *p_reg, nrf_saadc_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_saadc_event_clear (NRF_SAADC_Type *p_reg, nrf_saadc_event_t event) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_event_address_get (NRF_SAADC_Type const *p_reg, nrf_saadc_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_saadc_shorts_enable (NRF_SAADC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_saadc_shorts_disable (NRF_SAADC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_shorts_get (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_subscribe_set (NRF_SAADC_Type *p_reg, nrf_saadc_task_t task, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_saadc_subscribe_clear (NRF_SAADC_Type *p_reg, nrf_saadc_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_saadc_publish_set (NRF_SAADC_Type *p_reg, nrf_saadc_event_t event, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_saadc_publish_clear (NRF_SAADC_Type *p_reg, nrf_saadc_event_t event) |
| NRFY_STATIC_INLINE nrf_saadc_event_t | nrfy_saadc_limit_event_get (uint8_t channel, nrf_saadc_limit_t limit_type) |
| NRFY_STATIC_INLINE void | nrfy_saadc_channel_input_set (NRF_SAADC_Type *p_reg, uint8_t channel, nrf_saadc_input_t pselp, nrf_saadc_input_t pseln) |
| NRFY_STATIC_INLINE void | nrfy_saadc_channel_pos_input_set (NRF_SAADC_Type *p_reg, uint8_t channel, nrf_saadc_input_t pselp) |
| NRFY_STATIC_INLINE void | nrfy_saadc_channel_neg_input_set (NRF_SAADC_Type *p_reg, uint8_t channel, nrf_saadc_input_t pseln) |
| NRFY_STATIC_INLINE void | nrfy_saadc_channel_limits_set (NRF_SAADC_Type *p_reg, uint8_t channel, int16_t low, int16_t high) |
| NRFY_STATIC_INLINE void | nrfy_saadc_int_set (NRF_SAADC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_saadc_int_enable (NRF_SAADC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_int_enable_check (NRF_SAADC_Type const *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_saadc_int_disable (NRF_SAADC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_limit_int_get (uint8_t channel, nrf_saadc_limit_t limit_type) |
| NRFY_STATIC_INLINE bool | nrfy_saadc_busy_check (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_enable (NRF_SAADC_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_disable (NRF_SAADC_Type *p_reg) |
| NRFY_STATIC_INLINE bool | nrfy_saadc_enable_check (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_buffer_init (NRF_SAADC_Type *p_reg, nrf_saadc_value_t *p_buffer, uint32_t size) |
| NRFY_STATIC_INLINE void | nrfy_saadc_buffer_pointer_set (NRF_SAADC_Type *p_reg, nrf_saadc_value_t *p_buffer) |
| NRFY_STATIC_INLINE nrf_saadc_value_t * | nrfy_saadc_buffer_pointer_get (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint16_t | nrfy_saadc_amount_get (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_resolution_set (NRF_SAADC_Type *p_reg, nrf_saadc_resolution_t resolution) |
| NRFY_STATIC_INLINE nrf_saadc_resolution_t | nrfy_saadc_resolution_get (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_oversample_set (NRF_SAADC_Type *p_reg, nrf_saadc_oversample_t oversample) |
| NRFY_STATIC_INLINE nrf_saadc_oversample_t | nrfy_saadc_oversample_get (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_oversample_sample_count_get (nrf_saadc_oversample_t oversample) |
| NRFY_STATIC_INLINE void | nrfy_saadc_continuous_mode_enable (NRF_SAADC_Type *p_reg, uint16_t cc) |
| NRFY_STATIC_INLINE bool | nrfy_saadc_continuous_mode_enable_check (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_continuous_mode_disable (NRF_SAADC_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_channel_init (NRF_SAADC_Type *p_reg, uint8_t channel, nrf_saadc_channel_config_t const *config) |
| NRFY_STATIC_INLINE nrf_saadc_value_t | nrfy_saadc_value_min_get (nrf_saadc_resolution_t resolution) |
| NRFY_STATIC_INLINE nrf_saadc_value_t | nrfy_saadc_value_max_get (nrf_saadc_resolution_t resolution) |
| NRFY_STATIC_INLINE void | nrfy_saadc_cal_set (NRF_SAADC_Type *p_reg, uint32_t trim) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_cal_get (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_calref_set (NRF_SAADC_Type *p_reg, uint32_t trim) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_calref_get (NRF_SAADC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_saadc_linearity_calibration_coeff_set (NRF_SAADC_Type *p_reg, uint8_t index, uint32_t coeff) |
| NRFY_STATIC_INLINE uint32_t | nrfy_saadc_linearity_calibration_coeff_get (NRF_SAADC_Type const *p_reg, uint8_t index) |
Hardware access layer with cache and barrier support for managing the SAADC peripheral.
| #define NRFY_SAADC_HAS_CAL 1 |
| #define NRFY_SAADC_HAS_CALREF 1 |
| #define NRFY_SAADC_HAS_LIN_CAL 1 |
| #define NRFY_SAADC_HAS_SHORTS 1 |
| NRFY_STATIC_INLINE void nrfy_saadc_abort | ( | NRF_SAADC_Type * | p_reg, |
| nrfy_saadc_buffer_t const * | p_desc ) |
Function for aborting the ongoing SAADC sampling.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_desc | Pointer to the structure containing sampling buffer if the abort is to be blocking. NULL for non-blocking operation. |
| NRFY_STATIC_INLINE uint16_t nrfy_saadc_amount_get | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_buffer_init | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_value_t * | p_buffer, | ||
| uint32_t | size ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the result buffer. |
| [in] | size | Size of the buffer (in samples). |
| NRFY_STATIC_INLINE void nrfy_saadc_buffer_latch | ( | NRF_SAADC_Type * | p_reg, |
| bool | wait ) |
Function for latching the SAADC sampling buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | wait | True if latching is to be blocking, false otherwise. |
| NRFY_STATIC_INLINE nrf_saadc_value_t * nrfy_saadc_buffer_pointer_get | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_buffer_pointer_set | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_value_t * | p_buffer ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the result buffer. |
| NRFY_STATIC_INLINE void nrfy_saadc_buffer_set | ( | NRF_SAADC_Type * | p_reg, |
| nrfy_saadc_buffer_t const * | p_desc, | ||
| bool | latch, | ||
| bool | wait ) |
Function for setting the SAADC sampling buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_desc | Pointer to the structure containing sampling buffer description. |
| [in] | latch | True if buffer is to be latched, false otherwise. |
| [in] | wait | True if latching is to be blocking, false otherwise. |
| NRFY_STATIC_INLINE bool nrfy_saadc_busy_check | ( | NRF_SAADC_Type const * | p_reg | ) |
This function checks whether the analog-to-digital converter is busy with a conversion.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The SAADC is busy. |
| false | The SAADC is not busy. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_cal_get | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_cal_set | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | trim ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trim | Trimming value |
| NRFY_STATIC_INLINE void nrfy_saadc_calibrate | ( | NRF_SAADC_Type * | p_reg, |
| bool | wait ) |
Function for calibrating the SAADC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | wait | True if calibration is to be blocking, false otherwise. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_calref_get | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_calref_set | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | trim ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trim | Trimming value |
| NRFY_STATIC_INLINE void nrfy_saadc_channel_configure | ( | NRF_SAADC_Type * | p_reg, |
| uint8_t | channel, | ||
| nrf_saadc_channel_config_t const * | p_config, | ||
| nrfy_saadc_channel_input_t const * | p_input ) |
Function for configuring the specified SAADC channel.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | channel | Channel number. |
| [in] | p_config | Pointer to the channel configuration structure. NULL if configuration is to be omitted. |
| [in] | p_input | Pointer to the channel input configuration structure. NULL if configuration is to be omitted. |
| NRFY_STATIC_INLINE void nrfy_saadc_channel_init | ( | NRF_SAADC_Type * | p_reg, |
| uint8_t | channel, | ||
| nrf_saadc_channel_config_t const * | config ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | channel | Channel number. |
| [in] | config | Pointer to the channel configuration structure. |
| NRFY_STATIC_INLINE void nrfy_saadc_channel_input_set | ( | NRF_SAADC_Type * | p_reg, |
| uint8_t | channel, | ||
| nrf_saadc_input_t | pselp, | ||
| nrf_saadc_input_t | pseln ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | channel | Channel number. |
| [in] | pselp | Positive input. |
| [in] | pseln | Negative input. Set to NRF_SAADC_INPUT_DISABLED in single ended mode. |
| NRFY_STATIC_INLINE void nrfy_saadc_channel_limits_set | ( | NRF_SAADC_Type * | p_reg, |
| uint8_t | channel, | ||
| int16_t | low, | ||
| int16_t | high ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | channel | Channel number. |
| [in] | low | Low limit. |
| [in] | high | High limit. |
| NRFY_STATIC_INLINE void nrfy_saadc_channel_neg_input_set | ( | NRF_SAADC_Type * | p_reg, |
| uint8_t | channel, | ||
| nrf_saadc_input_t | pseln ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | channel | Channel number. |
| [in] | pseln | Negative input. |
| NRFY_STATIC_INLINE void nrfy_saadc_channel_pos_input_set | ( | NRF_SAADC_Type * | p_reg, |
| uint8_t | channel, | ||
| nrf_saadc_input_t | pselp ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | channel | Channel number. |
| [in] | pselp | Positive input. |
| NRFY_STATIC_INLINE void nrfy_saadc_continuous_mode_disable | ( | NRF_SAADC_Type * | p_reg | ) |
New samples can still be acquired by manually triggering the SAMPLE task or by PPI.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_continuous_mode_enable | ( | NRF_SAADC_Type * | p_reg, |
| uint16_t | cc ) |
This function configures the SAADC internal timer to automatically take new samples at a fixed sample rate. Trigger the START task to begin continuous sampling. To stop the sampling, trigger the STOP task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc | Capture and compare value. Sample rate is 16 MHz/cc. Valid CC range is from NRF_SAADC_SAMPLERATE_CC_MIN to NRF_SAADC_SAMPLERATE_CC_MAX. |
| NRFY_STATIC_INLINE bool nrfy_saadc_continuous_mode_enable_check | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The continuous sampling is enabled. |
| false | The continuous sampling is disabled. |
| NRFY_STATIC_INLINE void nrfy_saadc_disable | ( | NRF_SAADC_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_enable | ( | NRF_SAADC_Type * | p_reg | ) |
The analog-to-digital converter must be enabled before use.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE bool nrfy_saadc_enable_check | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The SAADC is enabled. |
| false | The SAADC is not enabled. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_event_address_get | ( | NRF_SAADC_Type const * | p_reg, |
| nrf_saadc_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | SAADC event. |
| NRFY_STATIC_INLINE bool nrfy_saadc_event_check | ( | NRF_SAADC_Type const * | p_reg, |
| nrf_saadc_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be checked. |
| true | The event has been generated. |
| false | The event has not been generated. |
| NRFY_STATIC_INLINE void nrfy_saadc_event_clear | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | SAADC event. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_events_process | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | mask, | ||
| nrfy_saadc_buffer_t const * | p_desc ) |
Function for processing the specified SAADC events.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK(). |
| [in] | p_desc | Pointer to the structure containing buffer associated with the last sampling. Can be NULL. |
| NRFY_STATIC_INLINE void nrfy_saadc_int_disable | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_saadc_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_saadc_int_enable | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_saadc_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_int_enable_check | ( | NRF_SAADC_Type const * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be checked. Use nrf_saadc_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_saadc_int_init | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | mask, | ||
| uint8_t | irq_priority, | ||
| bool | enable ) |
Function for initializing the specified SAADC interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be initialized. |
| [in] | irq_priority | Interrupt priority. |
| [in] | enable | True if the interrupts are to be enabled, false otherwise. |
| NRFY_STATIC_INLINE void nrfy_saadc_int_set | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Interrupts configuration to be set. Use nrf_saadc_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_saadc_int_uninit | ( | NRF_SAADC_Type * | p_reg | ) |
Function for uninitializing the SAADC interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE nrf_saadc_event_t nrfy_saadc_limit_event_get | ( | uint8_t | channel, |
| nrf_saadc_limit_t | limit_type ) |
| [in] | channel | Channel number. |
| [in] | limit_type | Low limit or high limit. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_limit_int_get | ( | uint8_t | channel, |
| nrf_saadc_limit_t | limit_type ) |
| [in] | channel | SAADC channel number. |
| [in] | limit_type | Limit type. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_linearity_calibration_coeff_get | ( | NRF_SAADC_Type const * | p_reg, |
| uint8_t | index ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Coefficient number. |
| NRFY_STATIC_INLINE void nrfy_saadc_linearity_calibration_coeff_set | ( | NRF_SAADC_Type * | p_reg, |
| uint8_t | index, | ||
| uint32_t | coeff ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Coefficient number. |
| [in] | coeff | Value of the coefficient. |
| NRFY_STATIC_INLINE nrf_saadc_oversample_t nrfy_saadc_oversample_get | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_oversample_sample_count_get | ( | nrf_saadc_oversample_t | oversample | ) |
| [in] | oversample | Oversampling configuration. |
| NRFY_STATIC_INLINE void nrfy_saadc_oversample_set | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_oversample_t | oversample ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | oversample | Oversampling mode. |
| NRFY_STATIC_INLINE void nrfy_saadc_periph_configure | ( | NRF_SAADC_Type * | p_reg, |
| nrfy_saadc_config_t const * | p_config ) |
Function for configuring the SAADC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_config | Pointer to the peripheral configuration structure. |
| NRFY_STATIC_INLINE void nrfy_saadc_publish_clear | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to clear the configuration. |
| NRFY_STATIC_INLINE void nrfy_saadc_publish_set | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_event_t | event, | ||
| uint8_t | channel ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to set the configuration. |
| [in] | channel | Channel through which to publish the event. |
| NRFY_STATIC_INLINE nrf_saadc_resolution_t nrfy_saadc_resolution_get | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_resolution_set | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_resolution_t | resolution ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | resolution | Bit resolution. |
| NRFY_STATIC_INLINE void nrfy_saadc_sample_start | ( | NRF_SAADC_Type * | p_reg, |
| nrfy_saadc_buffer_t const * | p_desc ) |
Function for starting the SAADC sampling.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_desc | Pointer to the structure containing sampling buffer if the sampling is to be blocking. NULL for non-blocking operation. |
| NRFY_STATIC_INLINE void nrfy_saadc_shorts_disable | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Shortcuts to be disabled. |
| NRFY_STATIC_INLINE void nrfy_saadc_shorts_enable | ( | NRF_SAADC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Shortcuts to be enabled. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_shorts_get | ( | NRF_SAADC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_saadc_stop | ( | NRF_SAADC_Type * | p_reg, |
| bool | wait ) |
Function for stopping the SAADC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | wait | True if stopping is to be blocking, false otherwise. |
| NRFY_STATIC_INLINE void nrfy_saadc_subscribe_clear | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to clear the configuration. |
| NRFY_STATIC_INLINE void nrfy_saadc_subscribe_set | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_task_t | task, | ||
| uint8_t | channel ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to set the configuration. |
| [in] | channel | Channel through which to subscribe events. |
| NRFY_STATIC_INLINE uint32_t nrfy_saadc_task_address_get | ( | NRF_SAADC_Type const * | p_reg, |
| nrf_saadc_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | SAADC task. |
| NRFY_STATIC_INLINE void nrfy_saadc_task_trigger | ( | NRF_SAADC_Type * | p_reg, |
| nrf_saadc_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | SAADC task. |
| NRFY_STATIC_INLINE nrf_saadc_value_t nrfy_saadc_value_max_get | ( | nrf_saadc_resolution_t | resolution | ) |
The maximum value of the conversion result depends on the configured resolution.
| [in] | resolution | Bit resolution. |
| NRFY_STATIC_INLINE nrf_saadc_value_t nrfy_saadc_value_min_get | ( | nrf_saadc_resolution_t | resolution | ) |
The minimum value of the conversion result depends on the configured resolution.
| [in] | resolution | Bit resolution. |