summaryrefslogtreecommitdiff
path: root/src/class/cdc/serial
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-06-20 12:52:34 +0700
committerhathach <[email protected]>2025-06-20 12:52:34 +0700
commitadf6cbfe03523cd8f7e23cb7f2edbb4304a6cd89 (patch)
tree75e28049b27aa3ff28ac21ef0cdc5f7438b84a34 /src/class/cdc/serial
parent5c974cee23e9ece208df43b60070740fc2eda0c3 (diff)
cdch clean up and refactor, add explicit sync() API
Diffstat (limited to 'src/class/cdc/serial')
-rw-r--r--src/class/cdc/serial/pl2303.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/class/cdc/serial/pl2303.h b/src/class/cdc/serial/pl2303.h
index c01dac0e1..63910c7bb 100644
--- a/src/class/cdc/serial/pl2303.h
+++ b/src/class/cdc/serial/pl2303.h
@@ -109,36 +109,37 @@ typedef enum pl2303_type {
} pl2303_type_t;
typedef struct pl2303_type_data {
- uint32_t const max_baud_rate;
- uint8_t const quirks;
- uint8_t const no_autoxonxoff : 1;
- uint8_t const no_divisors : 1;
- uint8_t const alt_divisors : 1;
+ uint32_t max_baud_rate;
+ uint8_t quirks;
+ uint8_t no_autoxonxoff : 1;
+ uint8_t no_divisors : 1;
+ uint8_t alt_divisors : 1;
} pl2303_type_data_t;
#define PL2303_TYPE_DATA \
[PL2303_TYPE_H] = { \
- .max_baud_rate = 1228800, \
- .quirks = PL2303_QUIRK_LEGACY, \
- .no_autoxonxoff = true, \
+ .max_baud_rate = 1228800, .quirks = PL2303_QUIRK_LEGACY, \
+ .no_autoxonxoff = 1, .no_divisors = 0, .alt_divisors = 0 \
}, \
[PL2303_TYPE_HX] = { \
- .max_baud_rate = 6000000, \
+ .max_baud_rate = 6000000, .quirks = 0, \
+ .no_autoxonxoff = 0, .no_divisors = 0, .alt_divisors = 0 \
}, \
[PL2303_TYPE_TA] = { \
- .max_baud_rate = 6000000, \
- .alt_divisors = true, \
+ .max_baud_rate = 6000000, .quirks = 0, \
+ .no_autoxonxoff = 0, .no_divisors = 0, .alt_divisors = 1 \
}, \
[PL2303_TYPE_TB] = { \
- .max_baud_rate = 12000000, \
- .alt_divisors = true, \
+ .max_baud_rate = 12000000, .quirks = 0, \
+ .no_autoxonxoff = 0, .no_divisors = 0, .alt_divisors = 1 \
}, \
[PL2303_TYPE_HXD] = { \
- .max_baud_rate = 12000000, \
+ .max_baud_rate = 12000000, .quirks = 0, \
+ .no_autoxonxoff = 0, .no_divisors = 0, .alt_divisors = 0 \
}, \
[PL2303_TYPE_HXN] = { \
- .max_baud_rate = 12000000, \
- .no_divisors = true, \
+ .max_baud_rate = 12000000, .quirks = 0, \
+ .no_autoxonxoff = 0, .no_divisors = 1, .alt_divisors = 0 \
}
typedef struct TU_ATTR_PACKED {