rt-thread-official/bsp/stm32f429-apollo/drivers/drv_pcf8574.h

26 lines
707 B
C
Raw Normal View History

#ifndef __DRV_PCF8574_H
#define __DRV_PCF8574_H
#include <board.h>
#include <finsh.h>
#include <rtdevice.h>
#include <rthw.h>
//PCF8574<37><34><EFBFBD><EFBFBD>IO<49>Ĺ<EFBFBD><C4B9><EFBFBD>
#define BEEP_IO 0 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> P0
#define AP_INT_IO 1 //AP3216C<36>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD> P1
#define DCMI_PWDN_IO 2 //DCMI<4D>ĵ<EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> P2
#define USB_PWR_IO 3 //USB<53><42>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> P3
#define EX_IO 4 //<2F><>չIO,<2C>Զ<EFBFBD><D4B6><EFBFBD>ʹ<EFBFBD><CAB9> P4
#define MPU_INT_IO 5 //MPU9250<35>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD> P5
#define RS485_RE_IO 6 //RS485_RE<52><45><EFBFBD><EFBFBD> P6
#define ETH_RESET_IO 7 //<2F><>̫<EFBFBD><CCAB><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD> P7
rt_err_t rt_pcf8574_init(void);
void rt_pcf8574_write_bit(rt_uint8_t bit, rt_uint8_t state);
rt_uint8_t rt_pcf8574_read_bit(rt_uint8_t bit);
#endif