![]() |
STM32F769IDiscovery
1.00
uDANTE Audio Networking with STM32F7 DISCO board
|
MDIOS HAL module driver. More...
#include "stm32f7xx_hal.h"
Go to the source code of this file.
MDIOS HAL module driver.
=============================================================================== ##### How to use this driver ##### =============================================================================== [..] The MDIOS HAL driver can be used as follow: (#) Declare a MDIOS_HandleTypeDef handle structure. (#) Initialize the MDIOS low level resources by implementing the HAL_MDIOS_MspInit() API: (##) Enable the MDIOS interface clock. (##) MDIOS pins configuration: (+++) Enable clocks for the MDIOS GPIOs. (+++) Configure the MDIOS pins as alternate function. (##) NVIC configuration if you need to use interrupt process: (+++) Configure the MDIOS interrupt priority. (+++) Enable the NVIC MDIOS IRQ handle. (#) Program the Port Address and the Preamble Check in the Init structure. (#) Initialize the MDIOS registers by calling the HAL_MDIOS_Init() API. (#) Perform direct slave read/write operations using the following APIs: (##) Read the value of a DINn register: HAL_MDIOS_ReadReg() (##) Write a value to a DOUTn register: HAL_MDIOS_WriteReg() (#) Get the Master read/write operations flags using the following APIs: (##) Bit map of DOUTn registers read by Master: HAL_MDIOS_GetReadRegAddress() (##) Bit map of DINn registers written by Master : HAL_MDIOS_GetWrittenRegAddress() (#) Clear the read/write flags using the following APIs: (##) Clear read flags of a set of registers: HAL_MDIOS_ClearReadRegAddress() (##) Clear write flags of a set of registers: HAL_MDIOS_ClearWriteRegAddress() (#) Enable interrupts on events using HAL_MDIOS_EnableEvents(), when called the MDIOS will generate an interrupt in the following cases: (##) a DINn register written by the Master (##) a DOUTn register read by the Master (##) an error occur (@) A callback is executed for each genereted interrupt, so the driver provide the following HAL_MDIOS_WriteCpltCallback(), HAL_MDIOS_ReadCpltCallback() and HAL_MDIOS_ErrorCallback() (@) 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 (GPIO, Clocks, NVIC configuration ...)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32f7xx_hal_mdios.c.