nrf5: Adding sleep_us to modutime.c and exposing mp_hal_delay_us in hal/hal_time.h

This commit is contained in:
Glenn Ruben Bakke 2017-01-03 21:15:53 +01:00
parent 70198b07a5
commit 7b6bdc4c2b
2 changed files with 3 additions and 0 deletions

View File

@ -29,4 +29,6 @@
void mp_hal_delay_ms(mp_uint_t ms);
void mp_hal_delay_us(mp_uint_t us);
#endif // HAL_TIME_H__

View File

@ -42,6 +42,7 @@ STATIC const mp_rom_map_elem_t time_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_utime) },
{ MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_utime_sleep_ms_obj) },
{ MP_ROM_QSTR(MP_QSTR_sleep_us), MP_ROM_PTR(&mp_utime_sleep_us_obj) },
};
STATIC MP_DEFINE_CONST_DICT(time_module_globals, time_module_globals_table);