add imxrt1052 board mdelay function

This commit is contained in:
Liu_Weichao
2023-01-10 17:21:10 +08:00
parent f8b845ca62
commit c621db2ca7
10 changed files with 975 additions and 25 deletions
@@ -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);
}