diff --git a/bsp/rp2040/DAP_config.h b/bsp/rp2040/DAP_config.h index c3182c6..da4e844 100644 --- a/bsp/rp2040/DAP_config.h +++ b/bsp/rp2040/DAP_config.h @@ -178,7 +178,7 @@ This information includes: #define TARGET_DEVICE_NAME "Pico" ///< String indicating the Target Device #endif -#include "DAP.h" +/*#include "DAP.h"*/ /** Get Vendor ID string. \param str Pointer to buffer to store the string. @@ -204,7 +204,11 @@ __STATIC_INLINE uint8_t DAP_GetProductString(char* str) { \param str Pointer to buffer to store the string. \return String length. */ -__STATIC_INLINE uint8_t DAP_GetSerNumString(char* str) { return get_unique_id_u8((uint8_t*)str); } +__STATIC_INLINE uint8_t DAP_GetSerNumString(char* str) { + int len = get_unique_id_u8((uint8_t*)str); + str[len] = 0; + return len; +} /** Get Target Device Vendor string. \param str Pointer to buffer to store the string (max 60 characters). @@ -625,3 +629,4 @@ __STATIC_INLINE uint8_t RESET_TARGET(void) { ///@} #endif /* __DAP_CONFIG_H__ */ + diff --git a/src/info.h b/src/info.h index b6f7ce2..5059895 100644 --- a/src/info.h +++ b/src/info.h @@ -5,7 +5,7 @@ #include "bsp-info.h" #define INFO_MANUFACTURER "BLAHAJ CTF" -#define INFO_PRODUCT_BARE "Dragnbus" +#define INFO_PRODUCT_BARE "CMSIS-DAP" #define INFO_PRODUCT(board) INFO_PRODUCT_BARE " (" board ")" #endif diff --git a/src/usb_descriptors.c b/src/usb_descriptors.c index e676c99..d043a6e 100644 --- a/src/usb_descriptors.c +++ b/src/usb_descriptors.c @@ -103,8 +103,8 @@ static const uint8_t desc_configuration[] = { }; static const char* string_desc_arr[] = { [STRID_LANGID] = (const char[]){0x09, 0x04}, // supported language is English (0x0409) - [STRID_MANUFACTURER] = "BLAHAJ CTF", // Manufacturer - [STRID_PRODUCT] = "Dragnbus (RP2040 Pico)", // Product + [STRID_MANUFACTURER] = INFO_MANUFACTURER,// Manufacturer + [STRID_PRODUCT] = INFO_PRODUCT(INFO_BOARDNAME), // Product [STRID_CONFIG] = "Configuration descriptor", [STRID_IF_VND_CFG] = "Device cfg/ctl interface", diff --git a/src/usbstdio.h b/src/usbstdio.h new file mode 100644 index 0000000..e5e60d5 --- /dev/null +++ b/src/usbstdio.h @@ -0,0 +1,12 @@ + +#ifndef USBSTDIO_H_ +#define USBSTDIO_H_ + +#ifdef USE_USBCDC_FOR_STDIO +void stdio_usb_init(void); + +void stdio_usb_set_itf_num(int itf); +#endif + +#endif +