summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-05 19:56:54 +0700
committerhathach <[email protected]>2025-11-06 21:30:52 +0700
commit86a4990b96eafb5904f946fa061b310f155a7d51 (patch)
treec33703a9713b178d30837c388d3fe092184d8b91 /src
parent6641550f58cd2f983ebb42a28dd881a72d72bc6f (diff)
fix more alerts
Diffstat (limited to 'src')
-rw-r--r--src/common/tusb_compiler.h2
-rw-r--r--src/common/tusb_private.h4
-rw-r--r--src/common/tusb_verify.h2
-rw-r--r--src/portable/ehci/ehci.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/common/tusb_compiler.h b/src/common/tusb_compiler.h
index 167385d13..7719790d1 100644
--- a/src/common/tusb_compiler.h
+++ b/src/common/tusb_compiler.h
@@ -106,7 +106,7 @@
19,18,17,16,15,14,13,12,11,10, \
9,8,7,6,5,4,3,2,1,0
-// Apply a macro X to each of the arguments with a selected separation/delimiter
+// Apply a macro X to each of the arguments with a separation/delimiter
#define TU_ARGS_APPLY(_X, _s, ...) TU_XSTRCAT(TU_ARGS_APPLY_, TU_ARGS_NUM(__VA_ARGS__))(_X, _s, __VA_ARGS__)
#define TU_ARGS_APPLY_1(_X, _s, _a1) _X(_a1)
diff --git a/src/common/tusb_private.h b/src/common/tusb_private.h
index 37d5e89f1..5e1d59233 100644
--- a/src/common/tusb_private.h
+++ b/src/common/tusb_private.h
@@ -141,7 +141,7 @@ uint32_t tu_edpt_stream_read_xfer(uint8_t hwid, tu_edpt_stream_t* s);
// Complete read transfer by writing EP -> FIFO. Must be called in the transfer complete callback
TU_ATTR_ALWAYS_INLINE static inline
void tu_edpt_stream_read_xfer_complete(tu_edpt_stream_t* s, uint32_t xferred_bytes) {
- if (0 != tu_fifo_depth(&s->ff)) {
+ if (0u != tu_fifo_depth(&s->ff)) {
tu_fifo_write_n(&s->ff, s->ep_buf, (uint16_t) xferred_bytes);
}
}
@@ -149,7 +149,7 @@ void tu_edpt_stream_read_xfer_complete(tu_edpt_stream_t* s, uint32_t xferred_byt
// Complete read transfer with provided buffer
TU_ATTR_ALWAYS_INLINE static inline
void tu_edpt_stream_read_xfer_complete_with_buf(tu_edpt_stream_t* s, const void * buf, uint32_t xferred_bytes) {
- if (0 != tu_fifo_depth(&s->ff)) {
+ if (0u != tu_fifo_depth(&s->ff)) {
tu_fifo_write_n(&s->ff, buf, (uint16_t) xferred_bytes);
}
}
diff --git a/src/common/tusb_verify.h b/src/common/tusb_verify.h
index ffd785384..587554e7f 100644
--- a/src/common/tusb_verify.h
+++ b/src/common/tusb_verify.h
@@ -78,7 +78,7 @@
defined(__ARM7M__) || defined (__ARM7EM__) || defined(__ARM8M_MAINLINE__) || defined(__ARM8EM_MAINLINE__)
#define TU_BREAKPOINT() do { \
volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL); /* Cortex M CoreDebug->DHCSR */ \
- if (0 != ((*ARM_CM_DHCSR) & 1UL)) { __asm("BKPT #0\n"); } /* Only halt mcu if debugger is attached */ \
+ if (0u != ((*ARM_CM_DHCSR) & 1UL)) { __asm("BKPT #0\n"); } /* Only halt mcu if debugger is attached */ \
} while(0)
#elif defined(__riscv) && !TUSB_MCU_VENDOR_ESPRESSIF
diff --git a/src/portable/ehci/ehci.c b/src/portable/ehci/ehci.c
index 973bb43cc..c33c970e4 100644
--- a/src/portable/ehci/ehci.c
+++ b/src/portable/ehci/ehci.c
@@ -920,7 +920,7 @@ static void qhd_init(ehci_qhd_t *p_qhd, uint8_t dev_addr, tusb_desc_endpoint_t c
// sub millisecond interval
p_qhd->interval_ms = 0;
p_qhd->int_smask = (interval == 1) ? 0xff : // 0b11111111
- (interval == 2) ? 0xaa /* 0b10101010 */ : 0x44 /* 01000100 */;
+ (interval == 2) ? 0xaa /* 0b10101010 */ : 0x44 /* 0b01000100 */;
} else {
p_qhd->interval_ms = (uint8_t) tu_min16(1 << (interval - 4), 255);
p_qhd->int_smask = TU_BIT(interval % 8);