forked from xuos/xiuos
add imxrt1052 board mdelay function
This commit is contained in:
@@ -81,14 +81,11 @@
|
||||
/*******************************************************************************
|
||||
* Code
|
||||
******************************************************************************/
|
||||
extern void ImxrtMsDelay(uint32 ms);
|
||||
|
||||
void enet_delay(void)
|
||||
void enet_delay(uint32 ms)
|
||||
{
|
||||
volatile uint32_t i = 0;
|
||||
for (i = 0; i < 1000000; ++i)
|
||||
{
|
||||
__asm("NOP"); /* delay */
|
||||
}
|
||||
ImxrtMsDelay(ms);
|
||||
}
|
||||
|
||||
void Time_Update_LwIP(void)
|
||||
@@ -124,7 +121,7 @@ void ethernetif_gpio_init(void)
|
||||
GPIO_PinInit(GPIO1, 3, &gpio_config);
|
||||
/* pull up the ENET_INT before RESET. */
|
||||
GPIO_WritePinOutput(GPIO1, 3, 0);
|
||||
enet_delay();
|
||||
enet_delay(30);
|
||||
GPIO_WritePinOutput(GPIO1, 3, 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user