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

TWI sensor over UART on nrf52832

Hello,

Now, I am merging my UART code with the TWI sensor example (I use SDK 13). Now my error after compiling the code is:

In file included from ../../../../../../components/libraries/util/app_error.h:57:0,
                 from ../../../../../../components/libraries/util/nrf_assert.h:49,
                 from ../../../../../../components/libraries/util/app_util_platform.h:59,
                 from ../../../../../../components/libraries/uart/app_uart.h:54,
                 from ../../../main.c:14:
../../../../../../components/drivers_nrf/twi_master/nrf_drv_twi.h:91:58: error: 'NRF_TWITWI_INSTANCE_ID' undeclared here (not in a function)
     #define NRF_DRV_TWI_PERIPHERAL(id)  (void *)CONCAT_2(NRF_TWI, id)
                                                          ^
../../../../../../components/libraries/util/nordic_common.h:114:31: note: in definition of macro 'CONCAT_2_'
 #define CONCAT_2_(p1, p2)     p1##p2
                               ^~
../../../../../../components/drivers_nrf/twi_master/nrf_drv_twi.h:91:49: note: in expansion of macro 'CONCAT_2'
     #define NRF_DRV_TWI_PERIPHERAL(id)  (void *)CONCAT_2(NRF_TWI, id)
                                                 ^~~~~~~~
../../../../../../components/drivers_nrf/twi_master/nrf_drv_twi.h:119:22: note: in expansion of macro 'NRF_DRV_TWI_PERIPHERAL'
     .reg          = {NRF_DRV_TWI_PERIPHERAL(id)},       \
                      ^~~~~~~~~~~~~~~~~~~~~~
../../../main.c:41:36: note: in expansion of macro 'NRF_DRV_TWI_INSTANCE'
 static const nrf_drv_twi_t m_twi = NRF_DRV_TWI_INSTANCE(TWI_INSTANCE_ID);
                                    ^~~~~~~~~~~~~~~~~~~~
../../../../../../components/drivers_nrf/twi_master/nrf_drv_twi.h:120:30: error: 'TWITWI_INSTANCE_ID_INSTANCE_INDEX' undeclared here (not in a function)
     .drv_inst_idx = CONCAT_3(TWI, id, _INSTANCE_INDEX), \
                              ^
../../../../../../components/libraries/util/nordic_common.h:133:31: note: in definition of macro 'CONCAT_3_'
 #define CONCAT_3_(p1, p2, p3) p1##p2##p3
                               ^~
../../../../../../components/drivers_nrf/twi_master/nrf_drv_twi.h:120:21: note: in expansion of macro 'CONCAT_3'
     .drv_inst_idx = CONCAT_3(TWI, id, _INSTANCE_INDEX), \
                     ^~~~~~~~
../../../main.c:41:36: note: in expansion of macro 'NRF_DRV_TWI_INSTANCE'
 static const nrf_drv_twi_t m_twi = NRF_DRV_TWI_INSTANCE(TWI_INSTANCE_ID);
                                    ^~~~~~~~~~~~~~~~~~~~
../../../../../../components/drivers_nrf/twi_master/nrf_drv_twi.h:121:30: error: 'TWITWI_INSTANCE_ID_USE_EASY_DMA' undeclared here (not in a function)
     .use_easy_dma = CONCAT_3(TWI, id, _USE_EASY_DMA)    \
                              ^
../../../../../../components/libraries/util/nordic_common.h:133:31: note: in definition of macro 'CONCAT_3_'
 #define CONCAT_3_(p1, p2, p3) p1##p2##p3
                               ^~
../../../../../../components/drivers_nrf/twi_master/nrf_drv_twi.h:121:21: note: in expansion of macro 'CONCAT_3'
     .use_easy_dma = CONCAT_3(TWI, id, _USE_EASY_DMA)    \
                     ^~~~~~~~
../../../main.c:41:36: note: in expansion of macro 'NRF_DRV_TWI_INSTANCE'
 static const nrf_drv_twi_t m_twi = NRF_DRV_TWI_INSTANCE(TWI_INSTANCE_ID);
                                    ^~~~~~~~~~~~~~~~~~~~
../../../../../../components/toolchain/gcc/Makefile.common:134: recipe for target '_build/nrf52832_xxaa_main.c.o' failed
make: *** [_build/nrf52832_xxaa_main.c.o] Error 1

You can see my main file from : www.dropbox.com/.../uart-main.c

and my makefile : www.dropbox.com/.../Makefile

Thank you for your help !!!

Parents Reply Children
No Data
Related