From 05dacde043f98efd8c5cfdf0ef027192911e636e Mon Sep 17 00:00:00 2001 From: lucianom Date: Tue, 19 May 2020 13:45:52 +0100 Subject: [PATCH] Add SERIAL_STR configurable from xua_conf.h --- lib_xua/api/xua_conf_default.h | 10 ++++++++++ lib_xua/src/core/endpoint0/xua_endpoint0.c | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib_xua/api/xua_conf_default.h b/lib_xua/api/xua_conf_default.h index 79aa061b..a1fc3514 100644 --- a/lib_xua/api/xua_conf_default.h +++ b/lib_xua/api/xua_conf_default.h @@ -442,6 +442,16 @@ #define CODEC_MASTER (0) #endif +/** + * @brief Serial Number String used by the device + * + * Default: "" + */ +#ifndef SERIAL_STR +#define SERIAL_STR "" +#endif + + /** * @brief Vendor String used by the device. This is also pre-pended to various strings used by the design. * diff --git a/lib_xua/src/core/endpoint0/xua_endpoint0.c b/lib_xua/src/core/endpoint0/xua_endpoint0.c index e91d61fc..384aee2a 100755 --- a/lib_xua/src/core/endpoint0/xua_endpoint0.c +++ b/lib_xua/src/core/endpoint0/xua_endpoint0.c @@ -118,7 +118,8 @@ char g_product_str[XUA_MAX_STR_LEN] = PRODUCT_STR_A2; char g_product_str[XUA_MAX_STR_LEN] = PRODUCT_STR_A1; #endif -char g_serial_str[XUA_MAX_STR_LEN] = ""; +/* Global variable for current USB Serial Number strings */ +char g_serial_str[XUA_MAX_STR_LEN] = SERIAL_STR; /* Subslot */ const unsigned g_subSlot_Out_HS[OUTPUT_FORMAT_COUNT] = {HS_STREAM_FORMAT_OUTPUT_1_SUBSLOT_BYTES,