61 if (
NULL != gpiorsc) {
68 if (
NULL != gpiorsc) {
78 if (
NULL != gpiorsc) {
95 if (
NULL != gpiorsc) {
99 if (
NULL != gpiorsc) {
106#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
194 if ((drv) && (drv->
putc)) {
195 rc = drv->
putc(eeprom, data, addr, to);
211 if ((drv) && (drv->
getc)) {
212 rc = drv->
getc(eeprom, buf, addr, to);
229 rc = drv->
pgwrite(eeprom, data, size, pgidx, to);
245 if ((drv) && (drv->
pgread)) {
246 rc = drv->
pgread(eeprom, buf, size, pgidx, to);
xwer_t xwds_i2cm_xfer(struct xwds_i2cm *i2cm, struct xwds_i2c_msg *msg, xwtm_t to)
XWDS API:传输I2C消息
#define xwds_cast(type, dev)
#define EINVAL
Invalid argument
#define ENOSYS
Function not implemented
#define EADDRNOTAVAIL
Address not available
xws64_t xwtm_t
XWOS系统时间 (有符号)
xwer_t xwds_eeprom_drv_start(struct xwds_device *dev)
EEPROM基本驱动:启动设备
xwer_t xwds_eeprom_putc(struct xwds_eeprom *eeprom, xwu8_t data, xwsq_t addr, xwtm_t to)
EEPROM API:写一个字节到EEPROM
xwer_t xwds_eeprom_drv_suspend(struct xwds_device *dev)
EEPROM基本驱动:继续设备
xwer_t xwds_eeprom_pgwrite(struct xwds_eeprom *eeprom, xwu8_t *data, xwsz_t *size, xwsq_t pgidx, xwtm_t to)
EEPROM API:写一页数据到EEPROM
xwer_t xwds_eeprom_getc(struct xwds_eeprom *eeprom, xwu8_t *buf, xwsq_t addr, xwtm_t to)
EEPROM API:从EEPROM中读取一个字节
xwer_t xwds_eeprom_pgread(struct xwds_eeprom *eeprom, xwu8_t *buf, xwsz_t *size, xwsq_t pgidx, xwtm_t to)
EEPROM API:从EEPROM读一页数据
static xwer_t xwds_eeprom_check_desc(struct xwds_eeprom *eeprom)
xwer_t xwds_eeprom_wp_enable(struct xwds_eeprom *eeprom)
EEPROM API:开启EEPROM的写保护
xwer_t xwds_eeprom_reset(struct xwds_eeprom *eeprom, xwtm_t to)
EEPROM API:复位EEPROM的I2C总线
xwer_t xwds_eeprom_drv_stop(struct xwds_device *dev)
EEPROM基本驱动:停止设备
xwer_t xwds_eeprom_wp_disable(struct xwds_eeprom *eeprom)
EEPROM API:关闭EEPROM的写保护
xwer_t xwds_eeprom_power_off(struct xwds_eeprom *eeprom)
EEPROM API:关闭EEPROM的电源
xwer_t xwds_eeprom_power_on(struct xwds_eeprom *eeprom)
EEPROM API:开启EEPROM的电源
xwer_t xwds_eeprom_drv_resume(struct xwds_device *dev)
EEPROM基本驱动:暂停设备
xwer_t xwds_gpio_reset(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:将SOC的GPIO设置为低电平
xwer_t xwds_gpio_rls(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:释放SOC的GPIO
xwer_t xwds_gpio_set(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:将SOC的GPIO设置为高电平
xwer_t xwds_gpio_req(struct xwds_soc *soc, xwid_t port, xwsq_t pinmask)
XWDS API:申请SOC的GPIO
const struct xwds_driver * drv
xwer_t(* pgread)(struct xwds_eeprom *, xwu8_t *, xwsz_t *, xwsq_t, xwtm_t)
xwer_t(* getc)(struct xwds_eeprom *, xwu8_t *, xwptr_t, xwtm_t)
xwer_t(* pgwrite)(struct xwds_eeprom *, xwu8_t *, xwsz_t *, xwsq_t, xwtm_t)
xwer_t(* putc)(struct xwds_eeprom *, xwu8_t, xwptr_t, xwtm_t)
const struct xwds_resource_gpio * wp_gpiorsc
const struct xwds_resource_gpio * pwr_gpiorsc
const struct xwds_eeprom_parameter parameter