fix LPC812 PWM
Fork of mbed-dev by
Diff: targets/cmsis/TARGET_STM/TARGET_STM32L0/stm32l0xx_hal_lptim.c
- Revision:
- 113:b3775bf36a83
- Parent:
- 0:9b334a45a8ff
--- a/targets/cmsis/TARGET_STM/TARGET_STM32L0/stm32l0xx_hal_lptim.c Sun Apr 17 17:45:10 2016 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32L0/stm32l0xx_hal_lptim.c Tue Apr 19 11:15:15 2016 +0100 @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32l0xx_hal_lptim.c * @author MCD Application Team - * @version V1.2.0 - * @date 06-February-2015 + * @version V1.5.0 + * @date 8-January-2016 * @brief LPTIM HAL module driver. * * This file provides firmware functions to manage the following @@ -94,7 +94,7 @@ ****************************************************************************** * @attention * - * <h2><center>© COPYRIGHT(c) 2015 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: @@ -128,13 +128,13 @@ * @{ */ +#ifdef HAL_LPTIM_MODULE_ENABLED + /** @addtogroup LPTIM * @brief LPTIM HAL module driver. * @{ */ -#ifdef HAL_LPTIM_MODULE_ENABLED - /** @addtogroup LPTIM_Exported_Functions * @{ */ @@ -195,6 +195,9 @@ if(hlptim->State == HAL_LPTIM_STATE_RESET) { + /* Allocate lock resource and initialize it */ + hlptim->Lock = HAL_UNLOCKED; + /* Init the low level hardware */ HAL_LPTIM_MspInit(hlptim); } @@ -288,6 +291,9 @@ */ __weak void HAL_LPTIM_MspInit(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_MspInit could be implemented in the user file */ @@ -300,6 +306,9 @@ */ __weak void HAL_LPTIM_MspDeInit(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_MspDeInit could be implemented in the user file */ @@ -1470,6 +1479,9 @@ */ __weak void HAL_LPTIM_CompareMatchCallback(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_CompareMatchCallback could be implemented in the user file */ @@ -1482,6 +1494,9 @@ */ __weak void HAL_LPTIM_AutoReloadMatchCallback(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_AutoReloadMatchCallback could be implemented in the user file */ @@ -1494,6 +1509,9 @@ */ __weak void HAL_LPTIM_TriggerCallback(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_TriggerCallback could be implemented in the user file */ @@ -1506,6 +1524,9 @@ */ __weak void HAL_LPTIM_CompareWriteCallback(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_CompareWriteCallback could be implemented in the user file */ @@ -1518,6 +1539,9 @@ */ __weak void HAL_LPTIM_AutoReloadWriteCallback(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_AutoReloadWriteCallback could be implemented in the user file */ @@ -1530,6 +1554,9 @@ */ __weak void HAL_LPTIM_DirectionUpCallback(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_DirectionUpCallback could be implemented in the user file */ @@ -1542,6 +1569,9 @@ */ __weak void HAL_LPTIM_DirectionDownCallback(LPTIM_HandleTypeDef *hlptim) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(hlptim); + /* NOTE : This function Should not be modified, when the callback is needed, the HAL_LPTIM_DirectionDownCallback could be implemented in the user file */ @@ -1587,13 +1617,11 @@ * @} */ -#endif /* HAL_LPTIM_MODULE_ENABLED */ - - /** * @} */ +#endif /* HAL_LPTIM_MODULE_ENABLED */ /** * @} */