Browse Source

delete the code be commented out

zuozuojia 3 years ago
parent
commit
ba1b8b4bfa
1 changed files with 0 additions and 6 deletions
  1. 0 6
      bsp/stm32/libraries/HAL_Drivers/drv_can.c

+ 0 - 6
bsp/stm32/libraries/HAL_Drivers/drv_can.c

@@ -481,8 +481,6 @@ static int _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t
         case CAN_TX_MAILBOX0:
             if (HAL_IS_BIT_SET(hcan->Instance->TSR, CAN_TSR_TME0) != SET)
             {
-                /* Change CAN state */
-                // hcan->State = HAL_CAN_STATE_ERROR;
                 /* Return function status */
                 return -RT_ERROR;
             }
@@ -490,8 +488,6 @@ static int _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t
         case CAN_TX_MAILBOX1:
             if (HAL_IS_BIT_SET(hcan->Instance->TSR, CAN_TSR_TME1) != SET)
             {
-                /* Change CAN state */
-                // hcan->State = HAL_CAN_STATE_ERROR;
                 /* Return function status */
                 return -RT_ERROR;
             }
@@ -499,8 +495,6 @@ static int _can_sendmsg(struct rt_can_device *can, const void *buf, rt_uint32_t
         case CAN_TX_MAILBOX2:
             if (HAL_IS_BIT_SET(hcan->Instance->TSR, CAN_TSR_TME2) != SET)
             {
-                /* Change CAN state */
-                // hcan->State = HAL_CAN_STATE_ERROR;
                 /* Return function status */
                 return -RT_ERROR;
             }