diff options
author | Dave Hylands <dhylands@gmail.com> | 2015-10-29 09:03:10 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-10-30 12:53:14 +0000 |
commit | b83d0b35e9b86424b997ef1ccf50e2d2a9659fcf (patch) | |
tree | c850772e6fcb879c986ec4bc28c8412ad9f78859 /stmhal/modmachine.c | |
parent | 823a961ecc4c4b3ed31c18676619e8cd595756cf (diff) |
stmhal: Add define for UNIQUE_ID address (differs per MCU)
Diffstat (limited to 'stmhal/modmachine.c')
-rw-r--r-- | stmhal/modmachine.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c index b452e223e..fa6a1f9dd 100644 --- a/stmhal/modmachine.c +++ b/stmhal/modmachine.c @@ -38,13 +38,14 @@ #include "pin.h" #include "timer.h" #include "usb.h" +#include MICROPY_HAL_H // machine.info([dump_alloc_table]) // Print out lots of information about the board. STATIC mp_obj_t machine_info(mp_uint_t n_args, const mp_obj_t *args) { // get and print unique id; 96 bits { - byte *id = (byte*)0x1fff7a10; + byte *id = (byte*)MP_HAL_UNIQUE_ID_ADDRESS; printf("ID=%02x%02x%02x%02x:%02x%02x%02x%02x:%02x%02x%02x%02x\n", id[0], id[1], id[2], id[3], id[4], id[5], id[6], id[7], id[8], id[9], id[10], id[11]); } |