In SDK14.2 it works fine !
- Included #include "nrf_drv_twi.h"
- added nrf_drv_twi.c from <SDK142 folder>\components\drivers_nrf\twi_master to nRF_Drivers group
- In sdk_config.h enabled TWI_ENABLE & TWI0_ENABLED
- Add twi init code
Voilla, compiles without errors
In SDK14.2 it works fine !
- Included #include "nrf_drv_twi.h"
- added nrf_drv_twi.c from <SDK142 folder>\components\drivers_nrf\twi_master to nRF_Drivers group
- In sdk_config.h enabled TWI_ENABLE & TWI0_ENABLED
- Add twi init code
Voilla, compiles without errors
I think there is an error in this file apply_old_config.h
it is:
#if defined(TWI_ENABLED) #undef NRFX_TWI_ENABLED #define NRFX_TWI_ENABLED (TWI_ENABLED && (NRFX_TWI0_ENABLED || NRFX_TWI1_ENABLED))
but in sdk_config.h is
#define TWI_ENABLED 0
which actually DEFINES but does not ENABLES the preprocessor defines TWI_ENABLED
Correct should be:
#if TWI_ENABLED #undef NRFX_TWI_ENABLED #define NRFX_TWI_ENABLED (TWI_ENABLED && (NRFX_TWI0_ENABLED || NRFX_TWI1_ENABLED))
And so there comes this misunderstanding. ....
I hope this will be fixed.
Regards, Adib.