Are there any I2C examples for the nRF51822 ( write/ read functions) ? If not, can anyone suggest a good starting point for I2C? I am using Eclipse kepler for development. Thank you for all suggests.
Are there any I2C examples for the nRF51822 ( write/ read functions) ? If not, can anyone suggest a good starting point for I2C? I am using Eclipse kepler for development. Thank you for all suggests.
I wrote my own little wrapper that might help, see attached i2c.c.
My code is assuming the SoftDevice is available, so you must have called twi_master_init already, then my helper functions can work from there using twi_master_transfer. A read is also a "transfer" because you have to write the register address that you want to read from.
My code is assuming the SoftDevice is available, so you must have called twi_master_init already, then my helper functions can work from there using twi_master_transfer. A read is also a "transfer" because you have to write the register address that you want to read from.