nrfx 3.3
Data Structures | Functions
SAADC HALY

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...
 

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_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_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_tnrfy_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 void nrfy_saadc_burst_set (NRF_SAADC_Type *p_reg, uint8_t channel, nrf_saadc_burst_t burst)
 
NRFY_STATIC_INLINE int16_t nrfy_saadc_value_min_get (nrf_saadc_resolution_t resolution)
 
NRFY_STATIC_INLINE int16_t nrfy_saadc_value_max_get (nrf_saadc_resolution_t resolution)
 

Detailed Description

Hardware access layer with cache and barrier support for managing the SAADC peripheral.

Function Documentation

◆ nrfy_saadc_abort()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_descPointer to the structure containing sampling buffer if the abort is to be blocking. NULL for non-blocking operation.

◆ nrfy_saadc_amount_get()

NRFY_STATIC_INLINE uint16_t nrfy_saadc_amount_get ( NRF_SAADC_Type const *  p_reg)
See also
nrf_saadc_amount_get Function for getting the number of samples written to the result buffer since the previous START task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Number of 8-bit or 16-bit samples written to the buffer.

◆ nrfy_saadc_buffer_init()

NRFY_STATIC_INLINE void nrfy_saadc_buffer_init ( NRF_SAADC_Type *  p_reg,
nrf_saadc_value_t p_buffer,
uint32_t  size 
)
See also
nrf_saadc_buffer_init Function for initializing the SAADC result buffer.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the result buffer.
[in]sizeSize of the buffer (in 8-bit or 16-bit samples).

◆ nrfy_saadc_buffer_latch()

NRFY_STATIC_INLINE void nrfy_saadc_buffer_latch ( NRF_SAADC_Type *  p_reg,
bool  wait 
)

Function for latching the SAADC sampling buffer.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]waitTrue if latching is to be blocking, false otherwise.

◆ nrfy_saadc_buffer_pointer_get()

NRFY_STATIC_INLINE nrf_saadc_value_t * nrfy_saadc_buffer_pointer_get ( NRF_SAADC_Type const *  p_reg)
See also
nrf_saadc_buffer_pointer_get Function for getting the SAADC result buffer pointer.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to the result buffer.

◆ nrfy_saadc_buffer_pointer_set()

NRFY_STATIC_INLINE void nrfy_saadc_buffer_pointer_set ( NRF_SAADC_Type *  p_reg,
nrf_saadc_value_t p_buffer 
)
See also
nrf_saadc_buffer_pointer_set Function for setting the SAADC result buffer pointer.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the result buffer.

◆ nrfy_saadc_buffer_set()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_descPointer to the structure containing sampling buffer description.
[in]latchTrue if buffer is to be latched, false otherwise.
[in]waitTrue if latching is to be blocking, false otherwise.

◆ nrfy_saadc_burst_set()

NRFY_STATIC_INLINE void nrfy_saadc_burst_set ( NRF_SAADC_Type *  p_reg,
uint8_t  channel,
nrf_saadc_burst_t  burst 
)
See also
nrf_saadc_burst_set Function for configuring the burst mode for the specified channel.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]channelChannel number.
[in]burstBurst mode setting.

◆ nrfy_saadc_busy_check()

NRFY_STATIC_INLINE bool nrfy_saadc_busy_check ( NRF_SAADC_Type const *  p_reg)
See also
nrf_saadc_busy_check Function for checking whether the SAADC is busy.

This function checks whether the analog-to-digital converter is busy with a conversion.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe SAADC is busy.
falseThe SAADC is not busy.

◆ nrfy_saadc_calibrate()

NRFY_STATIC_INLINE void nrfy_saadc_calibrate ( NRF_SAADC_Type *  p_reg,
bool  wait 
)

Function for calibrating the SAADC.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]waitTrue if calibration is to be blocking, false otherwise.

◆ nrfy_saadc_channel_configure()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]channelChannel number.
[in]p_configPointer to the channel configuration structure. NULL if configuration is to be omitted.
[in]p_inputPointer to the channel input configuration structure. NULL if configuration is to be omitted.

◆ nrfy_saadc_channel_init()

NRFY_STATIC_INLINE void nrfy_saadc_channel_init ( NRF_SAADC_Type *  p_reg,
uint8_t  channel,
nrf_saadc_channel_config_t const *  config 
)
See also
nrf_saadc_channel_init Function for initializing the SAADC channel.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]channelChannel number.
[in]configPointer to the channel configuration structure.

◆ nrfy_saadc_channel_input_set()

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 
)
See also
nrf_saadc_channel_input_set Function for configuring the input pins for the specified SAADC channel.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]channelChannel number.
[in]pselpPositive input.
[in]pselnNegative input. Set to NRF_SAADC_INPUT_DISABLED in single ended mode.

◆ nrfy_saadc_channel_limits_set()

NRFY_STATIC_INLINE void nrfy_saadc_channel_limits_set ( NRF_SAADC_Type *  p_reg,
uint8_t  channel,
int16_t  low,
int16_t  high 
)
See also
nrf_saadc_channel_limits_set Function for setting the SAADC channel monitoring limits.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]channelChannel number.
[in]lowLow limit.
[in]highHigh limit.

◆ nrfy_saadc_channel_pos_input_set()

NRFY_STATIC_INLINE void nrfy_saadc_channel_pos_input_set ( NRF_SAADC_Type *  p_reg,
uint8_t  channel,
nrf_saadc_input_t  pselp 
)
See also
nrf_saadc_channel_pos_input_set Function for configuring the positive input pin for the specified SAADC channel.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]channelChannel number.
[in]pselpPositive input.

◆ nrfy_saadc_continuous_mode_disable()

NRFY_STATIC_INLINE void nrfy_saadc_continuous_mode_disable ( NRF_SAADC_Type *  p_reg)
See also
nrf_saadc_continuous_mode_disable Function for disabling the continuous sampling.

New samples can still be acquired by manually triggering the SAMPLE task or by PPI.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_saadc_continuous_mode_enable()

NRFY_STATIC_INLINE void nrfy_saadc_continuous_mode_enable ( NRF_SAADC_Type *  p_reg,
uint16_t  cc 
)
See also
nrf_saadc_continuous_mode_enable Function for enabling the continuous sampling.

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.

Note
The internal timer can only be used when a single input channel is enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]ccCapture and compare value. Sample rate is 16 MHz/cc. Valid CC range is from 80 to 2047.

◆ nrfy_saadc_continuous_mode_enable_check()

NRFY_STATIC_INLINE bool nrfy_saadc_continuous_mode_enable_check ( NRF_SAADC_Type const *  p_reg)
See also
nrf_saadc_continuous_mode_enable_check Function for checking if the continuous sampling is enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe continuous sampling is enabled.
falseThe continuous sampling is disabled.

◆ nrfy_saadc_disable()

NRFY_STATIC_INLINE void nrfy_saadc_disable ( NRF_SAADC_Type *  p_reg)
See also
nrf_saadc_disable Function for disabling the SAADC.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_saadc_enable()

NRFY_STATIC_INLINE void nrfy_saadc_enable ( NRF_SAADC_Type *  p_reg)
See also
nrf_saadc_enable Function for enabling the SAADC.

The analog-to-digital converter must be enabled before use.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_saadc_enable_check()

NRFY_STATIC_INLINE bool nrfy_saadc_enable_check ( NRF_SAADC_Type const *  p_reg)
See also
nrf_saadc_enable_check Function for checking if the SAADC is enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe SAADC is enabled.
falseThe SAADC is not enabled.

◆ nrfy_saadc_event_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_saadc_event_address_get ( NRF_SAADC_Type const *  p_reg,
nrf_saadc_event_t  event 
)
See also
nrf_saadc_event_address_get Function for getting the address of the specified SAADC event register.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventSAADC event.
Returns
Address of the specified SAADC event.

◆ nrfy_saadc_event_check()

NRFY_STATIC_INLINE bool nrfy_saadc_event_check ( NRF_SAADC_Type const *  p_reg,
nrf_saadc_event_t  event 
)
See also
nrf_saadc_event_check Function for retrieving the state of the SAADC event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrfy_saadc_event_clear()

NRFY_STATIC_INLINE void nrfy_saadc_event_clear ( NRF_SAADC_Type *  p_reg,
nrf_saadc_event_t  event 
)
See also
nrf_saadc_event_clear Function for clearing the specific SAADC event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventSAADC event.

◆ nrfy_saadc_events_process()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK().
[in]p_descPointer to the structure containing buffer associated with the last sampling. Can be NULL.
Returns
Mask of events that were generated and processed. To be checked against the result of NRFY_EVENT_TO_INT_BITMASK().

◆ nrfy_saadc_int_disable()

NRFY_STATIC_INLINE void nrfy_saadc_int_disable ( NRF_SAADC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_saadc_int_disable Function for disabling specified interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_saadc_int_mask_t values for bit masking.

◆ nrfy_saadc_int_enable()

NRFY_STATIC_INLINE void nrfy_saadc_int_enable ( NRF_SAADC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_saadc_int_enable Function for enabling specified SAADC interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_saadc_int_mask_t values for bit masking.

◆ nrfy_saadc_int_enable_check()

NRFY_STATIC_INLINE uint32_t nrfy_saadc_int_enable_check ( NRF_SAADC_Type const *  p_reg,
uint32_t  mask 
)
See also
nrf_saadc_int_enable_check Function for checking if the specified interrupts are enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_saadc_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrfy_saadc_int_init()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be initialized.
[in]irq_priorityInterrupt priority.
[in]enableTrue if the interrupts are to be enabled, false otherwise.

◆ nrfy_saadc_int_set()

NRFY_STATIC_INLINE void nrfy_saadc_int_set ( NRF_SAADC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_saadc_int_set Function for setting the configuration of SAADC interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskInterrupts configuration to be set. Use nrf_saadc_int_mask_t values for bit masking.

◆ nrfy_saadc_int_uninit()

NRFY_STATIC_INLINE void nrfy_saadc_int_uninit ( NRF_SAADC_Type *  p_reg)

Function for uninitializing the SAADC interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_saadc_limit_event_get()

NRFY_STATIC_INLINE nrf_saadc_event_t nrfy_saadc_limit_event_get ( uint8_t  channel,
nrf_saadc_limit_t  limit_type 
)
See also
nrf_saadc_limit_event_get Function for getting the SAADC channel monitoring limit events.
Parameters
[in]channelChannel number.
[in]limit_typeLow limit or high limit.
Returns
The SAADC channel monitoring limit event.

◆ nrfy_saadc_limit_int_get()

NRFY_STATIC_INLINE uint32_t nrfy_saadc_limit_int_get ( uint8_t  channel,
nrf_saadc_limit_t  limit_type 
)
See also
nrf_saadc_limit_int_get Function for generating masks for SAADC channel limit interrupts.
Parameters
[in]channelSAADC channel number.
[in]limit_typeLimit type.
Returns
Interrupt mask.

◆ nrfy_saadc_oversample_get()

NRFY_STATIC_INLINE nrf_saadc_oversample_t nrfy_saadc_oversample_get ( NRF_SAADC_Type const *  p_reg)
See also
nrf_saadc_oversample_get Function for getting the oversampling feature configuration.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Oversampling configuration.

◆ nrfy_saadc_oversample_sample_count_get()

NRFY_STATIC_INLINE uint32_t nrfy_saadc_oversample_sample_count_get ( nrf_saadc_oversample_t  oversample)
See also
nrf_saadc_oversample_sample_count_get Function for getting the sample count needed for one averaged result for a given oversampling configuration.
Parameters
[in]oversampleOversampling configuration.
Returns
Sample count.

◆ nrfy_saadc_oversample_set()

NRFY_STATIC_INLINE void nrfy_saadc_oversample_set ( NRF_SAADC_Type *  p_reg,
nrf_saadc_oversample_t  oversample 
)
See also
nrf_saadc_oversample_set Function for configuring the oversampling feature.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]oversampleOversampling mode.

◆ nrfy_saadc_periph_configure()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the peripheral configuration structure.

◆ nrfy_saadc_publish_clear()

NRFY_STATIC_INLINE void nrfy_saadc_publish_clear ( NRF_SAADC_Type *  p_reg,
nrf_saadc_event_t  event 
)
See also
nrf_saadc_publish_clear Function for clearing the publish configuration for a given SAADC event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrfy_saadc_publish_set()

NRFY_STATIC_INLINE void nrfy_saadc_publish_set ( NRF_SAADC_Type *  p_reg,
nrf_saadc_event_t  event,
uint8_t  channel 
)
See also
nrf_saadc_publish_set Function for setting the publish configuration for a given SAADC event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrfy_saadc_resolution_get()

NRFY_STATIC_INLINE nrf_saadc_resolution_t nrfy_saadc_resolution_get ( NRF_SAADC_Type const *  p_reg)
See also
nrf_saadc_resolution_get Function for getting the SAADC sample resolution.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Sample resolution.

◆ nrfy_saadc_resolution_set()

NRFY_STATIC_INLINE void nrfy_saadc_resolution_set ( NRF_SAADC_Type *  p_reg,
nrf_saadc_resolution_t  resolution 
)
See also
nrf_saadc_resolution_set Function for setting the SAADC sample resolution.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]resolutionBit resolution.

◆ nrfy_saadc_sample_start()

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_descPointer to the structure containing sampling buffer if the sampling is to be blocking. NULL for non-blocking operation.

◆ nrfy_saadc_stop()

NRFY_STATIC_INLINE void nrfy_saadc_stop ( NRF_SAADC_Type *  p_reg,
bool  wait 
)

Function for stopping the SAADC.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]waitTrue if stopping is to be blocking, false otherwise.

◆ nrfy_saadc_subscribe_clear()

NRFY_STATIC_INLINE void nrfy_saadc_subscribe_clear ( NRF_SAADC_Type *  p_reg,
nrf_saadc_task_t  task 
)
See also
nrf_saadc_subscribe_clear Function for clearing the subscribe configuration for a given SAADC task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrfy_saadc_subscribe_set()

NRFY_STATIC_INLINE void nrfy_saadc_subscribe_set ( NRF_SAADC_Type *  p_reg,
nrf_saadc_task_t  task,
uint8_t  channel 
)
See also
nrf_saadc_subscribe_set Function for setting the subscribe configuration for a given SAADC task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrfy_saadc_task_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_saadc_task_address_get ( NRF_SAADC_Type const *  p_reg,
nrf_saadc_task_t  task 
)
See also
nrf_saadc_task_address_get Function for getting the address of the specified SAADC task register.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskSAADC task.
Returns
Address of the specified SAADC task.

◆ nrfy_saadc_task_trigger()

NRFY_STATIC_INLINE void nrfy_saadc_task_trigger ( NRF_SAADC_Type *  p_reg,
nrf_saadc_task_t  task 
)
See also
nrf_saadc_task_trigger Function for triggering the specified SAADC task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskSAADC task.

◆ nrfy_saadc_value_max_get()

NRFY_STATIC_INLINE int16_t nrfy_saadc_value_max_get ( nrf_saadc_resolution_t  resolution)
See also
nrf_saadc_value_max_get Function for getting the maximum value of the conversion result.

The maximum value of the conversion result depends on the configured resolution.

Parameters
[in]resolutionBit resolution.
Returns
Maximum value of the conversion result.

◆ nrfy_saadc_value_min_get()

NRFY_STATIC_INLINE int16_t nrfy_saadc_value_min_get ( nrf_saadc_resolution_t  resolution)
See also
nrf_saadc_value_min_get Function for getting the minimum value of the conversion result.

The minimum value of the conversion result depends on the configured resolution.

Parameters
[in]resolutionBit resolution.
Returns
Minimum value of the conversion result.

Documentation feedback | Developer Zone | Subscribe | Updated