Browse Source

esp8266: Add mp_hal_delay_us function.

pull/1865/head
Damien George 9 years ago
committed by Paul Sokolovsky
parent
commit
b41a14a4b9
  1. 4
      esp8266/esp_mphal.c
  2. 1
      esp8266/esp_mphal.h

4
esp8266/esp_mphal.c

@ -86,6 +86,10 @@ uint32_t mp_hal_ticks_ms(void) {
return system_get_time() / 1000;
}
uint32_t mp_hal_ticks_us(void) {
return system_get_time();
}
void mp_hal_delay_ms(uint32_t delay) {
mp_hal_delay_us(delay * 1000);
}

1
esp8266/esp_mphal.h

@ -33,6 +33,7 @@ void ets_isr_mask(unsigned);
void mp_hal_init(void);
void mp_hal_feed_watchdog(void);
uint32_t mp_hal_ticks_us(void);
void mp_hal_delay_us(uint32_t);
void mp_hal_set_interrupt_char(int c);
uint32_t mp_hal_get_cpu_freq(void);

Loading…
Cancel
Save