This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf_drv_twi.c compile error

I'm trying to merge 'ble_app_uart' and 'twi_sensor' example.

I developed twi function in 'twi_sensor' example. I add 'ble_app_uart' example file 'nrf_drv_twi.c' and also add include path. but I got an compile error in uart example of 'nrf_drv_twi.c' even though I don't write anything in main.c how can I do that? I used sdk 10.0 versioin

............\components\drivers_nrf\twi_master\nrf_drv_twi.c(87): error: #94-D: the size of an array must be greater than zero static nrf_drv_twi_evt_handler_t m_handlers[ WI_COUNT];

............\components\drivers_nrf\twi_master\nrf_drv_twi.c(90): error: #94-D: the size of an array must be greater than zero static void * mp_contexts[ WI_COUNT];

............\components\drivers_nrf\twi_master\nrf_drv_twi.c(93): error: #94-D: the size of an array must be greater than zero static control_block_t m_cb[ WI_COUNT];

............\components\drivers_nrf\twi_master\nrf_drv_twi.c(96): error: #94-D: the size of an array must be greater than zero static nrf_drv_twi_t const * m_instances[ WI_COUNT];

............\components\drivers_nrf\twi_master\nrf_drv_twi.c(105): error: #29: expected an expression };

............\components\drivers_nrf\twi_master\nrf_drv_twi.c(98): error: #1514: an empty initializer is invalid for an array with unspecified bound static const nrf_drv_twi_config_t m_default_config[] = { ............\components\drivers_nrf\twi_master\nrf_drv_twi.c(678): warning: #177-D: function "nrf_drv_twi_int_handler" was declared but never referenced __STATIC_INLINE void nrf_drv_twi_int_handler(NRF_TWI_Type * p_reg, uint32_t instance_id) ............\components\drivers_nrf\twi_master\nrf_drv_twi.c: 1 warning, 6 errors

Related