AnsweredAssumed Answered

ADC_DRV_ConfigChan   function  use problem      

Question asked by 建宽高 on Sep 18, 2018
Latest reply on Sep 23, 2018 by 建宽高

when I USE ADC_DRV_ConfigChan   to config ADC ,  I have a problem about this function

 

This is the prototype of its function

/*!
* @brief Defines the control channel configuration
*
* This structure is used to configure a control channel
* of the ADC
*
* Implements : adc_chan_config_t_Class
*/
typedef struct
{
bool interruptEnable; /*!< Enable interrupts for this channel */
adc_inputchannel_t channel; /*!< Selection of input channel for measurement */
} adc_chan_config_t;

 

void ADC_DRV_ConfigChan(const uint32_t instance,const uint8_t chanIndex,const adc_chan_config_t *const config)

 

 

 

 

 

so,when i want to config adc chanel  11

 

so i use this

 

ADC_DRV_ConfigChan(XX,11,XX)

 

but it can not work !!!!

 

 

but i use this

 

adc_chan_config_t  test ={true,11}

 

ADC_DRV_ConfigChan(XX,XX,test )

 

it can work!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

 

so,why?  Configure which parameters the channel selects?

 

3Q

 

Outcomes