mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 21:20:13 +01:00
esp8266: Add a bunch of miscellaneous methods
This commit is contained in:
committed by
Paul Sokolovsky
parent
25a8a42447
commit
286ced4c2f
@@ -149,6 +149,12 @@ STATIC mp_obj_t pyb_hard_reset(void) {
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_hard_reset_obj, pyb_hard_reset);
|
||||
|
||||
STATIC mp_obj_t pyb_unique_id(void) {
|
||||
uint32_t id = system_get_chip_id();
|
||||
return mp_obj_new_bytes((byte *)&id, sizeof(id));
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_unique_id_obj, pyb_unique_id);
|
||||
|
||||
STATIC const mp_map_elem_t pyb_module_globals_table[] = {
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_pyb) },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user