File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727// This file is never compiled standalone, it's included directly from
2828// extmod/modmachine.c via MICROPY_PY_MACHINE_INCLUDEFILE.
2929
30+ #include "se_services.h"
31+
3032#define MICROPY_PY_MACHINE_EXTRA_GLOBALS \
3133 { MP_ROM_QSTR(MP_QSTR_Pin), MP_ROM_PTR(&machine_pin_type) }, \
3234 { MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&machine_timer_type) }, \
@@ -36,11 +38,13 @@ static void mp_machine_idle(void) {
3638}
3739
3840static mp_obj_t mp_machine_unique_id (void ) {
39- return mp_obj_new_bytes ((const uint8_t * )"ABCD" , 4 );
41+ uint8_t id [5 ];
42+ se_services_get_unique_id (id );
43+ return mp_obj_new_bytes (id , sizeof (id ));
4044}
4145
4246NORETURN static void mp_machine_reset (void ) {
43- NVIC_SystemReset ();
47+ se_services_reset_soc ();
4448}
4549
4650NORETURN void mp_machine_bootloader (size_t n_args , const mp_obj_t * args ) {
You can’t perform that action at this time.
0 commit comments