24 lines
521 B
C
24 lines
521 B
C
#ifndef __CHRG_PCF8574_H__
|
|
#define __CHRG_PCF8574_H__
|
|
|
|
#include <rtthread.h>
|
|
#include <rtdevice.h>
|
|
#include "chrg_i2c.h"
|
|
|
|
// 读取所有8口IO状态
|
|
extern rt_uint8_t chrg_pcf8574_get_port (eIDX_I2C idx);
|
|
|
|
// 读取指定管脚状态值
|
|
extern rt_uint8_t chrg_pcf8574_get_pin (eIDX_I2C idx, uint8_t bit);
|
|
|
|
// 设置所有8口IO状态值
|
|
extern int chrg_pcf8574_set_port (eIDX_I2C idx, uint8_t value);
|
|
|
|
// 设置指定管脚状态值
|
|
extern int chrg_pcf8574_set_pin (eIDX_I2C idx, uint8_t bit, uint8_t value);
|
|
|
|
|
|
#endif
|
|
|
|
|