1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2018-11-23     flybreak     first version
9  */
10 
11 #include <board.h>
12 #include <drv_gpio.h>
13 
14 #define RESET_IO GET_PIN(D, 3)
15 
phy_reset(void)16 void phy_reset(void)
17 {
18     rt_pin_write(RESET_IO, PIN_LOW);
19     rt_thread_mdelay(50);
20     rt_pin_write(RESET_IO, PIN_HIGH);
21 }
22 
phy_init(void)23 int phy_init(void)
24 {
25     rt_pin_mode(RESET_IO, PIN_MODE_OUTPUT);
26     rt_pin_write(RESET_IO, PIN_HIGH);
27     return RT_EOK;
28 }
29 INIT_BOARD_EXPORT(phy_init);
30