Skip to content

Commit b41a14a

Browse files
dpgeorgepfalcon
authored andcommitted
esp8266: Add mp_hal_delay_us function.
1 parent f70873d commit b41a14a

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

esp8266/esp_mphal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ uint32_t mp_hal_ticks_ms(void) {
8686
return system_get_time() / 1000;
8787
}
8888

89+
uint32_t mp_hal_ticks_us(void) {
90+
return system_get_time();
91+
}
92+
8993
void mp_hal_delay_ms(uint32_t delay) {
9094
mp_hal_delay_us(delay * 1000);
9195
}

esp8266/esp_mphal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ void ets_isr_mask(unsigned);
3333
void mp_hal_init(void);
3434
void mp_hal_feed_watchdog(void);
3535

36+
uint32_t mp_hal_ticks_us(void);
3637
void mp_hal_delay_us(uint32_t);
3738
void mp_hal_set_interrupt_char(int c);
3839
uint32_t mp_hal_get_cpu_freq(void);

0 commit comments

Comments
 (0)