IIC.h 933 B

12345678910111213141516171819202122232425262728293031323334
  1. /********************************** (C) COPYRIGHT *******************************
  2. * File Name : IIC.h
  3. * Author : WCH
  4. * Version : V1.0
  5. * Date : 2018/12/12
  6. * Description :
  7. *******************************************************************************/
  8. #ifndef __IIC_H__
  9. #define __IIC_H__
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #include "typedef.h"
  14. #include "driver_gpio.h"
  15. #define IIC_SDA (GPIO_PIN_3) //PA3
  16. #define IIC_SCL (GPIO_PIN_2) //PA2
  17. #define RST_PIN (GPIO_PIN_1) //PA1
  18. #define INT_PIN (GPIO_PIN_0) //PA0
  19. void Touch_IIC_Init(void);
  20. BOOL GT_Check_I2C_Address(UINT8 Address);
  21. UINT8 IICReadOneByte(UINT32 ReadAddr);
  22. BOOL IICReadBytes(UINT32 ReadAddr,UINT8 *pBuffer,UINT16 Length);
  23. BOOL IICWriteOneByte(UINT32 WriteAddr,UINT8 DataToWrite);
  24. BOOL IICWriteBytes(UINT32 WriteAddr,UINT8 *pBuffer,UINT16 Length);
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif