Commit 0b95590
committed
Add default value protection for line coding parameters in serial Host classes
Add preprocessor guards to allow customization of default line coding parameters.
Summary of Changes:
- Wrapped default line coding constants (RATE, STOP_BIT, PARITY, DATA_BIT)
with #ifndef guards in CDC ACM, GSER, and Prolific host class headers
- This allows users to define custom default values before including these headers in (ux_user.h)
- Updated Prolific activation code to use DEFAULT constants instead of hardcoded values
for consistency and better maintainability
Files Modified:
- common/usbx_host_classes/inc/ux_host_class_cdc_acm.h
- common/usbx_host_classes/inc/ux_host_class_gser.h
- common/usbx_host_classes/inc/ux_host_class_prolific.h
- common/usbx_host_classes/src/ux_host_class_prolific_activate.c1 parent 6dc0cf2 commit 0b95590
4 files changed
Lines changed: 39 additions & 2 deletions
File tree
- common/usbx_host_classes
- inc
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
140 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
141 | 151 | | |
| 152 | + | |
142 | 153 | | |
143 | 154 | | |
144 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
119 | 131 | | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
148 | 160 | | |
| 161 | + | |
149 | 162 | | |
150 | 163 | | |
151 | 164 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
0 commit comments