XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
peripheral.h
浏览该文件的文档.
1
21#ifndef __xwcd_ds_i2c_peripheral_h__
22#define __xwcd_ds_i2c_peripheral_h__
23
24#include <xwcd/ds/standard.h>
25#include <xwos/lib/xwbop.h>
26#include <xwcd/ds/device.h>
27#include <xwcd/ds/i2c/common.h>
28#include <xwcd/ds/i2c/master.h>
29
36struct xwds_i2cp;
37
43};
44
48struct xwds_i2cp {
51 /* attributes */
52 struct xwds_i2cm * bus;
54};
55
60void xwds_i2cp_construct(struct xwds_i2cp * i2cp);
61
66void xwds_i2cp_destruct(struct xwds_i2cp * i2cp);
67
72xwer_t xwds_i2cp_grab(struct xwds_i2cp * i2cp);
73
78xwer_t xwds_i2cp_put(struct xwds_i2cp * i2cp);
79
84#endif /* xwcd/ds/i2c/peripheral.h */
玄武设备栈:设备基类
xwer_t xwds_i2cp_put(struct xwds_i2cp *i2cp)
XWDS API:减少对象的引用计数
Definition peripheral.c:76
xwer_t xwds_i2cp_grab(struct xwds_i2cp *i2cp)
XWDS API:增加对象的引用计数
Definition peripheral.c:70
void xwds_i2cp_destruct(struct xwds_i2cp *i2cp)
XWDS API:I2C外设的构造函数
Definition peripheral.c:64
void xwds_i2cp_construct(struct xwds_i2cp *i2cp)
XWDS API:I2C外设的构造函数
Definition peripheral.c:57
signed long xwer_t
Definition type.h:554
uint16_t xwu16_t
Definition type.h:230
玄武设备栈:I2C:主机
设备(所有设备的基类)
Definition device.h:127
基本驱动函数表(所有设备驱动的基类)
Definition device.h:113
I2C主机
Definition master.h:53
BSP中需要提供的I2C外设驱动函数表
Definition peripheral.h:41
struct xwds_driver base
Definition peripheral.h:42
I2C外设
Definition peripheral.h:48
struct xwds_device dev
Definition peripheral.h:49
xwu16_t addr
Definition peripheral.h:53
struct xwds_i2cm * bus
Definition peripheral.h:52
XWOS通用库:位操作
玄武设备栈:I2C:协议通用的定义
玄武设备栈:顶级头文件