Skip to content
Snippets Groups Projects
Select Git revision
  • 9251ea69f7bc59f94436b71b7c89bcb9a671273f
  • master default protected
  • bme680_demoapp
  • bme680
  • rahix/simple_menu
  • genofire/ble-rewrite
  • rahix/batt
  • schneider/bonding2
  • renze/safe_mode
  • renze/hatchery_apps
  • schneider/fundamental-test
  • koalo/factory-reset
  • ios-workarounds
  • msgctl/gfx_rle
  • msgctl/faultscreen
  • msgctl/textbuffer_api
  • schneider/bonding
  • schneider/bootloader-update-9a0d158
  • schneider/bsec
  • rahix/bma
  • rahix/bhi
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
26 results

portexpander.h

Blame
  • Forked from card10 / firmware
    Source project has a limited visibility.
    utime.c 1.13 KiB
    #include "py/mpconfig.h"
    #include "extmod/utime_mphal.h"
    
    #include "mxc_delay.h"
    
    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), MP_ROM_PTR(&mp_utime_sleep_obj) },
    	{ 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) },
    #if 0
    	/* TODO: Implement those */
    	{MP_ROM_QSTR(MP_QSTR_ticks_ms), MP_ROM_PTR(&mp_utime_ticks_ms_obj)},
    	{MP_ROM_QSTR(MP_QSTR_ticks_us), MP_ROM_PTR(&mp_utime_ticks_us_obj)},
    	{MP_ROM_QSTR(MP_QSTR_ticks_cpu), MP_ROM_PTR(&mp_utime_ticks_cpu_obj)},
    	{MP_ROM_QSTR(MP_QSTR_ticks_add), MP_ROM_PTR(&mp_utime_ticks_add_obj)},
    	{MP_ROM_QSTR(MP_QSTR_ticks_diff), MP_ROM_PTR(&mp_utime_ticks_diff_obj)},
    #endif
    };
    static MP_DEFINE_CONST_DICT(time_module_globals, time_module_globals_table);
    
    const mp_obj_module_t mp_module_utime = {
    	.base    = { &mp_type_module },
    	.globals = (mp_obj_dict_t *)&time_module_globals,
    };
    
    /* Register the module to make it available in Python */
    MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, MODULE_UTIME_ENABLED);