ADC#
Modules#
Enumerations#
Enumeration for ADC input type.
Enumeration for ADC operation mode.
Enumeration for ADC DMA type.
Enumeration for ADC multiple channel selection.
Enumeration for ADC external trigger type.
Enumeration for ADC external trigger number.
Enumeration for ADC external trigger edge selection.
Enumeration for ADC external trigger selection.
Enumeration for ADC channel.
Typedefs#
Renamed ADC channel configuration structure.
Renamed ADC configuration structure.
Renamed ADC internal configuration structure.
Renamed ADC external trigger configuration structure.
Typedef for the function pointer of the callback function.
Functions#
Configure the ADC clock.
Initialize the ADC peripheral.
Configure ADC channel parameters.
Register the user callback function.
Un-register the user callback function.
Configure the ADC external trigger.
Configure the ADC sampling rate for ADC channels.
Read the ADC external trigger status.
Clear the ADC external trigger status.
Configure the ADC ping and pong memory location and length.
Enable ping pong for corresponding ADC channels.
Disable ping pong for corresponding ADC channels.
Enable internal DMA for corresponding ADC channels.
Disable internal dma channel for corresponding ADC channels.
Configure the ADC in Static Mode.
Configure the ADC in FIFO Mode.
Enable the ADC channel.
Disable the ADC channel.
Set to Power On and off for ADC.
Enable or Disable Noise averaging mode.
Enable temp-sensor for ADC.
Configuring ADC fifo threshold.
Configure the ADC threshold to compare threshold value with ADC data.
Read the ADC samples when ulp memories are used.
Read the ADC samples when static mode is enabled.
Read the ADC sampling rate when static mode is enabled.
De-initialize the ADC.
Start the ADC operation.
Stop the ADC operation.
Get the release, sqa and dev version of ADC.
Macros#
Enumeration Documentation#
sl_adc_input_type_typedef_t#
sl_adc_input_type_typedef_t
Enumeration for ADC input type.
Enumerator | |
---|---|
SL_ADC_SINGLE_ENDED | Input type single ended. |
SL_ADC_DIFFERENTIAL | Input type differential. |
SL_ADC_INPUT_TYPE_LAST | Last member of enum for validation. |
67
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_operation_mode_typedef_t#
sl_adc_operation_mode_typedef_t
Enumeration for ADC operation mode.
Enumerator | |
---|---|
SL_ADC_FIFO_MODE | operation mode as fifo mode |
SL_ADC_STATIC_MODE | operation mode as static mode |
SL_ADC_OPERATION_MODE_LAST | Last member of enum for validation. |
74
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_dma_type_typedef_t#
sl_adc_dma_type_typedef_t
Enumeration for ADC DMA type.
Enumerator | |
---|---|
SL_ADC_INTERNAL_DMA | Internal DMA type. |
SL_ADC_EXTERNAL_DMA | External DMA type. |
SL_ADC_DMA_TYPE_LAST | Last member of enum for validation. |
81
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_channel_type_typedef_t#
sl_adc_channel_type_typedef_t
Enumeration for ADC multiple channel selection.
Enumerator | |
---|---|
SL_ADC_SINGLE_CHNL | Dynamic mode disable. |
SL_ADC_MULTI_CHNL | Dynamic mode enable. |
SL_ADC_CHANNEL_TYPE_LAST | Last member of enum for validation. |
88
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_ext_trigger_type_t#
sl_adc_ext_trigger_type_t
Enumeration for ADC external trigger type.
Enumerator | |
---|---|
SL_ULP_TIMER_EXT_TRIGGER | ULP timer external trigger type. |
SL_ULP_GPIO_EXT_TRIGGER | ULP gpio external trigger type. |
SL_M4_CT_EXT_TRIGGER | M4 CT external trigger type. |
SL_ADC_EXT_TRIGGER_TYPE_LAST | Last member of enum for validation. |
95
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_ext_trigger_num_t#
sl_adc_ext_trigger_num_t
Enumeration for ADC external trigger number.
Enumerator | |
---|---|
SL_ADC_EXT_TRIGGER_1 | External trigger detection 1. |
SL_ADC_EXT_TRIGGER_2 | External trigger detection 2. |
SL_ADC_EXT_TRIGGER_3 | External trigger detection 3. |
SL_ADC_EXT_TRIGGER_4 | External trigger detection 4. |
SL_ADC_EXT_TRIGGER_LAST | Last member of enum for validation. |
103
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_ext_trigger_edge_t#
sl_adc_ext_trigger_edge_t
Enumeration for ADC external trigger edge selection.
Enumerator | |
---|---|
SL_ADC_EXT_TRIGGER_POS_EDGE | External trigger positive edge. |
SL_ADC_EXT_TRIGGER_NEG_EDGE | External trigger negative edge. |
SL_ADC_EXT_TRIGGER_POS_NEG_EDGE | External trigger positive and negative edge. |
SL_ADC_EXT_TRIGGER_EDGE_LAST | Last member of enum for validation. |
112
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_ext_trigger_sel_t#
sl_adc_ext_trigger_sel_t
Enumeration for ADC external trigger selection.
Enumerator | |
---|---|
SL_ADC_EXT_TRIGGER_SEL_1 | External trigger selection 1. |
SL_ADC_EXT_TRIGGER_SEL_2 | External trigger selection 2. |
SL_ADC_EXT_TRIGGER_SEL_3 | External trigger selection 3. |
SL_ADC_EXT_TRIGGER_SEL_4 | External trigger selection 4. |
SL_ADC_EXT_TRIGGER_SEL_LAST | Last member of enum for validation. |
120
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_channel_id_t#
sl_adc_channel_id_t
Enumeration for ADC channel.
Enumerator | |
---|---|
SL_ADC_CHANNEL_0 | ADC channel 1. |
SL_ADC_CHANNEL_1 | ADC channel 2. |
SL_ADC_CHANNEL_2 | ADC channel 3. |
SL_ADC_CHANNEL_3 | ADC channel 4. |
SL_ADC_CHANNEL_4 | ADC channel 5. |
SL_ADC_CHANNEL_5 | ADC channel 6. |
SL_ADC_CHANNEL_6 | ADC channel 7. |
SL_ADC_CHANNEL_7 | ADC channel 8. |
SL_ADC_CHANNEL_8 | ADC channel 9. |
SL_ADC_CHANNEL_9 | ADC channel 10. |
SL_ADC_CHANNEL_10 | ADC channel 11. |
SL_ADC_CHANNEL_11 | ADC channel 12. |
SL_ADC_CHANNEL_12 | ADC channel 13. |
SL_ADC_CHANNEL_13 | ADC channel 14. |
SL_ADC_CHANNEL_14 | ADC channel 15. |
SL_ADC_CHANNEL_15 | ADC channel 16. |
129
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
Typedef Documentation#
sl_adc_channel_config_t#
typedef adc_ch_config_t sl_adc_channel_config_t
Renamed ADC channel configuration structure.
50
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_config_t#
typedef adc_config_t sl_adc_config_t
Renamed ADC configuration structure.
51
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_internal_config_t#
typedef adc_inter_config_t sl_adc_internal_config_t
Renamed ADC internal configuration structure.
52
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_external_config_t#
typedef adc_extr_config_t sl_adc_external_config_t
Renamed ADC external trigger configuration structure.
53
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_adc_callback_t#
typedef void(* sl_adc_callback_t) (uint8_t channel, uint8_t event) )(uint8_t channel, uint8_t event)
Typedef for the function pointer of the callback function.
58
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
Function Documentation#
sl_si91x_adc_configure_clock#
sl_status_t sl_si91x_adc_configure_clock (sl_adc_clock_config_t * clock_configuration)
Configure the ADC clock.
[in] | clock_configuration | : clock structure variables |
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_FAIL (0x0001) - The function is failed
SL_STATUS_NOT_INITIALIZED (0x0011) - Clock is not initialized
191
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_init#
sl_status_t sl_si91x_adc_init (sl_adc_channel_config_t adc_channel_config, sl_adc_config_t adc_config, float vref_value)
Initialize the ADC peripheral.
[in] | adc_channel_config | : ADC channels configuration structure variable. |
[in] | adc_config | : ADC operation configuration structure variable. |
[in] | vref_value | : Reference voltage. |
Pre-conditions:
sl_si91x_adc_configure_clock - Only for FIFO mode on M4 state
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_BUSY (0x0004) - The function is already active
SL_STATUS_INVALID_COUNT (0x002B) - Mismatch count
SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range
210
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_set_channel_configuration#
sl_status_t sl_si91x_adc_set_channel_configuration (sl_adc_channel_config_t adc_channel_config, sl_adc_config_t adc_config)
Configure ADC channel parameters.
[in] | adc_channel_config | : ADC channels configuration structure variable. |
[in] | adc_config | : ADC operation configuration structure variable. |
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range
228
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_register_event_callback#
sl_status_t sl_si91x_adc_register_event_callback (sl_adc_callback_t callback_event)
Register the user callback function.
[in] | callback_event | Pointer to the function which needs to be called at the time of interrupt |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
SL_STATUS_BUSY (0x0004) - Driver is busy
247
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_unregister_event_callback#
void sl_si91x_adc_unregister_event_callback (void )
Un-register the user callback function.
[in] |
Pre-conditions:
Returns
none
258
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_configure_external_trigger#
sl_status_t sl_si91x_adc_configure_external_trigger (sl_adc_external_config_t adc_external_trigger)
Configure the ADC external trigger.
[in] | adc_external_trigger | : ADC external trigger configuration structure variable. |
This API is used to mux select to choose between ulp_timer, ulp_gpio, M4_timer based on this detection edge and channel trigger will interrupt.
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
280
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_configure_channel_sampling_rate#
sl_status_t sl_si91x_adc_configure_channel_sampling_rate (sl_adc_internal_config_t adc_internal_config, uint8_t channel_num)
Configure the ADC sampling rate for ADC channels.
[in] | adc_internal_config | : Channel offset and frequency for each channel to set sampling rate. |
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Returns
sl_status_t : Returns 'SL_STATUS_OK' on successful execution.
294
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_get_external_trigger_status#
sl_status_t sl_si91x_adc_get_external_trigger_status (sl_adc_external_config_t adc_external_trigger, uint8_t * ext_trigger)
Read the ADC external trigger status.
[in] | adc_external_trigger | : ADC external trigger configuration structure variable. |
[in] | ext_trigger | : The status of external trigger will be store in this. |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
316
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_clear_external_trigger#
sl_status_t sl_si91x_adc_clear_external_trigger (sl_adc_external_config_t adc_external_trigger)
Clear the ADC external trigger status.
[in] | adc_external_trigger | : ADC external trigger configuration structure variable. |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
337
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_configure_ping_pong_memory_address#
sl_status_t sl_si91x_adc_configure_ping_pong_memory_address (sl_adc_internal_config_t adc_internal_config, uint8_t channel_num)
Configure the ADC ping and pong memory location and length.
[in] | adc_internal_config | : ADC internal trigger configuration structure variable. |
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
353
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_enable_ping_pong#
sl_status_t sl_si91x_adc_enable_ping_pong (uint8_t channel_num)
Enable ping pong for corresponding ADC channels.
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
371
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_disable_ping_pong#
sl_status_t sl_si91x_adc_disable_ping_pong (uint8_t channel_num)
Disable ping pong for corresponding ADC channels.
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
392
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_internal_per_channel_dma_enable#
sl_status_t sl_si91x_adc_internal_per_channel_dma_enable (uint8_t channel_num)
Enable internal DMA for corresponding ADC channels.
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
409
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_internal_per_channel_dma_disable#
sl_status_t sl_si91x_adc_internal_per_channel_dma_disable (uint8_t channel_num)
Disable internal dma channel for corresponding ADC channels.
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
430
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_configure_static_mode#
sl_status_t sl_si91x_adc_configure_static_mode (sl_adc_channel_config_t adc_channel_config, uint8_t channel_num)
Configure the ADC in Static Mode.
[in] | adc_channel_config | : ADC channels configuration structure variable. |
N/A | channel_num |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range
454
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_configure_fifo_mode#
sl_status_t sl_si91x_adc_configure_fifo_mode (sl_adc_channel_config_t adc_channel_config, uint8_t channel_num)
Configure the ADC in FIFO Mode.
[in] | adc_channel_config | : ADC channels configuration structure variable. |
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range
479
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_channel_enable#
sl_status_t sl_si91x_adc_channel_enable (uint8_t channel_num)
Enable the ADC channel.
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
494
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_channel_disable#
sl_status_t sl_si91x_adc_channel_disable (uint8_t channel_num)
Disable the ADC channel.
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
513
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_set_power_mode#
sl_status_t sl_si91x_adc_set_power_mode (POWER_STATE state)
Set to Power On and off for ADC.
[in] | state | : ADC_POWER_ON - To powerup adc powergates, ADC_POWER_OFF - To powerdown adc powergates |
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful,
SL_STATUS_OK (0x0000) - Success
528
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_set_noise_average_mode#
sl_status_t sl_si91x_adc_set_noise_average_mode (boolean_t state)
Enable or Disable Noise averaging mode.
[in] | state | : 1 - To enable noise averaging mode, 0 - To disable noise averaging mode |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
Returns 'SL_STATUS_OK' on successful execution.
544
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_temperature_sensor_enable#
sl_status_t sl_si91x_adc_temperature_sensor_enable (void )
Enable temp-sensor for ADC.
[in] |
Pre-conditions:
Pre-conditions:
Returns
Returns 'SL_STATUS_OK' on successful execution.
557
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_fifo_threshold_configuration#
sl_status_t sl_si91x_adc_fifo_threshold_configuration (sl_adc_config_t adc_config, sl_adc_fifo_thrld_config_t adc_fifo_threshold)
Configuring ADC fifo threshold.
[in] | adc_config | : ADC operation configuration structure variable. |
[in] | adc_fifo_threshold | : ADC fifo structure variable like aempty fifo, afull fifo threshold level. |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range
576
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_threshold_configuration#
sl_status_t sl_si91x_adc_threshold_configuration (sl_adc_threshold_config_t adc_threshold)
Configure the ADC threshold to compare threshold value with ADC data.
[in] | adc_threshold | : ADC threshold configuration structure variables. |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
Returns 'SL_STATUS_OK' on successful execution.
594
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_read_data#
sl_status_t sl_si91x_adc_read_data (sl_adc_channel_config_t adcchconfig, uint8_t channel_num)
Read the ADC samples when ulp memories are used.
[in] | adcchconfig | : ADC channels configuration structure variable. |
[in] | channel_num | channel_num : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range
615
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_read_data_static#
sl_status_t sl_si91x_adc_read_data_static (sl_adc_channel_config_t adc_channel_config, sl_adc_config_t adc_config, uint16_t * adc_value)
Read the ADC samples when static mode is enabled.
[in] | adc_channel_config | : ADC channels configuration structure variable. |
[in] | adc_config | : Store the reading data on adc_value. |
N/A | adc_value |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
SL_STATUS_INVALID_RANGE (0x0028) - Mismatch Range
636
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_get_sampling_rate#
uint32_t sl_si91x_adc_get_sampling_rate (uint8_t channel_num)
Read the ADC sampling rate when static mode is enabled.
[in] | channel_num | : Channel number |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
Returns sampling rate what it get from register
655
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_deinit#
sl_status_t sl_si91x_adc_deinit (sl_adc_config_t adc_config)
De-initialize the ADC.
[in] | adc_config | : ADC operation configuration structure variable. |
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
670
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_start#
sl_status_t sl_si91x_adc_start (sl_adc_config_t adc_config)
Start the ADC operation.
[in] | adc_config | : ADC operation configuration structure variable. |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
687
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_stop#
sl_status_t sl_si91x_adc_stop (sl_adc_config_t adc_config)
Stop the ADC operation.
[in] | adc_config | : ADC operation configuration structure variable. |
Pre-conditions:
Pre-conditions:
Pre-conditions:
Pre-conditions:
Returns
status 0 if successful, else error code as follow
SL_STATUS_OK (0x0000) - Success
SL_STATUS_INVALID_PARAMETER (0x0021) - Parameters are invalid
706
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
sl_si91x_adc_get_version#
sl_adc_version_t sl_si91x_adc_get_version (void )
Get the release, sqa and dev version of ADC.
[in] |
Returns
(sl_adc_version_t) type structure
714
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
Macro Definition Documentation#
SL_INTERNAL_DMA#
#define SL_INTERNAL_DMAValue:
INTERNAL_DMA
62
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
SL_ADC_STATIC_MODE_EVENT#
#define SL_ADC_STATIC_MODE_EVENTValue:
ADC_STATIC_MODE_CALLBACK
63
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h
SIGN_BIT#
#define SIGN_BITValue:
BIT(11)
64
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_adc.h