]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/src/rpp/eth.c
Merge port and gpio definitions into one file in the DRV layer
[pes-rpp/rpp-lib.git] / rpp / src / rpp / eth.c
index bf8efb832fdfd45f736218b299eb2f0de5e52a42..0d3fd7230e6fc59c8a15e68514a0fec677eb6506 100644 (file)
@@ -60,7 +60,7 @@
 #include "netif/ppp_oe.h"
 /* end - lwIP headers */
 
-#include "hal/hal.h"
+#include "drv/digital_io.h"
 #include "sys/sys.h" /* includes - sys/phy_dp83848h.h */
 #include "drv/emac.h"
 #include "os/os.h"
@@ -521,16 +521,17 @@ static err_t rpp_eth_hw_init(struct hdkif *hdkif)
         */
        index = configCPU_CLOCK_HZ/1000000;
 #endif /* NO_SYS */
-       hal_gpio_pin_set_value(*hal_gpio_pin_get_dsc(PIN_NAME_ETHRST, -1), 0);
-       while(index--)
-               ;
+       dio_gpio_pin_set_value(*dio_gpio_pin_get_dsc(PIN_NAME_ETHRST, -1), 0);
+       while (index--) ;
 #endif /* !INIT_ONLY_AFTER_RESET */
+          /* we have pull-down resistor, so after reset, we only need to put ETHRST pin to log. high */
+       dio_gpio_pin_set_value(*dio_gpio_pin_get_dsc(DIO_PIN_NAME_ETHRST, -1), 1);
 
        /*
         * We have pull-down resistor, so after reset, we only need
         * to put ETHRST pin to log. high
         */
-       hal_gpio_pin_set_value(*hal_gpio_pin_get_dsc(PIN_NAME_ETHRST, -1), 1);
+       dio_gpio_pin_set_value(*dio_gpio_pin_get_dsc(DIO_PIN_NAME_ETHRST, -1), 1);
 
        /* Initialize EMAC control module and EMAC module */
        EMACInit(hdkif->emac_ctrl_base, hdkif->emac_base);