Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions class/dfu/dfu.c
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
13 changes: 0 additions & 13 deletions samd/usb_samd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 0 additions & 2 deletions samd/usb_samd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();