Browse Source

Merge pull request #3565 from OpenNuvoton/rtt_issues

Get stuck issue after open-close-open CAN device.
Bernard Xiong 5 năm trước cách đây
mục cha
commit
084996ddb5
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      components/drivers/can/can.c

+ 1 - 0
components/drivers/can/can.c

@@ -422,6 +422,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
         tx_fifo = (struct rt_can_tx_fifo *)can->can_tx;
         RT_ASSERT(tx_fifo != RT_NULL);
 
+        rt_sem_detach(&(tx_fifo->sem));
         rt_free(tx_fifo);
         dev->open_flag &= ~RT_DEVICE_FLAG_INT_TX;
         can->can_tx = RT_NULL;