Skip to content

Commit

Permalink
chips/samd21: Use unique 128-bit serial number for USB serial
Browse files Browse the repository at this point in the history
Make each SAMD21 board unique without requiring managing serial
numbers separately.

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Jul 4, 2019
1 parent c2534a7 commit 18eff78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chips/samd21/ao-usb-samd21.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#define AO_POWER_MANAGEMENT 0
#endif

#ifndef AO_USB_DEVICE_ID_SERIAL
#define AO_USB_DEVICE_ID_SERIAL 1
#endif

#if USE_USB_FIFO
static struct ao_fifo ao_usb_rx_fifo;
#endif
Expand Down Expand Up @@ -328,7 +332,7 @@ ao_usb_ep0_in_start(uint16_t max)
struct ao_usb_line_coding ao_usb_line_coding = {115200, 0, 0, 8};

#if AO_USB_DEVICE_ID_SERIAL
static uint8_t ao_usb_serial[2 + 48];
static uint8_t ao_usb_serial[2 + 64];

/* Convert a 32-bit value to 8 hexidecimal UCS2 characters */
static void
Expand Down

0 comments on commit 18eff78

Please sign in to comment.