diff options
Diffstat (limited to 'bsps/arm/stm32h7/hal/stm32h7xx_hal_mdios.c')
-rw-r--r-- | bsps/arm/stm32h7/hal/stm32h7xx_hal_mdios.c | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_hal_mdios.c b/bsps/arm/stm32h7/hal/stm32h7xx_hal_mdios.c index 2039d5ec63..ac4e067d9b 100644 --- a/bsps/arm/stm32h7/hal/stm32h7xx_hal_mdios.c +++ b/bsps/arm/stm32h7/hal/stm32h7xx_hal_mdios.c @@ -10,6 +10,17 @@ * + Peripheral Control functions * * + ****************************************************************************** + * @attention + * + * Copyright (c) 2017 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** @verbatim =============================================================================== ##### How to use this driver ##### @@ -55,8 +66,8 @@ (@) HAL_MDIOS_IRQHandler() must be called from the MDIOS IRQ Handler, to handle the interrupt and execute the previous callbacks - (#) Reset the MDIOS peripheral and all related ressources by calling the HAL_MDIOS_DeInit() API. - (##) HAL_MDIOS_MspDeInit() must be implemented to reset low level ressources + (#) Reset the MDIOS peripheral and all related resources by calling the HAL_MDIOS_DeInit() API. + (##) HAL_MDIOS_MspDeInit() must be implemented to reset low level resources (GPIO, Clocks, NVIC configuration ...) *** Callback registration *** @@ -112,18 +123,6 @@ @endverbatim - ****************************************************************************** - * @attention - * - * <h2><center>© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.</center></h2> - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ @@ -144,18 +143,31 @@ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ +/** @defgroup MDIOS_Private_Define MDIOS Private Define + * @ingroup RTEMSBSPsARMSTM32H7 + * @{ + */ #define MDIOS_PORT_ADDRESS_SHIFT ((uint32_t)8) #define MDIOS_ALL_REG_FLAG ((uint32_t)0xFFFFFFFFU) #define MDIOS_ALL_ERRORS_FLAG ((uint32_t)(MDIOS_SR_PERF | MDIOS_SR_SERF | MDIOS_SR_TERF)) #define MDIOS_DIN_BASE_ADDR (MDIOS_BASE + 0x100U) #define MDIOS_DOUT_BASE_ADDR (MDIOS_BASE + 0x180U) - +/** + * @} + */ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ #if (USE_HAL_MDIOS_REGISTER_CALLBACKS == 1) +/** @defgroup MDIOS_Private_Functions MDIOS Private Functions + * @ingroup RTEMSBSPsARMSTM32H7 + * @{ + */ static void MDIOS_InitCallbacksToDefault(MDIOS_HandleTypeDef *hmdios); +/** + * @} + */ #endif /* USE_HAL_MDIOS_REGISTER_CALLBACKS */ /* Private functions ---------------------------------------------------------*/ /* Exported functions --------------------------------------------------------*/ @@ -438,7 +450,7 @@ HAL_StatusTypeDef HAL_MDIOS_RegisterCallback(MDIOS_HandleTypeDef *hmdios, HAL_MD /** * @brief Unregister an MDIOS Callback - * MDIOS callabck is redirected to the weak predefined callback + * MDIOS callback is redirected to the weak predefined callback * @param hmdios mdios handle * @param CallbackID ID of the callback to be unregistered * This parameter can be one of the following values: @@ -937,6 +949,9 @@ HAL_MDIOS_StateTypeDef HAL_MDIOS_GetState(MDIOS_HandleTypeDef *hmdios) */ #if (USE_HAL_MDIOS_REGISTER_CALLBACKS == 1) +/** @addtogroup MDIOS_Private_Functions + * @{ + */ static void MDIOS_InitCallbacksToDefault(MDIOS_HandleTypeDef *hmdios) { /* Init the MDIOS Callback settings */ @@ -945,11 +960,10 @@ static void MDIOS_InitCallbacksToDefault(MDIOS_HandleTypeDef *hmdios) hmdios->ErrorCallback = HAL_MDIOS_ErrorCallback; /* Legacy weak ErrorCallback */ hmdios->WakeUpCallback = HAL_MDIOS_WakeUpCallback; /* Legacy weak WakeUpCallback */ } -#endif /* USE_HAL_MDIOS_REGISTER_CALLBACKS */ - /** * @} */ +#endif /* USE_HAL_MDIOS_REGISTER_CALLBACKS */ #endif /* HAL_MDIOS_MODULE_ENABLED */ /** * @} @@ -959,4 +973,3 @@ static void MDIOS_InitCallbacksToDefault(MDIOS_HandleTypeDef *hmdios) * @} */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |