#ifndef USER_TWIM_WAIT_H__ #define USER_TWIM_WAIT_H__ #include #include #include "define.h" #include "nrf_drv_twi.h" #ifdef __cplusplus extern "C" { #endif #define I2C_Direction_Transmitter 0 #define I2C_Direction_Receiver 1 void twim_init(void); void twim_uinit(void); bool nrf_drv_twim_tx(uint8_t addr, uint8_t * reg, uint8_t reg_len,uint8_t * data, uint8_t data_len, bool no_stop); bool nrf_drv_twim_rx(uint8_t addr,uint8_t * reg, uint8_t reg_len,uint8_t * data, uint8_t data_len); void i2c_modify(void); extern bool twim_die; #ifdef __cplusplus } #endif #endif // USER_TWIM_WAIT_H__ /** @} */