XWOS API
4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
common.h
浏览该文件的文档.
1
21
#ifndef __xwcd_ds_i2c_common_h__
22
#define __xwcd_ds_i2c_common_h__
23
24
#include <
xwcd/ds/standard.h
>
25
32
#define XWDS_I2C_10BITADDR_LEADING_BYTE_MASK ((xwu8_t)0xF0)
33
37
enum
xwds_i2c_msgflag_em
{
38
XWDS_I2C_F_7BITADDR
= (0U),
39
XWDS_I2C_F_10BITADDR
= (1U),
40
XWDS_I2C_F_ADDRMSK
= (1U),
42
XWDS_I2C_F_RD
= (2U),
43
XWDS_I2C_F_WR
= (0U),
44
XWDS_I2C_F_DIRMSK
= (2U),
46
XWDS_I2C_F_START
= (4U),
56
XWDS_I2C_F_STOP
= (8U),
57
};
58
62
struct
xwds_i2c_msg
{
63
xwu16_t
addr
;
66
xwu16_t
flag
;
67
xwu8_t
*
data
;
68
xwsz_t
size
;
69
};
70
75
#endif
/* xwcd/ds/i2c/common.h */
xwds_i2c_msgflag_em
xwds_i2c_msgflag_em
I2C消息标志枚举
Definition
common.h:37
XWDS_I2C_F_WR
@ XWDS_I2C_F_WR
Definition
common.h:43
XWDS_I2C_F_7BITADDR
@ XWDS_I2C_F_7BITADDR
Definition
common.h:38
XWDS_I2C_F_START
@ XWDS_I2C_F_START
Definition
common.h:46
XWDS_I2C_F_RD
@ XWDS_I2C_F_RD
Definition
common.h:42
XWDS_I2C_F_ADDRMSK
@ XWDS_I2C_F_ADDRMSK
Definition
common.h:40
XWDS_I2C_F_10BITADDR
@ XWDS_I2C_F_10BITADDR
Definition
common.h:39
XWDS_I2C_F_DIRMSK
@ XWDS_I2C_F_DIRMSK
Definition
common.h:44
XWDS_I2C_F_STOP
@ XWDS_I2C_F_STOP
Definition
common.h:56
xwsz_t
unsigned long xwsz_t
Definition
type.h:339
xwu8_t
uint8_t xwu8_t
Definition
type.h:194
xwu16_t
uint16_t xwu16_t
Definition
type.h:230
xwds_i2c_msg
I2C消息
Definition
common.h:62
xwds_i2c_msg::size
xwsz_t size
Definition
common.h:68
xwds_i2c_msg::data
xwu8_t * data
Definition
common.h:67
xwds_i2c_msg::addr
xwu16_t addr
Definition
common.h:63
xwds_i2c_msg::flag
xwu16_t flag
Definition
common.h:66
standard.h
玄武设备栈:顶级头文件
xwcd
ds
i2c
common.h
制作者
1.9.7