From ba76cb5ef74ce2bd9743e294bb06356dd939ed7b Mon Sep 17 00:00:00 2001 From: xiao xie <335266746@qq.com> Date: Wed, 21 Jun 2023 20:52:11 +0800 Subject: [PATCH] =?UTF-8?q?[drivers]=E4=BF=AE=E5=A4=8Dcan=E9=A9=B1?= =?UTF-8?q?=E5=8A=A8=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=20(#7708)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt/libraries/drivers/drv_can.c | 2 +- components/drivers/include/drivers/can.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/imxrt/libraries/drivers/drv_can.c b/bsp/imxrt/libraries/drivers/drv_can.c index b8adae6c65..dc4840a22f 100644 --- a/bsp/imxrt/libraries/drivers/drv_can.c +++ b/bsp/imxrt/libraries/drivers/drv_can.c @@ -430,7 +430,7 @@ static rt_ssize_t can_send(struct rt_can_device *can_dev, const void *buf, rt_ui return (rt_ssize_t)ret; } -static int can_recv(struct rt_can_device *can_dev, void *buf, rt_uint32_t boxno) +static rt_ssize_t can_recv(struct rt_can_device *can_dev, void *buf, rt_uint32_t boxno) { struct imxrt_can *can; struct rt_can_msg *pmsg; diff --git a/components/drivers/include/drivers/can.h b/components/drivers/include/drivers/can.h index ec69d35b5a..2ce60d8072 100644 --- a/components/drivers/include/drivers/can.h +++ b/components/drivers/include/drivers/can.h @@ -351,8 +351,8 @@ struct rt_can_ops { rt_err_t (*configure)(struct rt_can_device *can, struct can_configure *cfg); rt_err_t (*control)(struct rt_can_device *can, int cmd, void *arg); - int (*sendmsg)(struct rt_can_device *can, const void *buf, rt_uint32_t boxno); - int (*recvmsg)(struct rt_can_device *can, void *buf, rt_uint32_t boxno); + rt_ssize_t (*sendmsg)(struct rt_can_device *can, const void *buf, rt_uint32_t boxno); + rt_ssize_t (*recvmsg)(struct rt_can_device *can, void *buf, rt_uint32_t boxno); }; rt_err_t rt_hw_can_register(struct rt_can_device *can,