79static inline void hw_eth_init(
void);
88static inline void hw_eth_init(
void) {
93 __HAL_RCC_SYSCFG_CLK_ENABLE();
96 __HAL_RCC_GPIOA_CLK_ENABLE();
97 __HAL_RCC_GPIOB_CLK_ENABLE();
98 __HAL_RCC_GPIOC_CLK_ENABLE();
104 GPIO_InitStructure.
Mode = GPIO_MODE_AF_PP;
107 GPIO_InitStructure.
Alternate = GPIO_AF11_ETH;
110 GPIO_InitStructure.
Pin = GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_7;
111 HAL_GPIO_Init(
GPIOA, &GPIO_InitStructure);
114 GPIO_InitStructure.
Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13;
115 HAL_GPIO_Init(
GPIOB, &GPIO_InitStructure);
118 GPIO_InitStructure.
Pin = GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5;
119 HAL_GPIO_Init(
GPIOC, &GPIO_InitStructure);
122 HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_PLLCLK, RCC_MCODIV_2);
#define GPIOC
Definition MK60D10.h:6918
#define GPIOB
Definition MK60D10.h:6914
#define GPIOA
Definition MK60D10.h:6910
#define GPIO_NOPULL
Definition stm32f1xx_hal_gpio.h:153
#define GPIO_SPEED_FREQ_VERY_HIGH
Definition stm32f2xx_hal_gpio.h:144
#define SYSCFG_PMC_MII_RMII_SEL
Definition stm32f207xx.h:11111
void stm32f2xxEthInitGpio(NetInterface *interface)
Externally linked API for ETH configuration.
Definition hw_eth.h:84
Header file of GPIO HAL module.
Header file of RCC HAL module.
GPIO Init structure definition.
Definition stm32f1xx_hal_gpio.h:48
uint32_t Mode
Definition stm32f1xx_hal_gpio.h:52
uint32_t Alternate
Definition stm32f2xx_hal_gpio.h:61
uint32_t Pull
Definition stm32f1xx_hal_gpio.h:55
uint32_t Pin
Definition stm32f1xx_hal_gpio.h:49
uint32_t Speed
Definition stm32f1xx_hal_gpio.h:58