diff options
Diffstat (limited to 'usb-dfu-experiment')
-rw-r--r-- | usb-dfu-experiment/sam3u_chipid_usbserial.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usb-dfu-experiment/sam3u_chipid_usbserial.c b/usb-dfu-experiment/sam3u_chipid_usbserial.c index c62561e..b81e6b9 100644 --- a/usb-dfu-experiment/sam3u_chipid_usbserial.c +++ b/usb-dfu-experiment/sam3u_chipid_usbserial.c @@ -39,11 +39,13 @@ static int to_usb_string(unsigned char *out, int out_len, const char *in) static int chip_uid_to_usbstring(void) { - unsigned long uniqueID[4]; + unsigned char uniqueID[17]; int rc; + memset(uniqueID, 0, sizeof(uniqueID)); + FLASHD_Initialize(0); - rc = FLASHD_ReadUniqueID(uniqueID); + rc = FLASHD_ReadUniqueID((unsigned long *) uniqueID); if (rc != 0) return -EIO; |