X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FDemo%2FCORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil%2FST_Library%2Fstm32f7xx_hal_can.c;h=cf76e5461ca1438e3d295f399fd02157bb01e029;hb=cc76343cf920df6c1521467fb88ebf69b7995bc2;hp=7746630e401e37e8042e0c6bd646f47e1a00535b;hpb=c78aacb3e5d1c790cd5c972f068b7176e5bd289b;p=freertos diff --git a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/stm32f7xx_hal_can.c b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/stm32f7xx_hal_can.c index 7746630e4..cf76e5461 100644 --- a/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/stm32f7xx_hal_can.c +++ b/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/stm32f7xx_hal_can.c @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f7xx_hal_can.c * @author MCD Application Team - * @version V1.0.0RC1 - * @date 24-March-2015 + * @version V1.0.0 + * @date 12-May-2015 * @brief CAN HAL module driver. * * This file provides firmware functions to manage the following @@ -19,7 +19,7 @@ ============================================================================== [..] (#) Enable the CAN controller interface clock using - __HAL_RCC_CAN1_CLK_ENABLE() for CAN1 and __HAL_RCC_CAN1_CLK_ENABLE() for CAN2 + __HAL_RCC_CAN1_CLK_ENABLE() for CAN1 and __HAL_RCC_CAN2_CLK_ENABLE() for CAN2 -@- In case you are using CAN2 only, you have to enable the CAN1 clock. (#) CAN pins configuration @@ -191,7 +191,9 @@ HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef* hcan) if(hcan->State == HAL_CAN_STATE_RESET) - { + { + /* Allocate lock resource and initialize it */ + hcan->Lock = HAL_UNLOCKED; /* Init the low level hardware */ HAL_CAN_MspInit(hcan); }