fix LPC812 PWM
Fork of mbed-dev by
Diff: targets/cmsis/TARGET_STM/TARGET_STM32F1/stm32f1xx_hal_can.c
- Revision:
- 124:6a4a5b7d7324
- Parent:
- 0:9b334a45a8ff
--- a/targets/cmsis/TARGET_STM/TARGET_STM32F1/stm32f1xx_hal_can.c Thu May 05 21:00:11 2016 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32F1/stm32f1xx_hal_can.c Mon May 09 18:30:12 2016 +0100 @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f1xx_hal_can.c * @author MCD Application Team - * @version V1.0.0 - * @date 15-December-2014 + * @version V1.0.4 + * @date 29-April-2016 * @brief CAN HAL module driver. * This file provides firmware functions to manage the following * functionalities of the Controller Area Network (CAN) peripheral: @@ -73,7 +73,7 @@ ****************************************************************************** * @attention * - * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> + * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -197,7 +197,7 @@ if(hcan->State == HAL_CAN_STATE_RESET) { /* Allocate lock resource and initialize it */ - hcan-> Lock = HAL_UNLOCKED; + hcan->Lock = HAL_UNLOCKED; /* Init the low level hardware */ HAL_CAN_MspInit(hcan); } @@ -476,6 +476,8 @@ */ __weak void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcan); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_CAN_MspInit can be implemented in the user file */ @@ -489,6 +491,8 @@ */ __weak void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcan); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_CAN_MspDeInit can be implemented in the user file */ @@ -1166,6 +1170,8 @@ /* Call the Error call Back in case of Errors */ if(hcan->ErrorCode != HAL_CAN_ERROR_NONE) { + /* Clear ERRI Flag */ + hcan->Instance->MSR |= CAN_MSR_ERRI; /* Set the CAN state ready to be able to start again the process */ hcan->State = HAL_CAN_STATE_READY; @@ -1182,6 +1188,8 @@ */ __weak void HAL_CAN_TxCpltCallback(CAN_HandleTypeDef* hcan) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcan); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_CAN_TxCpltCallback can be implemented in the user file */ @@ -1195,6 +1203,8 @@ */ __weak void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* hcan) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcan); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_CAN_RxCpltCallback can be implemented in the user file */ @@ -1208,6 +1218,8 @@ */ __weak void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hcan); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_CAN_ErrorCallback can be implemented in the user file */