From 5e247a5192548630342576adf8f58c6ad6f59bcb Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 17 Apr 2016 12:18:50 +0100 Subject: [PATCH] stmhal: Fix machine.unique_id() function to work for all MCUs. --- stmhal/modmachine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c index 7e2b1a63b8..1e4862044a 100644 --- a/stmhal/modmachine.c +++ b/stmhal/modmachine.c @@ -115,7 +115,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_info_obj, 0, 1, machine_info); // Returns a string of 12 bytes (96 bits), which is the unique ID for the MCU. STATIC mp_obj_t machine_unique_id(void) { - byte *id = (byte*)0x1fff7a10; + byte *id = (byte*)MP_HAL_UNIQUE_ID_ADDRESS; return mp_obj_new_bytes(id, 12); } MP_DEFINE_CONST_FUN_OBJ_0(machine_unique_id_obj, machine_unique_id);