add missing header file, set usb name back to something with 'CMSIS-DAP' because thats apparently required

This commit is contained in:
Triss 2021-07-21 03:55:58 +02:00
parent 66de0a0bc5
commit eefe8c0cd3
4 changed files with 22 additions and 5 deletions

View File

@ -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__ */

View File

@ -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

View File

@ -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",

12
src/usbstdio.h Normal file
View File

@ -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