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

peripheral legacy layer config overriding the new peripheral config

when I have the line

#define SAADC_ENABLED 0
in my sdk_config.h, it overrides the
#define NRFX_SAADC_ENABLED 1
and I end up with undefined reference errors.

right now I had to comment out the

#define SAADC_ENABLED 0
line to be able to compile the code.

what's the right way to do this

I'm using GCC 6.3.1

Thanks

Parents Reply Children
  • Hi Simon,

    thank you for your answer.

    are you saying that the new NRFX defines in sdk_config.h are not working and we should basically keep using the legacy ones?

    Thanks

    Anis

  • No, they are working. But currently the SDK is set up to use the legacy definitions, and that's the easiest approach. Let's use a silly analogy: Imagine a country with a president and a vice-president. Then the president will always have the last word and everybody listens to him, and not the vice. However, if the president is gone, everybody will listen to the vice-president.

    The NRFX and the legacy definitions work the same way, the legacy definitions are the dominant ones. In order to use the NRFX definitions, you would need to remove/comment out the legacy definitions.

    Best regards,

    Simon

Related