stmhal: Fix machine.unique_id() function to work for all MCUs.

This commit is contained in:
Damien George 2016-04-17 12:18:50 +01:00
parent 31f5dc065a
commit 5e247a5192
1 changed files with 1 additions and 1 deletions

View File

@ -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);