diff --git a/class/dfu/dfu.c b/class/dfu/dfu.c index 0db5be7..5cf86b3 100644 --- a/class/dfu/dfu.c +++ b/class/dfu/dfu.c @@ -1,7 +1,7 @@ #include "class/dfu/dfu.h" -DFU_State dfu_state = DFU_STATE_dfuIDLE; -DFU_Status dfu_status = DFU_STATUS_OK; +DFU_State dfu_state; +DFU_Status dfu_status; uint16_t dfu_poll_timeout; uint16_t dfu_block_offset; diff --git a/samd/usb_samd.c b/samd/usb_samd.c index 0f22c7a..2763c98 100644 --- a/samd/usb_samd.c +++ b/samd/usb_samd.c @@ -254,16 +254,3 @@ void USB_Handler() { usb_cb_completion(); } -void* samd_serial_number_string_descriptor() { - char buf[27]; - - const unsigned char* id = (unsigned char*) 0x0080A00C; - for (int i=0; i<26; i++) { - unsigned idx = (i*5)/8; - unsigned pos = (i*5)%8; - unsigned val = ((id[idx] >> pos) | (id[idx+1] << (8-pos))) & ((1<<5)-1); - buf[i] = "0123456789ABCDFGHJKLMNPQRSTVWXYZ"[val]; - } - buf[26] = 0; - return usb_string_to_descriptor(buf); -} diff --git a/samd/usb_samd.h b/samd/usb_samd.h index 73e3b59..61e7dca 100644 --- a/samd/usb_samd.h +++ b/samd/usb_samd.h @@ -12,5 +12,3 @@ extern const uint8_t usb_num_endpoints; #define USB_ENDPOINTS(NUM_EP) \ const uint8_t usb_num_endpoints = (NUM_EP); \ UsbDeviceDescriptor usb_endpoints[(NUM_EP)+1]; - -void* samd_serial_number_string_descriptor();