summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c267cab)
raw | patch | inline | side by side (parent: c267cab)
author | sujith <sujith.s@ti.com> | |
Sun, 10 May 2020 07:09:23 +0000 (12:39 +0530) | ||
committer | sujith <sujith.s@ti.com> | |
Sun, 10 May 2020 07:20:15 +0000 (12:50 +0530) |
Signed-off-by: sujith <sujith.s@ti.com>
packages/ti/drv/usb/src/cdn/core_driver/device/include/cusbd_structs_if.h | patch | blob | history | |
packages/ti/drv/usb/src/cdn/core_driver/device/src/cusbd.c | patch | blob | history |
diff --git a/packages/ti/drv/usb/src/cdn/core_driver/device/include/cusbd_structs_if.h b/packages/ti/drv/usb/src/cdn/core_driver/device/include/cusbd_structs_if.h
index a596b91afb1f7dddf6dd2596c34b0ea919e9b761..d426b1930067ec768e674108e59b11e9f1ef8112 100644 (file)
#include "cdn_stdtypes.h"
#include "cusbd_if.h"
+/** Device name - Maximum size */
+#define CUSBD_DEVICE_NAME_SIZE (100U)
+/** Device Endpoint - Maximum size */
+#define CUSBD_EP_NAME_SIZE (100U)
+
+
/** @defgroup DataStructure Dynamic Data Structures
* This section defines the data structures used by the driver to provide
* hardware information, modification and dynamic operation of the driver.
/** enables organization of endpoints in linked list */
LIST_ListHead epList;
/** keeps name of endpoint */
- char name[100];
+ char name[CUSBD_EP_NAME_SIZE];
/** pointer to the private data of this endpoint */
CUSBD_EpPrivate* epPrivate;
/**
/** Flags informs if device is scatter/gather transfer capable */
uint8_t sgSupported;
/** Full name of USB device controller */
- char name[100];
+ char name[CUSBD_DEVICE_NAME_SIZE];
};
/**
diff --git a/packages/ti/drv/usb/src/cdn/core_driver/device/src/cusbd.c b/packages/ti/drv/usb/src/cdn/core_driver/device/src/cusbd.c
index 84596db15c8236f86cdedc5bb570a0a58cb04907..9022e21be3da6c93ce2af71ef1d7a64bdfa10f50 100755 (executable)
@@ -2865,7 +2865,7 @@ static inline uint32_t initConfigDev(CUSBD_PrivateData * dev, CUSBDMA_Config * d
dev->device.maxSpeed = CH9_USB_SPEED_SUPER;
dev->device.state = CH9_USB_STATE_DEFAULT; /* <----- check if we set status, probably higher layer sets it */
#ifdef DEBUG
- (void) strncpy(dev->device.name, SS_DEV_NAME, sizeof (SS_DEV_NAME));
+ (void) strncpy(dev->device.name, SS_DEV_NAME, (CUSBD_DEVICE_NAME_SIZE - 1U));
#endif
/* Creating DMA Controller */