summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-11-07 16:31:17 +0700
committerGitHub <[email protected]>2025-11-07 16:31:17 +0700
commit5d351828cbb077e41463a31d285ca001250e85da (patch)
tree775c1c07b4c8b7d9c59d42d948ac8cda5bcb0ebf /src
parent9fac6dd49d9cd681ed9140c124d3001b6d1491be (diff)
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/class/cdc/cdc_device.h2
-rw-r--r--src/class/msc/msc_device.c2
-rw-r--r--src/common/tusb_debug.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h
index f30f93bc6..6f21af4f3 100644
--- a/src/class/cdc/cdc_device.h
+++ b/src/class/cdc/cdc_device.h
@@ -62,7 +62,7 @@ TU_VERIFY_STATIC(sizeof(tud_cdc_configure_t) == 1, "size is not correct");
#define TUD_CDC_CONFIGURE_DEFAULT() { \
.rx_persistent = false, \
.tx_persistent = false, \
- .tx_overwritabe_if_not_connected = false, \
+ .tx_overwritabe_if_not_connected = true, \
}
// Configure CDC driver behavior
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c
index 4ba34c7dc..244251c5e 100644
--- a/src/class/msc/msc_device.c
+++ b/src/class/msc/msc_device.c
@@ -114,7 +114,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool send_csw(mscd_interface_t* p_msc) {
uint8_t rhport = p_msc->rhport;
p_msc->csw.data_residue = p_msc->cbw.total_bytes - p_msc->xferred_len;
p_msc->stage = MSC_STAGE_STATUS_SENT;
- memcpy(_mscd_epbuf.buf, (uint8_t*) &p_msc->csw, sizeof(msc_csw_t)); //-V1086
+ memcpy(_mscd_epbuf.buf, &p_msc->csw, sizeof(msc_csw_t)); //-V1086
return usbd_edpt_xfer(rhport, p_msc->ep_in , _mscd_epbuf.buf, sizeof(msc_csw_t));
}
diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h
index 905dc239c..08117283f 100644
--- a/src/common/tusb_debug.h
+++ b/src/common/tusb_debug.h
@@ -76,7 +76,7 @@ TU_ATTR_ALWAYS_INLINE static inline void tu_print_buf(uint8_t const* buf, uint32
#define TU_LOG_FAILED() (void) tu_printf("%s: %d: Failed\r\n", __PRETTY_FUNCTION__, __LINE__)
// Log Level 1: Error
-#define TU_LOG1 (void) tu_printf
+#define TU_LOG1(...) (void) tu_printf(__VA_ARGS__)
#define TU_LOG1_MEM tu_print_mem
#define TU_LOG1_BUF(_x, _n) tu_print_buf((uint8_t const*)(_x), _n)
#define TU_LOG1_INT(_x) (void) tu_printf(#_x " = %ld\r\n", (unsigned long) (_x) )