I add the .c and .h file, but always error? Why?
I add the .c and .h file, but always error? Why?
nrf_drv_adc_sample_convert(&m_channel_config,&adc_value);
this function in nrf_drv_adc.h nrf_drv_adc.c
Hi ligang,
You need to enable the ADC in sdk_config.h
There are two way to enable ADC on Keil
For No.1 you need to modify the code in sdk_config.h as below
//==========================================================
// <e> ADC_ENABLED - nrf_drv_adc - Driver for ADC peripheral (nRF51)
//==========================================================
#ifndef ADC_ENABLED
#define ADC_ENABLED 1
#endif
For No.2 Select "Configuration wizard tab" after select sdk_config.h
See below picture it is better way for understanding.