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_regester_t regester, uint16_t data );
[Argument(s)]
I/O |
Argument |
Description |
I |
ad_sel_regester_t regester; |
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 |
[Return value]
Macro |
Description |
MD_OK |
Normal completion |
MD_ARGERROR |
Invalid argument specification |