diff --git a/src/stm32f042/brain3.3/DAP/CMSIS_DAP_config.h b/src/stm32f042/brain3.3/DAP/CMSIS_DAP_config.h index 216de18..b84e921 100644 --- a/src/stm32f042/brain3.3/DAP/CMSIS_DAP_config.h +++ b/src/stm32f042/brain3.3/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -156,8 +157,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -165,8 +168,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f042/brain3.3/config.h b/src/stm32f042/brain3.3/config.h index 910ad63..72a0041 100644 --- a/src/stm32f042/brain3.3/config.h +++ b/src/stm32f042/brain3.3/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP42b" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define REMAP_USB 1 #define USB_NVIC_LINE NVIC_USB_IRQ #define USB_IRQ_NAME usb_isr diff --git a/src/stm32f042/dap42/DAP/CMSIS_DAP_config.h b/src/stm32f042/dap42/DAP/CMSIS_DAP_config.h index faf587a..c10214b 100644 --- a/src/stm32f042/dap42/DAP/CMSIS_DAP_config.h +++ b/src/stm32f042/dap42/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f042/dap42/config.h b/src/stm32f042/dap42/config.h index 7b3e901..837387f 100644 --- a/src/stm32f042/dap42/config.h +++ b/src/stm32f042/dap42/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP42" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define REMAP_USB 1 #define USB_NVIC_LINE NVIC_USB_IRQ #define USB_IRQ_NAME usb_isr diff --git a/src/stm32f042/dap42dc/DAP/CMSIS_DAP_config.h b/src/stm32f042/dap42dc/DAP/CMSIS_DAP_config.h index a91a178..47c9678 100644 --- a/src/stm32f042/dap42dc/DAP/CMSIS_DAP_config.h +++ b/src/stm32f042/dap42dc/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Serial Number string. diff --git a/src/stm32f042/dap42dc/config.h b/src/stm32f042/dap42dc/config.h index 578b9a4..ae6089a 100644 --- a/src/stm32f042/dap42dc/config.h +++ b/src/stm32f042/dap42dc/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP42dc" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define REMAP_USB 1 #define USB_NVIC_LINE NVIC_USB_IRQ #define USB_IRQ_NAME usb_isr diff --git a/src/stm32f042/dap42k6u/DAP/CMSIS_DAP_config.h b/src/stm32f042/dap42k6u/DAP/CMSIS_DAP_config.h index 1d64f7b..8ed7d0e 100644 --- a/src/stm32f042/dap42k6u/DAP/CMSIS_DAP_config.h +++ b/src/stm32f042/dap42k6u/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f042/dap42k6u/config.h b/src/stm32f042/dap42k6u/config.h index 56973d6..d008240 100644 --- a/src/stm32f042/dap42k6u/config.h +++ b/src/stm32f042/dap42k6u/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP42K6U" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define REMAP_USB 1 #define USB_NVIC_LINE NVIC_USB_IRQ #define USB_IRQ_NAME usb_isr diff --git a/src/stm32f042/kitchen42/DAP/CMSIS_DAP_config.h b/src/stm32f042/kitchen42/DAP/CMSIS_DAP_config.h index faf587a..c10214b 100644 --- a/src/stm32f042/kitchen42/DAP/CMSIS_DAP_config.h +++ b/src/stm32f042/kitchen42/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f042/kitchen42/config.h b/src/stm32f042/kitchen42/config.h index c643521..ba25b33 100644 --- a/src/stm32f042/kitchen42/config.h +++ b/src/stm32f042/kitchen42/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP42C" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define REMAP_USB 0 #define USB_NVIC_LINE NVIC_USB_IRQ #define USB_IRQ_NAME usb_isr diff --git a/src/stm32f042/tinydyne/DAP/CMSIS_DAP_config.h b/src/stm32f042/tinydyne/DAP/CMSIS_DAP_config.h index 7aa158f..a102b96 100644 --- a/src/stm32f042/tinydyne/DAP/CMSIS_DAP_config.h +++ b/src/stm32f042/tinydyne/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f042/tinydyne/config.h b/src/stm32f042/tinydyne/config.h index 93782cf..a55b303 100644 --- a/src/stm32f042/tinydyne/config.h +++ b/src/stm32f042/tinydyne/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "Tinydyne" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define REMAP_USB 1 #define USB_NVIC_LINE NVIC_USB_IRQ #define USB_IRQ_NAME usb_isr diff --git a/src/stm32f103/bluepill/DAP/CMSIS_DAP_config.h b/src/stm32f103/bluepill/DAP/CMSIS_DAP_config.h index df1963d..7b4d69e 100644 --- a/src/stm32f103/bluepill/DAP/CMSIS_DAP_config.h +++ b/src/stm32f103/bluepill/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f103/bluepill/config.h b/src/stm32f103/bluepill/config.h index 593835e..40fd255 100644 --- a/src/stm32f103/bluepill/config.h +++ b/src/stm32f103/bluepill/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP103-BLUEPILL" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define CAN_RX_AVAILABLE 0 #define CAN_TX_AVAILABLE 0 diff --git a/src/stm32f103/stlinkv2-1/DAP/CMSIS_DAP_config.h b/src/stm32f103/stlinkv2-1/DAP/CMSIS_DAP_config.h index 3844064..74ffc85 100644 --- a/src/stm32f103/stlinkv2-1/DAP/CMSIS_DAP_config.h +++ b/src/stm32f103/stlinkv2-1/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f103/stlinkv2-1/config.h b/src/stm32f103/stlinkv2-1/config.h index a4a3094..4bdee1c 100644 --- a/src/stm32f103/stlinkv2-1/config.h +++ b/src/stm32f103/stlinkv2-1/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP103" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define USB_NVIC_LINE NVIC_USB_LP_CAN_RX0_IRQ #define USB_IRQ_NAME usb_lp_can_rx0_isr diff --git a/src/stm32f103/stlinkv2-dongle/DAP/CMSIS_DAP_config.h b/src/stm32f103/stlinkv2-dongle/DAP/CMSIS_DAP_config.h index 7f5532b..7490247 100644 --- a/src/stm32f103/stlinkv2-dongle/DAP/CMSIS_DAP_config.h +++ b/src/stm32f103/stlinkv2-dongle/DAP/CMSIS_DAP_config.h @@ -45,6 +45,7 @@ This information includes: */ #include "config.h" +#include // Board configuration options @@ -155,8 +156,10 @@ This information includes: \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetVendorString (char *str) { - (void)str; - return (0U); + static const char vendor[] = VENDOR_NAME; + strncpy(str, vendor, 60); + str[59] = '\0'; + return strlen(str) + 1; } /** Get Product Name string. @@ -164,8 +167,10 @@ static inline uint8_t DAP_GetVendorString (char *str) { \return String length (including terminating NULL character) or 0 (no string). */ static inline uint8_t DAP_GetProductString (char *str) { - (void)str; - return (0U); + static const char product[] = PRODUCT_NAME; + strncpy(str, product, 60); + str[59] = '\0'; + return strlen(str) + 1; } ///@} diff --git a/src/stm32f103/stlinkv2-dongle/config.h b/src/stm32f103/stlinkv2-dongle/config.h index 03e4e73..c108c29 100644 --- a/src/stm32f103/stlinkv2-dongle/config.h +++ b/src/stm32f103/stlinkv2-dongle/config.h @@ -20,6 +20,7 @@ #define CONFIG_H_INCLUDED #define PRODUCT_NAME "DAP103" +#define VENDOR_NAME "https://github.com/devanlai/dap42" #define USB_NVIC_LINE NVIC_USB_LP_CAN_RX0_IRQ #define USB_IRQ_NAME usb_lp_can_rx0_isr