|
XWOS API
4.0
XWOS C/C++ API参考手册
|

结构体 | |
| struct | xwds_lin_msg |
| LIN消息结构体 更多... | |
| struct | xwds_lin_msg_info |
| LIN消息信息 更多... | |
| struct | xwds_lin_cfg |
| LIN控制器配置 更多... | |
| struct | xwds_linc_driver |
| LIN控制器驱动函数表 更多... | |
| struct | xwds_linc |
| LIN控制器 更多... | |
宏定义 | |
| #define | XWDS_LIN_DIAG_MSTREQ_MSG 0x3C |
| #define | XWDS_LIN_DIAG_SLCREP_MSG 0x3D |
| #define | XWDS_LIN_DEFAULT_DATA_SIZE 8 |
| #define | LIN_ID_PARITY(id) |
| #define | LIN_ID_PARITY_FIELD(id) (LIN_ID_PARITY(id) | ((id) & 0xFFU)) |
枚举 | |
| enum | xwds_lin_mode_em { XWDS_LIN_MODE_CLOSE = 0 , XWDS_LIN_MODE_TX = ((xwbmp_t)1 << ( 0 )) , XWDS_LIN_MODE_RX = ((xwbmp_t)1 << ( 1 )) } |
| LIN接口模式枚举 更多... | |
| enum | xwds_lin_chksum_type_em { XWDS_LIN_CHKSUM_CLASSIC = 0 , XWDS_LIN_CHKSUM_ENHANCED } |
| LIN协议类型 更多... | |
函数 | |
| void | xwds_linc_construct (struct xwds_linc *linc) |
| XWDS API:LIN控制器的构造函数 | |
| void | xwds_linc_destruct (struct xwds_linc *linc) |
| XWDS API:LIN控制器对象的析构函数 | |
| xwer_t | xwds_linc_grab (struct xwds_linc *linc) |
| XWDS API:增加对象的引用计数 | |
| xwer_t | xwds_linc_put (struct xwds_linc *linc) |
| XWDS API:减少对象的引用计数 | |
| xwer_t | xwds_linc_msttx (struct xwds_linc *linc, xwu8_t id, struct xwds_lin_msg *msg, xwtm_t to) |
| XWDS API:主机节点发送一条LIN消息 | |
| xwer_t | xwds_linc_slvtx (struct xwds_linc *linc, struct xwds_lin_msg *msg, xwtm_t to) |
| XWDS API:从机节点发送一条LIN消息 | |
| xwer_t | xwds_linc_rx (struct xwds_linc *linc, struct xwds_lin_msg *msgbuf, xwtm_t to) |
| XWDS API:接收一条LIN消息 | |
| xwer_t | xwds_linc_get_msg_size (struct xwds_linc *linc, xwu8_t protected_id, xwu8_t *ret) |
| XWDS API:通过LIN保护ID查询消息大小 | |
变量 | |
| const unsigned char | xwos_linid_table [64] |
| LIN总线ID校验表 | |
| #define LIN_ID_PARITY | ( | id | ) |
| #define LIN_ID_PARITY_FIELD | ( | id | ) | (LIN_ID_PARITY(id) | ((id) & 0xFFU)) |
| #define XWDS_LIN_DEFAULT_DATA_SIZE 8 |
在文件 controller.h 第 37 行定义.
| #define XWDS_LIN_DIAG_MSTREQ_MSG 0x3C |
在文件 controller.h 第 35 行定义.
| #define XWDS_LIN_DIAG_SLCREP_MSG 0x3D |
在文件 controller.h 第 36 行定义.
LIN协议类型
| 枚举值 | |
|---|---|
| XWDS_LIN_CHKSUM_CLASSIC | |
| XWDS_LIN_CHKSUM_ENHANCED | |
在文件 controller.h 第 51 行定义.
| enum xwds_lin_mode_em |
LIN接口模式枚举
| 枚举值 | |
|---|---|
| XWDS_LIN_MODE_CLOSE | |
| XWDS_LIN_MODE_TX | |
| XWDS_LIN_MODE_RX | |
在文件 controller.h 第 42 行定义.
| void xwds_linc_construct | ( | struct xwds_linc * | linc | ) |
XWDS API:LIN控制器的构造函数
| [in] | linc | LIN控制器对象指针 |
在文件 controller.c 第 58 行定义.

| void xwds_linc_destruct | ( | struct xwds_linc * | linc | ) |
XWDS API:LIN控制器对象的析构函数
| [in] | linc | LIN控制器对象指针 |
在文件 controller.c 第 65 行定义.

XWDS API:通过LIN保护ID查询消息大小
| [in] | linc | LIN控制器对象指针 |
| [in] | protected_id | 消息的LIN保护ID |
| [out] | ret | 指向缓冲区的指针,通过此缓冲区返回消息大小 |
| XWOK | 没有错误 |
| -EFAULT | 无效指针 |
| -ENODEV | 找不到ID |
<No error
<No error
在文件 controller.c 第 301 行定义.


XWDS API:增加对象的引用计数
| [in] | linc | LIN控制器对象指针 |
在文件 controller.c 第 71 行定义.


| xwer_t xwds_linc_msttx | ( | struct xwds_linc * | linc, |
| xwu8_t | id, | ||
| struct xwds_lin_msg * | msg, | ||
| xwtm_t | to | ||
| ) |
XWDS API:主机节点发送一条LIN消息
| [in] | linc | LIN控制器对象指针 |
| [in] | id | 主机节点调度消息的ID |
| [in] | msg | LIN消息结构体指针 |
| [in] | to | 期望唤醒的时间点 |
| XWOK | 没有错误 |
| -EFAULT | 无效指针 |
| -ENOSYS | 控制器不支持主机模式发送 |
如果 to 是过去的时间点,将直接返回 -ETIMEDOUT 。
<No error
在文件 controller.c 第 188 行定义.

XWDS API:减少对象的引用计数
| [in] | linc | LIN控制器对象指针 |
在文件 controller.c 第 77 行定义.


| xwer_t xwds_linc_rx | ( | struct xwds_linc * | linc, |
| struct xwds_lin_msg * | msgbuf, | ||
| xwtm_t | to | ||
| ) |
XWDS API:接收一条LIN消息
| [in] | linc | LIN控制器对象指针 |
| [out] | msgbuf | 指向接收消息缓冲区的指针 |
| [in,out] | to | 期望唤醒的时间点 |
| XWOK | 没有错误 |
| -EFAULT | 无效指针 |
| -ENOSYS | 控制器不支持接收 |
如果 to 是过去的时间点,将直接返回 -ETIMEDOUT 。
<No error
在文件 controller.c 第 268 行定义.

| xwer_t xwds_linc_slvtx | ( | struct xwds_linc * | linc, |
| struct xwds_lin_msg * | msg, | ||
| xwtm_t | to | ||
| ) |
XWDS API:从机节点发送一条LIN消息
| [in] | linc | LIN控制器对象指针 |
| [in] | msg | LIN消息结构体指针 |
| [in,out] | to | 期望唤醒的时间点 |
| XWOK | 没有错误 |
| -EFAULT | 无效指针 |
| -ENOSYS | 控制器不支持从机模式发送 |
如果 to 是过去的时间点,将直接返回 -ETIMEDOUT 。
<No error
在文件 controller.c 第 228 行定义.

|
extern |
LIN总线ID校验表