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

enable twim0

can somebody help me on how to enable twim0..

it was no problem in twi_sensor example...now i am integrating twi_sensor in ble_eddystone...and on built it give an error of "'NRF_DRV_TWI_INSTANCE_0' undeclared here (not in a function); did you mean 'NRF_DRV_TWI_INSTANCE_'?" i changed sdk
_config of eddystone too...  am i doing right..???

below is nrf_drv_twi.h file ...which shows that twim0 is not enabled..can you solve yhis problem..it would be great help..thank you.

Parents Reply
  • yes,,but inside nrf_drv_vcnl4020_read_registers() function i have used 

    err_code = nrf_drv_twi_tx(&m_twi_instance, vcnl4020_ADDRESS, &reg, 1, false);   and 

    err_code = nrf_drv_twi_rx(&m_twi_instance, vcnl4020_ADDRESS, p_data, length);  functions only..it is nothing different...

    which are originally 

    err_code = nrf_drv_twi_tx(&m_twi, LM75B_ADDR, reg, sizeof(reg), false); 

    and 

    ret_code_t err_code = nrf_drv_twi_rx(&m_twi, LM75B_ADDR, &m_sample, sizeof(m_sample));  functions used in sdk(LM75B example twi_sensor)

    i just created new function for my convenience..thats it..

Children
Related