Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/stm32f042/brain3.3/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -156,17 +157,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f042/brain3.3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions src/stm32f042/dap42/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f042/dap42/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions src/stm32f042/dap42dc/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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.
Expand Down
1 change: 1 addition & 0 deletions src/stm32f042/dap42dc/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions src/stm32f042/dap42k6u/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f042/dap42k6u/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions src/stm32f042/kitchen42/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f042/kitchen42/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions src/stm32f042/tinydyne/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f042/tinydyne/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions src/stm32f103/bluepill/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f103/bluepill/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions src/stm32f103/stlinkv2-1/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f103/stlinkv2-1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 9 additions & 4 deletions src/stm32f103/stlinkv2-dongle/DAP/CMSIS_DAP_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This information includes:
*/

#include "config.h"
#include <string.h>

// Board configuration options

Expand Down Expand Up @@ -155,17 +156,21 @@ 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.
\param str Pointer to buffer to store the string (max 60 characters).
\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;
}

///@}
Expand Down
1 change: 1 addition & 0 deletions src/stm32f103/stlinkv2-dongle/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down