![]() |
Synergy Software Package User's Manual
|
#include <r_adc_api.h>
Data Fields | |
| ssp_err_t(* | open )(adc_ctrl_t *const p_ctrl, adc_cfg_t const *const p_cfg) |
| ssp_err_t(* | scanCfg )(adc_ctrl_t *const p_ctrl, adc_channel_cfg_t const *const p_channel_cfg) |
| ssp_err_t(* | scanStart )(adc_ctrl_t *const p_ctrl) |
| ssp_err_t(* | scanStop )(adc_ctrl_t *const p_ctrl) |
| ssp_err_t(* | scanStatusGet )(adc_ctrl_t *const p_ctrl) |
| ssp_err_t(* | read )(adc_ctrl_t *const p_ctrl, adc_register_t const reg_id, uint16_t *const p_data) |
| ssp_err_t(* | read32 )(adc_ctrl_t *const p_ctrl, adc_register_t const reg_id, uint32_t *const p_data) |
| ssp_err_t(* | sampleStateCountSet )(adc_ctrl_t *const p_ctrl, adc_sample_state_t *p_sample) |
| ssp_err_t(* | calibrate )(adc_ctrl_t *const p_ctrl, void *const p_extend) |
| ssp_err_t(* | offsetSet )(adc_ctrl_t *const p_ctrl, adc_register_t const reg_id, int32_t const offset) |
| ssp_err_t(* | close )(adc_ctrl_t *const p_ctrl) |
| ssp_err_t(* | infoGet )(adc_ctrl_t *const p_ctrl, adc_info_t *const p_adc_info) |
| ssp_err_t(* | versionGet )(ssp_version_t *const p_version) |
ADC functions implemented at the HAL layer will follow this API.
| ssp_err_t(* adc_api_t::calibrate) (adc_ctrl_t *const p_ctrl, void *const p_extend) |
Calibrate ADC or associated PGA (programmable gain amplifier). The driver may require implementation specific arguments to the p_extend input. Not supported for all implementations. See implementation for details.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_extend | Pointer to implementation specific arguments |
| ssp_err_t(* adc_api_t::close) (adc_ctrl_t *const p_ctrl) |
Close the specified ADC unit by ending any scan in progress, disabling interrupts, and removing power to the specified A/D unit.
| [in] | p_ctrl | Pointer to control handle structure |
| ssp_err_t(* adc_api_t::infoGet) (adc_ctrl_t *const p_ctrl, adc_info_t *const p_adc_info) |
Return the ADC data register address of the first (lowest number) channel and the total number of bytes to be read in order for the DTC/DMAC to read the conversion results of all configured channels. Return the temperature sensor calibration and slope data.
| [in] | p_ctrl | Pointer to control handle structure |
| [out] | p_adc_info | Pointer to ADC information structure |
| ssp_err_t(* adc_api_t::offsetSet) (adc_ctrl_t *const p_ctrl, adc_register_t const reg_id, int32_t const offset) |
Set offset for input PGA configured for differential input. Not supported for all implementations. See implementation for details.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | reg_id | ADC channel to read (see enumeration adc_register_t) |
| [in] | offset | See implementation for details. |
| ssp_err_t(* adc_api_t::open) (adc_ctrl_t *const p_ctrl, adc_cfg_t const *const p_cfg) |
Initialize ADC Unit; apply power, set the operational mode, trigger sources, interrupt priority, and configurations common to all channels and sensors.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_cfg | Pointer to configuration structure |
| ssp_err_t(* adc_api_t::read) (adc_ctrl_t *const p_ctrl, adc_register_t const reg_id, uint16_t *const p_data) |
Read ADC conversion result.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | reg_id | ADC channel to read (see enumeration adc_register_t) |
| [in] | p_data | Pointer to variable to load value into. |
| ssp_err_t(* adc_api_t::read32) (adc_ctrl_t *const p_ctrl, adc_register_t const reg_id, uint32_t *const p_data) |
Read ADC conversion result into a 32-bit word.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | reg_id | ADC channel to read (see enumeration adc_register_t) |
| [in] | p_data | Pointer to variable to load value into. |
| ssp_err_t(* adc_api_t::sampleStateCountSet) (adc_ctrl_t *const p_ctrl, adc_sample_state_t *p_sample) |
Set the sample state count for the specified channel. Not supported for all implementations. See implementation for details.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_sample | Pointer to the ADC channels and corresponding sample states to be set |
| ssp_err_t(* adc_api_t::scanCfg) (adc_ctrl_t *const p_ctrl, adc_channel_cfg_t const *const p_channel_cfg) |
Configure the scan including the channels, groups and scan triggers to be used for the unit that was initialized in the open call. Some configurations are not supported for all implementations. See implementation for details.
| [in] | p_ctrl | Pointer to control handle structure |
| [in] | p_channel_cfg | Pointer to scan configuration structure |
| ssp_err_t(* adc_api_t::scanStart) (adc_ctrl_t *const p_ctrl) |
Start the scan (in case of a software trigger), or enable the hardware trigger.
| [in] | p_ctrl | Pointer to control handle structure |
| ssp_err_t(* adc_api_t::scanStatusGet) (adc_ctrl_t *const p_ctrl) |
Check scan status.
| [in] | p_ctrl | Pointer to control handle structure |
| ssp_err_t(* adc_api_t::scanStop) (adc_ctrl_t *const p_ctrl) |
Stop the ADC scan (in case of a software trigger), or disable the hardware trigger.
| [in] | p_ctrl | Pointer to control handle structure |
| ssp_err_t(* adc_api_t::versionGet) (ssp_version_t *const p_version) |
Retrieve the API version.
| [in] | p_version | Pointer to version structure |