R_Adc_Readall() - Renesas RX110 Application Note

12-bit a/d converter support
Table of Contents

Advertisement

RX Family
3.5

R_ADC_ReadAll()

This function reads conversion results from all potential sources, enabled or not.
Format
adc_err_t R_ADC_ReadAll(adc_data_t * const
Parameters
p_data
Pointer to structure to load register values into.
An example structure for the register values is as follows:
typedef struct st_adc_data
{
uint16_t
chan[ADC_REG_ARRAY_MAX];
uint16_t
temp;
uint16_t
volt;
uint16_t
dbltrig;
uint16_t
self_diag;
} adc_data_t;
Return Values
ADC_SUCCESS:
ADC_ERR_MISSING_PTR:
Properties
Prototyped in file "r_s12ad_rx_if.h"
Description
Reads conversion results from all potential sources, enabled or not. This function is convenient for getting a
snapshot of all values at any point in time.
Reentrant
Yes.
Example
adc_data_t data;
:
/* Read all channel registers available on hardware */
R_ADC_ReadAll(&data);
Special Notes:
None.
R01AN1666EJ0220 Rev. 2.20
Dec 01, 2016
ADC Module Using Firmware Integration Technology
p_data);
See type adc_data_t in section 2.10 for the MCU being used
Success
p_data is FIT_NO_PTR/NULL
// "data" loaded with all conversion reg values
// chans/indexes used depends upon MCU
Page 68 of 74

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents