drv_pcf8574.h 707 B

12345678910111213141516171819202122232425
  1. #ifndef __DRV_PCF8574_H
  2. #define __DRV_PCF8574_H
  3. #include <board.h>
  4. #include <finsh.h>
  5. #include <rtdevice.h>
  6. #include <rthw.h>
  7. //PCF8574各个IO的功能
  8. #define BEEP_IO 0 //蜂鸣器控制引脚 P0
  9. #define AP_INT_IO 1 //AP3216C中断引脚 P1
  10. #define DCMI_PWDN_IO 2 //DCMI的电源控制引脚 P2
  11. #define USB_PWR_IO 3 //USB电源控制引脚 P3
  12. #define EX_IO 4 //扩展IO,自定义使用 P4
  13. #define MPU_INT_IO 5 //MPU9250中断引脚 P5
  14. #define RS485_RE_IO 6 //RS485_RE引脚 P6
  15. #define ETH_RESET_IO 7 //以太网复位引脚 P7
  16. rt_err_t rt_pcf8574_init(void);
  17. void rt_pcf8574_write_bit(rt_uint8_t bit, rt_uint8_t state);
  18. rt_uint8_t rt_pcf8574_read_bit(rt_uint8_t bit);
  19. #endif