summaryrefslogtreecommitdiff
path: root/test/fuzz/device
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2025-11-25 10:59:43 +0100
committerZixun LI <[email protected]>2025-11-25 10:59:43 +0100
commitdc083e4d9c87658498a3bd0b527d25bc88dd1ed6 (patch)
tree0523e934e5a1b1fe8331b28990ddf2e2f4478077 /test/fuzz/device
parente59b2c40fc9e655918629d73cc8c54b86b4a70c1 (diff)
parentfee2d2a034d65aa625bc1a8b32c3b7a51292a39f (diff)
Merge remote-tracking branch 'tinyusb/master' into n6_build
Signed-off-by: Zixun LI <[email protected]>
Diffstat (limited to 'test/fuzz/device')
-rw-r--r--test/fuzz/device/cdc/Makefile6
-rw-r--r--test/fuzz/device/cdc/src/tusb_config.h6
-rw-r--r--test/fuzz/device/cdc/src/usb_descriptors.cc8
-rw-r--r--test/fuzz/device/msc/Makefile6
-rw-r--r--test/fuzz/device/msc/src/tusb_config.h6
-rw-r--r--test/fuzz/device/msc/src/usb_descriptors.cc8
-rw-r--r--test/fuzz/device/net/Makefile5
-rw-r--r--test/fuzz/device/net/src/tusb_config.h6
-rw-r--r--test/fuzz/device/net/src/usb_descriptors.cc8
9 files changed, 29 insertions, 30 deletions
diff --git a/test/fuzz/device/cdc/Makefile b/test/fuzz/device/cdc/Makefile
index 7071df057..d448907f0 100644
--- a/test/fuzz/device/cdc/Makefile
+++ b/test/fuzz/device/cdc/Makefile
@@ -2,10 +2,10 @@ include ../../make.mk
INC += \
src \
- $(TOP)/hw \
+
# Example source
-SRC_C += $(addprefix $(CURRENT_PATH)/, $(wildcard src/*.c))
-SRC_CXX += $(addprefix $(CURRENT_PATH)/, $(wildcard src/*.cc))
+SRC_C += $(addprefix $(EXAMPLE_PATH)/, $(wildcard src/*.c))
+SRC_CXX += $(addprefix $(EXAMPLE_PATH)/, $(wildcard src/*.cc))
include ../../rules.mk
diff --git a/test/fuzz/device/cdc/src/tusb_config.h b/test/fuzz/device/cdc/src/tusb_config.h
index 10a8a825a..76f44619e 100644
--- a/test/fuzz/device/cdc/src/tusb_config.h
+++ b/test/fuzz/device/cdc/src/tusb_config.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef _TUSB_CONFIG_H_
-#define _TUSB_CONFIG_H_
+#ifndef TUSB_CONFIG_H_
+#define TUSB_CONFIG_H_
#ifdef __cplusplus
extern "C" {
@@ -111,4 +111,4 @@
}
#endif
-#endif /* _TUSB_CONFIG_H_ */
+#endif /* TUSB_CONFIG_H_ */
diff --git a/test/fuzz/device/cdc/src/usb_descriptors.cc b/test/fuzz/device/cdc/src/usb_descriptors.cc
index 0f636f05d..0d7d17b4b 100644
--- a/test/fuzz/device/cdc/src/usb_descriptors.cc
+++ b/test/fuzz/device/cdc/src/usb_descriptors.cc
@@ -30,10 +30,10 @@
* Auto ProductID layout's Bitmap:
* [MSB] HID | CDC [LSB]
*/
-#define _PID_MAP(itf, n) ((CFG_TUD_##itf) << (n))
+#define PID_MAP(itf, n) ((CFG_TUD_##itf) << (n))
#define USB_PID \
- (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(HID, 2) | _PID_MAP(MIDI, 3) | \
- _PID_MAP(VENDOR, 4))
+ (0x4000 | PID_MAP(CDC, 0) | PID_MAP(HID, 2) | PID_MAP(MIDI, 3) | \
+ PID_MAP(VENDOR, 4))
#define USB_VID 0xCafe
#define USB_BCD 0x0200
@@ -148,7 +148,7 @@ uint8_t const *tud_descriptor_other_speed_configuration_cb(uint8_t index) {
(void)index; // for multiple configurations
// if link speed is high return fullspeed config, and vice versa
- // Note: the descriptor type is OHER_SPEED_CONFIG instead of CONFIG
+ // Note: the descriptor type is OTHER_SPEED_CONFIG instead of CONFIG
memcpy(desc_other_speed_config,
(tud_speed_get() == TUSB_SPEED_HIGH) ? desc_fs_configuration
: desc_hs_configuration,
diff --git a/test/fuzz/device/msc/Makefile b/test/fuzz/device/msc/Makefile
index 7071df057..d448907f0 100644
--- a/test/fuzz/device/msc/Makefile
+++ b/test/fuzz/device/msc/Makefile
@@ -2,10 +2,10 @@ include ../../make.mk
INC += \
src \
- $(TOP)/hw \
+
# Example source
-SRC_C += $(addprefix $(CURRENT_PATH)/, $(wildcard src/*.c))
-SRC_CXX += $(addprefix $(CURRENT_PATH)/, $(wildcard src/*.cc))
+SRC_C += $(addprefix $(EXAMPLE_PATH)/, $(wildcard src/*.c))
+SRC_CXX += $(addprefix $(EXAMPLE_PATH)/, $(wildcard src/*.cc))
include ../../rules.mk
diff --git a/test/fuzz/device/msc/src/tusb_config.h b/test/fuzz/device/msc/src/tusb_config.h
index ca39c6b0a..abd8cd4ce 100644
--- a/test/fuzz/device/msc/src/tusb_config.h
+++ b/test/fuzz/device/msc/src/tusb_config.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef _TUSB_CONFIG_H_
-#define _TUSB_CONFIG_H_
+#ifndef TUSB_CONFIG_H_
+#define TUSB_CONFIG_H_
#ifdef __cplusplus
extern "C" {
@@ -111,4 +111,4 @@
}
#endif
-#endif /* _TUSB_CONFIG_H_ */
+#endif /* TUSB_CONFIG_H_ */
diff --git a/test/fuzz/device/msc/src/usb_descriptors.cc b/test/fuzz/device/msc/src/usb_descriptors.cc
index efe4d0a3c..55c113ad7 100644
--- a/test/fuzz/device/msc/src/usb_descriptors.cc
+++ b/test/fuzz/device/msc/src/usb_descriptors.cc
@@ -30,10 +30,10 @@
* Auto ProductID layout's Bitmap:
* [MSB] HID | MSC | CDC [LSB]
*/
-#define _PID_MAP(itf, n) ((CFG_TUD_##itf) << (n))
+#define PID_MAP(itf, n) ((CFG_TUD_##itf) << (n))
#define USB_PID \
- (0x4000 | _PID_MAP(MSC, 0) | _PID_MAP(HID, 1) | _PID_MAP(MIDI, 2) | \
- _PID_MAP(VENDOR, 3))
+ (0x4000 | PID_MAP(MSC, 0) | PID_MAP(HID, 1) | PID_MAP(MIDI, 2) | \
+ PID_MAP(VENDOR, 3))
#define USB_VID 0xCafe
#define USB_BCD 0x0200
@@ -142,7 +142,7 @@ uint8_t const *tud_descriptor_other_speed_configuration_cb(uint8_t index) {
(void)index; // for multiple configurations
// if link speed is high return fullspeed config, and vice versa
- // Note: the descriptor type is OHER_SPEED_CONFIG instead of CONFIG
+ // Note: the descriptor type is OTHER_SPEED_CONFIG instead of CONFIG
memcpy(desc_other_speed_config,
(tud_speed_get() == TUSB_SPEED_HIGH) ? desc_fs_configuration
: desc_hs_configuration,
diff --git a/test/fuzz/device/net/Makefile b/test/fuzz/device/net/Makefile
index 2161ad3f1..45c684eec 100644
--- a/test/fuzz/device/net/Makefile
+++ b/test/fuzz/device/net/Makefile
@@ -8,15 +8,14 @@ CFLAGS += \
INC += \
src \
- $(TOP)/hw \
$(TOP)/lib/lwip/src/include \
$(TOP)/lib/lwip/src/include/ipv4 \
$(TOP)/lib/lwip/src/include/lwip/apps \
$(TOP)/lib/networking
# Example source
-SRC_C += $(addprefix $(CURRENT_PATH)/, $(wildcard src/*.c))
-SRC_CXX += $(addprefix $(CURRENT_PATH)/, $(wildcard src/*.cc))
+SRC_C += $(addprefix $(EXAMPLE_PATH)/, $(wildcard src/*.c))
+SRC_CXX += $(addprefix $(EXAMPLE_PATH)/, $(wildcard src/*.cc))
# lwip sources
SRC_C += \
diff --git a/test/fuzz/device/net/src/tusb_config.h b/test/fuzz/device/net/src/tusb_config.h
index 6ad859337..4fe98e043 100644
--- a/test/fuzz/device/net/src/tusb_config.h
+++ b/test/fuzz/device/net/src/tusb_config.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef _TUSB_CONFIG_H_
-#define _TUSB_CONFIG_H_
+#ifndef TUSB_CONFIG_H_
+#define TUSB_CONFIG_H_
#ifdef __cplusplus
extern "C" {
@@ -119,4 +119,4 @@
}
#endif
-#endif /* _TUSB_CONFIG_H_ */
+#endif /* TUSB_CONFIG_H_ */
diff --git a/test/fuzz/device/net/src/usb_descriptors.cc b/test/fuzz/device/net/src/usb_descriptors.cc
index 5597d49d5..301f23829 100644
--- a/test/fuzz/device/net/src/usb_descriptors.cc
+++ b/test/fuzz/device/net/src/usb_descriptors.cc
@@ -30,10 +30,10 @@
* Auto ProductID layout's Bitmap:
* [MSB] HID | CDC [LSB]
*/
-#define _PID_MAP(itf, n) ((CFG_TUD_##itf) << (n))
+#define PID_MAP(itf, n) ((CFG_TUD_##itf) << (n))
#define USB_PID \
- (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(HID, 2) | _PID_MAP(MIDI, 3) | \
- _PID_MAP(VENDOR, 4))
+ (0x4000 | PID_MAP(CDC, 0) | PID_MAP(HID, 2) | PID_MAP(MIDI, 3) | \
+ PID_MAP(VENDOR, 4))
#define USB_VID 0xCafe
#define USB_BCD 0x0200
@@ -148,7 +148,7 @@ uint8_t const *tud_descriptor_other_speed_configuration_cb(uint8_t index) {
(void)index; // for multiple configurations
// if link speed is high return fullspeed config, and vice versa
- // Note: the descriptor type is OHER_SPEED_CONFIG instead of CONFIG
+ // Note: the descriptor type is OTHER_SPEED_CONFIG instead of CONFIG
memcpy(desc_other_speed_config,
(tud_speed_get() == TUSB_SPEED_HIGH) ? desc_fs_configuration
: desc_hs_configuration,