Many of the sdk_config.h examples have both NRFX_FOO_ENABLED and FOO_ENABLED defined.
So, imagine my surprise when I change, say, NRFX_TIMER3_ENABLED to 1, still get link errors about undefined nrfx_timer symbols, and eventually chase it down to apply_old_config.h simply stomping on my explicitly-defined symbol.
Please change apply_old_config.h to emit a compiler error via the #error directive if both the NRFX_FOO_ENABLED and FOO_ENABLED variables are defined.
#if defined(NRFX_PPI_ENABLED) && defined(PPI_ENABLED) #error The NRFX_PPI_ENABLED and PPI_ENABLED flags are incompatible and can not both be set. Please choose one. #endif #if defined(PPI_ENABLED) #define NRFX_PPI_ENABLED PPI_ENABLED #endif
This approach will preserve the automatic application of old pre-NRFX_ config macros and guide users towards the correct implementation. I would much rather be steered by compiler errors than spend time navigating a twisty maze of macro definitions trying to figure out why the .c file I'm trying to compile, with the correct NRFX_FOO_ENABLED flag supplied via my sdk_config.h, is getting #ifdef-d into oblivion.