user_twim_wait.h 649 B

123456789101112131415161718192021222324252627282930
  1. #ifndef USER_TWIM_WAIT_H__
  2. #define USER_TWIM_WAIT_H__
  3. #include <stdint.h>
  4. #include <stdbool.h>
  5. #include "define.h"
  6. #include "nrf_drv_twi.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #define I2C_Direction_Transmitter 0
  11. #define I2C_Direction_Receiver 1
  12. void twim_init(void);
  13. void twim_uinit(void);
  14. 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);
  15. bool nrf_drv_twim_rx(uint8_t addr,uint8_t * reg, uint8_t reg_len,uint8_t * data, uint8_t data_len);
  16. void i2c_modify(void);
  17. extern bool twim_die;
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #endif // USER_TWIM_WAIT_H__
  22. /** @} */