This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I think there are none error,but always error?

image description

image description

image description

image description

I add the .c and .h file, but always error? Why?

Parents
  • Hi ligang,

    You need to enable the ADC in sdk_config.h

    There are two way to enable ADC on Keil

    1. Change the code directly
    2. Check checkbox in configuration wizard

    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. image description

Reply
  • Hi ligang,

    You need to enable the ADC in sdk_config.h

    There are two way to enable ADC on Keil

    1. Change the code directly
    2. Check checkbox in configuration wizard

    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. image description

Children
No Data
Related