summaryrefslogtreecommitdiff
path: root/src/class/cdc
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-11-05 18:34:09 +0700
committerGitHub <[email protected]>2025-11-05 18:34:09 +0700
commit58b4104015ec10089e8790febe8b3b6cef8b4b09 (patch)
treeb619bbd1b1c002132c4b810d651abfe47b19d9bd /src/class/cdc
parenta6c16d147593732028ed89292805e0e6a972e4b5 (diff)
parent1f04fe7924e8777c1583323171c0e1cabcb29062 (diff)
Merge pull request #3326 from hathach/fix-code-alerts
Fix code alerts
Diffstat (limited to 'src/class/cdc')
-rw-r--r--src/class/cdc/cdc.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/class/cdc/cdc.h b/src/class/cdc/cdc.h
index 6d207c717..679723ba6 100644
--- a/src/class/cdc/cdc.h
+++ b/src/class/cdc/cdc.h
@@ -192,10 +192,10 @@ typedef enum {
CDC_LINE_CODING_STOP_BITS_2 = 2, // 2 bits
} cdc_line_coding_stopbits_t;
-#define CDC_LINE_CODING_STOP_BITS_TEXT(STOP_BITS) ( \
- STOP_BITS == CDC_LINE_CODING_STOP_BITS_1 ? "1" : \
- STOP_BITS == CDC_LINE_CODING_STOP_BITS_1_5 ? "1.5" : \
- STOP_BITS == CDC_LINE_CODING_STOP_BITS_2 ? "2" : "?" )
+#define CDC_LINE_CODING_STOP_BITS_TEXT(STOP_BITS) ( \
+ (STOP_BITS) == CDC_LINE_CODING_STOP_BITS_1 ? "1" : \
+ (STOP_BITS) == CDC_LINE_CODING_STOP_BITS_1_5 ? "1.5" : \
+ (STOP_BITS) == CDC_LINE_CODING_STOP_BITS_2 ? "2" : "?" )
// TODO Backward compatible for typos. Maybe removed in the future release
#define CDC_LINE_CONDING_STOP_BITS_1 CDC_LINE_CODING_STOP_BITS_1
@@ -211,11 +211,11 @@ typedef enum {
} cdc_line_coding_parity_t;
#define CDC_LINE_CODING_PARITY_CHAR(PARITY) ( \
- PARITY == CDC_LINE_CODING_PARITY_NONE ? 'N' : \
- PARITY == CDC_LINE_CODING_PARITY_ODD ? 'O' : \
- PARITY == CDC_LINE_CODING_PARITY_EVEN ? 'E' : \
- PARITY == CDC_LINE_CODING_PARITY_MARK ? 'M' : \
- PARITY == CDC_LINE_CODING_PARITY_SPACE ? 'S' : '?' )
+ (PARITY) == CDC_LINE_CODING_PARITY_NONE ? 'N' : \
+ (PARITY) == CDC_LINE_CODING_PARITY_ODD ? 'O' : \
+ (PARITY) == CDC_LINE_CODING_PARITY_EVEN ? 'E' : \
+ (PARITY) == CDC_LINE_CODING_PARITY_MARK ? 'M' : \
+ (PARITY) == CDC_LINE_CODING_PARITY_SPACE ? 'S' : '?' )
//--------------------------------------------------------------------+
// Management Element Notification (Notification Endpoint)