Configures the analog voltage input pin for A/D conversion.
Remark The value specified in argument channel is set to analog input channel specification register (ADS).
[Syntax]
#include “r_cg_macrodriver.h”
#include “r_cg_adc.h”
MD_STATUS R_ADC_Set_ADChannel ( ad_channel_t channel );
[Argument(s)]
I/O |
Argument |
Description |
I |
ad_channel_t channel; |
Analog voltage input pin ADCHANNELn: Input pin |
Remark See the header file r_cg_adc.h for details about the analog voltage input pin ADCHANNELn.
[Return value]
Macro |
Description |
MD_OK |
Normal completion |
MD_ARGERROR |
Invalid argument specification |