drv_pcf8574.h 696 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * File : drv_pcf8574.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006-2013, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2018-06-12 zylx the first version.
  13. */
  14. #ifndef __PCF8574_H
  15. #define __PCF8574_H
  16. #include <rtthread.h>
  17. #include "rtdevice.h"
  18. #define PCF8574_ADDR 0X20
  19. rt_uint8_t pcf8574_read_byte(void);
  20. void pcf8574_write_byte(rt_uint8_t data);
  21. void pcf8574_write_bit(rt_uint8_t bit, rt_uint8_t sta);
  22. rt_uint8_t pcf8574_read_bit(rt_uint8_t bit);
  23. #endif