R_12ADC_Set_ADChannel


Configures the analog voltage input pin for A/D conversion.

Remark

The value specified in argument channel is set to A/D channel select register A0 (ADANSA0) or A/D conversion extended input control register (ADEXICR).

[Syntax]

#include    "r_cg_macrodriver.h"
#include    "r_cg_12adc.h"
MD_STATUS   R_12ADC_Set_ADChannel ( ad_sel_register_t register, uint16_t data );

[Argument(s)]

I/O

Argument

Description

I

ad_sel_register_t  register;

Set to selected register

SEL_ADANSA0: A/D channel select register A0 (ADANSA0)

SEL_ADEXICR: A/D conversion extended input control register (ADEXICR)

 

I

uint16_t data;

Set to selected register value

 

Remark

See the header file r_cg_12adc.h for details about the analog voltage input pin ADCHANNELn.

[Return value]

 

Macro

Description

MD_OK

Normal completion

MD_ARGERROR

Invalid argument specification