mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/cmsis/TARGET_STM/TARGET_DISCO_F407VG/stm32f4xx_hal_eth.c
- Revision:
- 242:7074e42da0b2
- Parent:
- 133:d4dda5c437f0
--- a/targets/cmsis/TARGET_STM/TARGET_DISCO_F407VG/stm32f4xx_hal_eth.c Thu Jun 26 10:30:09 2014 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_DISCO_F407VG/stm32f4xx_hal_eth.c Fri Jun 27 07:30:09 2014 +0100 @@ -2,8 +2,8 @@ ****************************************************************************** * @file stm32f4xx_hal_eth.c * @author MCD Application Team - * @version V1.0.0 - * @date 18-February-2014 + * @version V1.1.0RC2 + * @date 14-May-2014 * @brief ETH HAL module driver. * This file provides firmware functions to manage the following * functionalities of the Ethernet (ETH) peripheral: @@ -152,7 +152,8 @@ /** * @brief Initializes the Ethernet MAC and DMA according to default * parameters. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth) @@ -389,7 +390,8 @@ /** * @brief De-Initializes the ETH peripheral. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth) @@ -412,7 +414,8 @@ /** * @brief Initializes the DMA Tx descriptors in chain mode. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param DMATxDescTab: Pointer to the first Tx desc list * @param TxBuff: Pointer to the first TxBuffer list * @param TxBuffCount: Number of the used Tx desc in the list @@ -478,7 +481,8 @@ /** * @brief Initializes the DMA Rx descriptors in chain mode. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param DMARxDescTab: Pointer to the first Rx desc list * @param RxBuff: Pointer to the first RxBuffer list * @param RxBuffCount: Number of the used Rx desc in the list @@ -547,7 +551,8 @@ /** * @brief Initializes the ETH MSP. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) @@ -559,7 +564,8 @@ /** * @brief DeInitializes ETH MSP. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth) @@ -588,7 +594,7 @@ HAL_ETH_GetReceivedFrame_IT(); (+) Read from an External PHY register HAL_ETH_ReadPHYRegister(); - (+) Writo to an External PHY register + (+) Write to an External PHY register HAL_ETH_WritePHYRegister(); @endverbatim @@ -598,7 +604,8 @@ /** * @brief Sends an Ethernet frame. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param FrameLength: Amount of data to be sent * @retval HAL status */ @@ -711,7 +718,8 @@ /** * @brief Checks for received frames. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth) @@ -789,7 +797,8 @@ /** * @brief Gets the Received frame in interrupt mode. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth) @@ -873,7 +882,8 @@ /** * @brief This function handles ETH interrupt request. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL status */ void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth) @@ -932,7 +942,8 @@ /** * @brief Tx Transfer completed callbacks. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth) @@ -944,7 +955,8 @@ /** * @brief Rx Transfer completed callbacks. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth) @@ -956,7 +968,8 @@ /** * @brief Ethernet transfer error callbacks - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ __weak void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth) @@ -968,15 +981,15 @@ /** * @brief Reads a PHY register - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. * This parameter can be one of the following values: - * @arg PHY_BCR: Transceiver Basic Control Register - * @arg PHY_BSR: Transceiver Basic Status Register - * @arg More PHY register could be read depending on the used PHY + * PHY_BCR: Transceiver Basic Control Register, + * PHY_BSR: Transceiver Basic Status Register. + * More PHY register could be read depending on the used PHY * @param RegValue: PHY register value - * @retval HAL_TIMEOUT: in case of timeout - * MACMIIDR register value: Data read from the selected PHY register (correct read ) + * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue) { @@ -1037,11 +1050,12 @@ /** * @brief Writes to a PHY register. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param PHYReg: PHY register address, is the index of one of the 32 PHY register. * This parameter can be one of the following values: - * @arg PHY_BCR: Transceiver Control Register - * @arg More PHY register could be written depending on the used PHY + * PHY_BCR: Transceiver Control Register. + * More PHY register could be written depending on the used PHY * @param RegValue: the value to write * @retval HAL status */ @@ -1129,7 +1143,8 @@ /** * @brief Enables Ethernet MAC and DMA reception/transmission - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth) @@ -1167,7 +1182,8 @@ /** * @brief Stop Ethernet MAC and DMA reception/transmission - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL status */ HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth) @@ -1205,7 +1221,8 @@ /** * @brief Set ETH MAC Configuration. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param macconf: MAC Configuration structure * @retval HAL status */ @@ -1371,7 +1388,8 @@ /** * @brief Sets ETH DMA Configuration. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param dmaconf: DMA Configuration structure * @retval HAL status */ @@ -1478,7 +1496,8 @@ /** * @brief Return the ETH HAL state - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval HAL state */ HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth) @@ -1493,7 +1512,8 @@ /** * @brief Configures Ethernet MAC and DMA with default parameters. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param err: Ethernet Init error * @retval HAL status */ @@ -1749,7 +1769,8 @@ /** * @brief Configures the selected MAC address. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @param MacAddr: The MAC address to configure * This parameter can be one of the following values: * @arg ETH_MAC_Address0: MAC Address0 @@ -1779,7 +1800,8 @@ /** * @brief Enables the MAC transmission. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_MACTransmissionEnable(ETH_HandleTypeDef *heth) @@ -1798,7 +1820,8 @@ /** * @brief Disables the MAC transmission. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_MACTransmissionDisable(ETH_HandleTypeDef *heth) @@ -1817,7 +1840,8 @@ /** * @brief Enables the MAC reception. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_MACReceptionEnable(ETH_HandleTypeDef *heth) @@ -1836,7 +1860,8 @@ /** * @brief Disables the MAC reception. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_MACReceptionDisable(ETH_HandleTypeDef *heth) @@ -1855,7 +1880,8 @@ /** * @brief Enables the DMA transmission. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_DMATransmissionEnable(ETH_HandleTypeDef *heth) @@ -1866,7 +1892,8 @@ /** * @brief Disables the DMA transmission. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_DMATransmissionDisable(ETH_HandleTypeDef *heth) @@ -1877,7 +1904,8 @@ /** * @brief Enables the DMA reception. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_DMAReceptionEnable(ETH_HandleTypeDef *heth) @@ -1888,7 +1916,8 @@ /** * @brief Disables the DMA reception. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_DMAReceptionDisable(ETH_HandleTypeDef *heth) @@ -1899,7 +1928,8 @@ /** * @brief Clears the ETHERNET transmit FIFO. - * @param heth: ETH handle + * @param heth: pointer to a ETH_HandleTypeDef structure that contains + * the configuration information for ETHERNET module * @retval None */ static void ETH_FlushTransmitFIFO(ETH_HandleTypeDef *heth)