tty use mq
This commit is contained in:
@@ -484,7 +484,7 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static int _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t box_num)
|
||||
static rt_ssize_t _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t box_num)
|
||||
{
|
||||
CAN_HandleTypeDef *hcan;
|
||||
hcan = &((struct stm32_can *) can->parent.user_data)->CanHandle;
|
||||
@@ -586,7 +586,7 @@ static int _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t
|
||||
}
|
||||
}
|
||||
|
||||
static int _can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t fifo)
|
||||
static rt_ssize_t _can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t fifo)
|
||||
{
|
||||
HAL_StatusTypeDef status;
|
||||
CAN_HandleTypeDef *hcan;
|
||||
|
||||
@@ -47,7 +47,7 @@ static int _waitq_inqueue(rt_wqueue_t *queue, struct rt_wqueue_node *node,
|
||||
if (ret == RT_EOK)
|
||||
{
|
||||
rt_wqueue_add(queue, node);
|
||||
if (timeout != RT_WAITING_FOREVER)
|
||||
if ((int)timeout != RT_WAITING_FOREVER)
|
||||
{
|
||||
rt_timer_control(timer, RT_TIMER_CTRL_SET_TIME, &timeout);
|
||||
|
||||
|
||||
@@ -723,7 +723,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
|
||||
};
|
||||
|
||||
/* parameter check */
|
||||
if (name == RT_NULL || rt_object_get_information(type) == RT_NULL)
|
||||
if (name == RT_NULL || rt_object_get_information((enum rt_object_class_type)type) == RT_NULL)
|
||||
return RT_NULL;
|
||||
|
||||
/* which is invoke in interrupt status */
|
||||
|
||||
@@ -481,4 +481,6 @@ void rt_scheduler_stack_check(struct rt_thread *thread)
|
||||
#endif /* ARCH_CPU_STACK_GROWS_UPWARD */
|
||||
}
|
||||
|
||||
#endif /* RT_USING_OVERFLOW_CHECK */
|
||||
#endif /* RT_USING_OVERFLOW_CHECK */
|
||||
|
||||
|
||||
|
||||
@@ -720,4 +720,5 @@ rt_err_t rt_sched_thread_bind_cpu(struct rt_thread *thread, int cpu)
|
||||
}
|
||||
|
||||
/**@}*/
|
||||
/**@endcond*/
|
||||
/**@endcond*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user