diff --git a/app/modules/u8g.c b/app/modules/u8g.c index 1600dc10..2ed619ea 100644 --- a/app/modules/u8g.c +++ b/app/modules/u8g.c @@ -820,6 +820,28 @@ static void lu8g_digital_write( u8g_t *u8g, uint8_t pin_index, uint8_t value ) platform_gpio_write( pin, value ); } +void u8g_Delay(uint16_t msec) +{ + const uint16_t chunk = 50; + + while (msec > chunk) + { + os_delay_us( chunk*1000 ); + msec -= chunk; + } + if (msec > 0) + os_delay_us( msec*1000 ); +} +void u8g_MicroDelay(void) +{ + os_delay_us( 1 ); +} +void u8g_10MicroDelay(void) +{ + os_delay_us( 10 ); +} + + uint8_t u8g_com_esp8266_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { switch(msg) diff --git a/app/u8glib/u8g_delay.c b/app/u8glib/u8g_delay.c index d38e02a5..bdf8a760 100644 --- a/app/u8glib/u8g_delay.c +++ b/app/u8glib/u8g_delay.c @@ -71,7 +71,7 @@ # define USE_AVR_DELAY #elif defined(__18CXX) # define USE_PIC18_DELAY -#elif defined(__arm__) +#elif defined(__arm__) || defined(__XTENSA__) /* do not define anything, all procedures are expected to be defined outside u8glib */ /*