From 122434c371947126266678b290b190caa34e4a06 Mon Sep 17 00:00:00 2001 From: Alex Taradov Date: Tue, 9 May 2017 22:02:15 -0700 Subject: [PATCH] Added variable serial number (now in DAP as well) --- platform/samd11/dap_config.h | 3 ++- platform/samd11/main.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/samd11/dap_config.h b/platform/samd11/dap_config.h index 7589263..86cd8e4 100644 --- a/platform/samd11/dap_config.h +++ b/platform/samd11/dap_config.h @@ -62,7 +62,7 @@ // DAP_CONFIG_PRODUCT_STR must contain "CMSIS-DAP" to be compatible with the standard #define DAP_CONFIG_VENDOR_STR "Alex Taradov" #define DAP_CONFIG_PRODUCT_STR "Generic CMSIS-DAP Adapter" -#define DAP_CONFIG_SER_NUM_STR "123456" +#define DAP_CONFIG_SER_NUM_STR usb_serial_number #define DAP_CONFIG_FW_VER_STR "v0.1" #define DAP_CONFIG_DEVICE_VENDOR_STR NULL #define DAP_CONFIG_DEVICE_NAME_STR NULL @@ -78,6 +78,7 @@ /*- Prototypes --------------------------------------------------------------*/ extern void app_led_set_state(int state); +extern char usb_serial_number[16]; /*- Implementations ---------------------------------------------------------*/ diff --git a/platform/samd11/main.c b/platform/samd11/main.c index fe7cd07..565005a 100644 --- a/platform/samd11/main.c +++ b/platform/samd11/main.c @@ -64,7 +64,6 @@ /*- Variables ---------------------------------------------------------------*/ static alignas(4) uint8_t app_request_buffer[DAP_CONFIG_PACKET_SIZE]; static alignas(4) uint8_t app_response_buffer[DAP_CONFIG_PACKET_SIZE]; -extern char usb_serial_number[16]; /*- Implementations ---------------------------------------------------------*/