41#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
54#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
142#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
206 if ((drv) && (drv->
write)) {
207 rc = drv->
write(canc, txobjcfg, msg);
245 goto err_canc_drv_enable_irqs;
250err_canc_drv_enable_irqs:
275 goto err_canc_drv_disable_irqs;
280err_canc_drv_disable_irqs:
300 if (canc->
mode == mode) {
311 goto err_drv_set_mode;
345 if ((drv) && (drv->
set_bd)) {
346 rc = drv->
set_bd(canc, bdcfg);
368 memset(rxq->
q, 0,
sizeof(rxq->
q));
386 if (rxq->
num == rxq->
pos) {
412 goto err_sem_wait_to;
415 *buf = rxq->
q[rxq->
pos];
433#if !defined(XWCDCFG_ds_CAN_CONTROLLER_ROCBT) || (1 != XWCDCFG_ds_CAN_CONTROLLER_ROCBT)
449#if !defined(XWCDCFG_ds_CAN_CONTROLLER_ROCBT) || (1 != XWCDCFG_ds_CAN_CONTROLLER_ROCBT)
463#if !defined(XWCDCFG_ds_CAN_CONTROLLER_ROCBT) || (1 != XWCDCFG_ds_CAN_CONTROLLER_ROCBT)
477#if !defined(XWCDCFG_ds_CAN_CONTROLLER_ROCBT) || (1 != XWCDCFG_ds_CAN_CONTROLLER_ROCBT)
492#if !defined(XWCDCFG_ds_CAN_CONTROLLER_ROCBT) || (1 != XWCDCFG_ds_CAN_CONTROLLER_ROCBT)
506#if !defined(XWCDCFG_ds_CAN_CONTROLLER_ROCBT) || (1 != XWCDCFG_ds_CAN_CONTROLLER_ROCBT)
524 memcpy(msg->
sdu, sdu, dlc);
static xwer_t xwds_canc_vop_remove(struct xwds_canc *canc)
XWDS VOP:移除CAN控制器
const struct xwds_virtual_operation xwds_canc_vop
static xwer_t xwds_canc_vop_start(struct xwds_canc *canc)
XWDS VOP:启动CAN控制器
static xwer_t xwds_canc_vop_suspend(struct xwds_canc *canc)
XWDS VOP:暂停CAN控制器
static xwer_t xwds_canc_vop_probe(struct xwds_canc *canc)
XWDS VOP:探测CAN控制器
static xwer_t xwds_canc_vop_resume(struct xwds_canc *canc)
XWDS VOP:继续CAN控制器
static xwer_t xwds_canc_vop_stop(struct xwds_canc *canc)
XWDS VOP:停止CAN控制器
#define XWDS_CANC_SDU_MAXSIZE
xwer_t xwds_canc_put(struct xwds_canc *canc)
XWDS API:减少对象的引用计数
xwer_t xwds_canc_grab(struct xwds_canc *canc)
XWDS API:增加对象的引用计数
void xwds_canc_drvcb_tx_indication(struct xwds_canc *canc, xwid_t txobjid, xwer_t rc)
XWDS Driver Callback:指示发送结果
void xwds_canc_destruct(struct xwds_canc *canc)
XWDS API:CAN控制器对象的析构函数
void xwds_canc_drvcb_mode_indication(struct xwds_canc *canc, xwsq_t mode)
XWDS Driver Callback:指示CAN控制器的模式已经切换
xwer_t xwds_canc_disable_irqs(struct xwds_canc *canc)
XWDS API:关闭CAN控制器的中断
#define __xwds_canc_cbtbl_qualifier
void xwds_canc_drvcb_busoff_indication(struct xwds_canc *canc)
XWDS Driver Callback:指示CAN控制器发生busoff
xwer_t xwds_canc_set_mode(struct xwds_canc *canc, xwsq_t mode)
XWDS API:设置CAN控制器的模式
void xwds_canc_drvcb_rx_indication(struct xwds_canc *canc, xwid_t rxobjid, struct xwds_can_msg *rxmsg)
XWDS Driver Callback:接收到CAN消息后的回调函数
void xwds_canc_rxq_publish(struct xwds_canc_rxqueue *rxq, struct xwds_can_msg *msg)
XWDS API:发布一条消息到接收缓冲队列中
xwer_t xwds_canc_write(struct xwds_canc *canc, xwid_t txobjid, struct xwds_can_msg *msg)
XWDS API:将一条CAN消息写入发送邮箱
void xwds_canc_drvcb_err_indication(struct xwds_canc *canc, xwsq_t errcode, xwsq_t tec, xwsq_t rec)
XWDS Driver Callback:指示CAN控制器发生错误
void xwds_canc_setcb_wakeup_notification(struct xwds_canc *canc, void(*cb)(struct xwds_canc *))
XWDS API:设置 唤醒通知 回调函数
void xwds_canc_setcb_err_indication(struct xwds_canc *canc, void(*cb)(struct xwds_canc *, xwsq_t, xwsq_t, xwsq_t))
XWDS API:设置 错误通知 回调函数
void xwds_canc_setcb_tx_indication(struct xwds_canc *canc, void(*cb)(struct xwds_canc *, xwid_t, xwer_t))
XWDS API:设置 指示发送结果 的回调函数
void xwds_canc_setcb_mode_indication(struct xwds_canc *canc, void(*cb)(struct xwds_canc *, xwsq_t))
XWDS API:设置 模式切换通知 回调函数
void xwds_canc_construct(struct xwds_canc *canc)
XWDS API:CAN控制器的构造函数
void xwds_canc_setcb_busoff_indication(struct xwds_canc *canc, void(*cb)(struct xwds_canc *))
XWDS API:设置 BUSOFF通知 回调函数
xwer_t xwds_canc_enable_irqs(struct xwds_canc *canc)
XWDS API:开启CAN控制器的中断
void xwds_canc_drvcb_wakeup_notification(struct xwds_canc *canc)
XWDS Driver Callback:CAN控制器的唤醒通知
void xwds_canc_drvcb_init_msg(struct xwds_can_msg *msg, xwu32_t canid, xwsq_t flag, xwsz_t dlc, xwu8_t sdu[])
XWDS Driver Callback:初始化CAN总线消息结构体
xwer_t xwds_canc_set_bd(struct xwds_canc *canc, xwid_t bdcfgid)
XWDS API:设置CAN控制器的波特率
void xwds_canc_rxq_init(struct xwds_canc_rxqueue *rxq)
XWDS API:初始化接收缓冲队列
xwer_t xwds_canc_rxq_acquire(struct xwds_canc_rxqueue *rxq, struct xwds_can_msg *buf, xwtm_t to)
XWDS API:从接收缓冲队列中获取一条消息
void xwds_canc_setcb_rx_indication(struct xwds_canc *canc, void(*cb)(struct xwds_canc *, xwid_t, struct xwds_can_msg *))
XWDS API:设置 指示接收结果 的回调函数
@ XWDS_CANC_HWOBJ_T_ID_EXT
@ XWDS_CANC_HWOBJ_T_ID_STD
static xwer_t xwds_device_grab(struct xwds_device *dev)
XWDS API:增加对象的引用计数
xwer_t xwds_device_vop_start(struct xwds_device *dev)
设备基本操作函数:启动设备
void xwds_device_construct(struct xwds_device *dev)
XWDS API:设备的构造函数
void xwds_device_destruct(struct xwds_device *dev)
XWDS API:设备的析构函数
static xwer_t xwds_device_put(struct xwds_device *dev)
XWDS API:减少对象的引用计数
xwer_t xwds_device_vop_stop(struct xwds_device *dev)
设备基本操作函数:停止设备
xwer_t xwds_device_vop_remove(struct xwds_device *dev)
设备基本操作函数:删除设备
xwer_t xwds_device_vop_resume(struct xwds_device *dev)
设备基本操作函数:继续设备
xwer_t xwds_device_vop_probe(struct xwds_device *dev)
设备基本操作函数:探测设备
xwer_t xwds_device_vop_suspend(struct xwds_device *dev)
设备基本操作函数:暂停设备
#define xwds_cast(type, dev)
#define XWDS_VALIDATE(exp, errstr,...)
#define EFAULT
Bad address
#define ENOSYS
Function not implemented
#define EBADSLT
Invalid slot
#define ERANGE
Result too large
#define EALREADY
Socket already connected
xws64_t xwtm_t
XWOS系统时间 (有符号)
static void xwos_splk_unlock_cpuirqrs(struct xwos_splk *spl, xwreg_t cpuirq)
XWOS API:解锁自旋锁,并恢复本地CPU的中断标志
static void xwos_splk_init(struct xwos_splk *spl)
XWOS API:初始化自旋锁
static void xwos_splk_lock_cpuirqsv(struct xwos_splk *spl, xwreg_t *cpuirq)
XWOS API:上锁自旋锁,保存本地CPU的中断标志并关闭
static xwer_t xwos_sem_wait_to(struct xwos_sem *sem, xwtm_t to)
XWOS API:限时等待并获取信号量
static xwer_t xwos_sem_init(struct xwos_sem *sem, xwssq_t val, xwssq_t max)
XWOS API:静态方式初始化信号量对象
static xwer_t xwos_sem_post(struct xwos_sem *sem)
XWOS API:发布信号量
void(* rx_indication)(struct xwds_canc *, xwid_t, struct xwds_can_msg *)
void(* wakeup_notification)(struct xwds_canc *)
void(* busoff_indication)(struct xwds_canc *)
void(* err_indication)(struct xwds_canc *, xwsq_t, xwsq_t, xwsq_t)
void(* tx_indication)(struct xwds_canc *, xwid_t, xwer_t)
void(* mode_indication)(struct xwds_canc *, xwsq_t)
const struct xwds_canc_bd_cfg * bdcfgs
const struct xwds_canc_txobj_cfg * txobjs
xwer_t(* disable_irqs)(struct xwds_canc *)
xwer_t(* set_mode)(struct xwds_canc *, xwsq_t)
xwer_t(* write)(struct xwds_canc *, const struct xwds_canc_txobj_cfg *, struct xwds_can_msg *)
xwer_t(* set_bd)(struct xwds_canc *, const struct xwds_canc_bd_cfg *)
xwer_t(* enable_irqs)(struct xwds_canc *)
struct xwds_can_msg q[(8U)]
struct xwds_canc_cbtbl * cbtbl
const struct xwds_canc_cfg * cfg
const struct xwds_driver * drv
const struct xwds_virtual_operation * vop
xwer_t(* stop)(struct xwds_device *)
xwer_t(* remove)(struct xwds_device *)
xwer_t(* probe)(struct xwds_device *)
xwer_t(* resume)(struct xwds_device *)