aboutsummaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2020-01-25 22:04:42 +0000
committerQMK Bot <hello@qmk.fm>2020-01-25 22:04:42 +0000
commit09370a95dbc95334fe7335478b108e1a844a2578 (patch)
tree64e5f47805a78e16b7b9bbf068968cd8ff2595f5 /tmk_core
parente9ffc5347690ad2212d7217e406fb6018ed17079 (diff)
downloadqmk_firmware-09370a95dbc95334fe7335478b108e1a844a2578.tar.gz
qmk_firmware-09370a95dbc95334fe7335478b108e1a844a2578.zip
format code according to conventions [skip ci]
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/protocol/chibios/usb_main.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 2617c73c1..dd701f661 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -175,61 +175,61 @@ typedef struct {
175} usb_driver_config_t; 175} usb_driver_config_t;
176 176
177/* Reusable initialization structure - see USBEndpointConfig comment at top of file */ 177/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
178#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ 178#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
179 { \ 179 { \
180 .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ 180 .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
181 .in_ep_config = \ 181 .in_ep_config = \
182 { \ 182 { \
183 stream##_IN_MODE, /* Interrupt EP */ \ 183 stream##_IN_MODE, /* Interrupt EP */ \
184 NULL, /* SETUP packet notification callback */ \ 184 NULL, /* SETUP packet notification callback */ \
185 qmkusbDataTransmitted, /* IN notification callback */ \ 185 qmkusbDataTransmitted, /* IN notification callback */ \
186 NULL, /* OUT notification callback */ \ 186 NULL, /* OUT notification callback */ \
187 stream##_EPSIZE, /* IN maximum packet size */ \ 187 stream##_EPSIZE, /* IN maximum packet size */ \
188 0, /* OUT maximum packet size */ \ 188 0, /* OUT maximum packet size */ \
189 NULL, /* IN Endpoint state */ \ 189 NULL, /* IN Endpoint state */ \
190 NULL, /* OUT endpoint state */ \ 190 NULL, /* OUT endpoint state */ \
191 2, /* IN multiplier */ \ 191 2, /* IN multiplier */ \
192 NULL /* SETUP buffer (not a SETUP endpoint) */ \ 192 NULL /* SETUP buffer (not a SETUP endpoint) */ \
193 }, \ 193 }, \
194 .out_ep_config = \ 194 .out_ep_config = \
195 { \ 195 { \
196 stream##_OUT_MODE, /* Interrupt EP */ \ 196 stream##_OUT_MODE, /* Interrupt EP */ \
197 NULL, /* SETUP packet notification callback */ \ 197 NULL, /* SETUP packet notification callback */ \
198 NULL, /* IN notification callback */ \ 198 NULL, /* IN notification callback */ \
199 qmkusbDataReceived, /* OUT notification callback */ \ 199 qmkusbDataReceived, /* OUT notification callback */ \
200 0, /* IN maximum packet size */ \ 200 0, /* IN maximum packet size */ \
201 stream##_EPSIZE, /* OUT maximum packet size */ \ 201 stream##_EPSIZE, /* OUT maximum packet size */ \
202 NULL, /* IN Endpoint state */ \ 202 NULL, /* IN Endpoint state */ \
203 NULL, /* OUT endpoint state */ \ 203 NULL, /* OUT endpoint state */ \
204 2, /* IN multiplier */ \ 204 2, /* IN multiplier */ \
205 NULL, /* SETUP buffer (not a SETUP endpoint) */ \ 205 NULL, /* SETUP buffer (not a SETUP endpoint) */ \
206 }, \ 206 }, \
207 .int_ep_config = \ 207 .int_ep_config = \
208 { \ 208 { \
209 USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \ 209 USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
210 NULL, /* SETUP packet notification callback */ \ 210 NULL, /* SETUP packet notification callback */ \
211 qmkusbInterruptTransmitted, /* IN notification callback */ \ 211 qmkusbInterruptTransmitted, /* IN notification callback */ \
212 NULL, /* OUT notification callback */ \ 212 NULL, /* OUT notification callback */ \
213 CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \ 213 CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
214 0, /* OUT maximum packet size */ \ 214 0, /* OUT maximum packet size */ \
215 NULL, /* IN Endpoint state */ \ 215 NULL, /* IN Endpoint state */ \
216 NULL, /* OUT endpoint state */ \ 216 NULL, /* OUT endpoint state */ \
217 2, /* IN multiplier */ \ 217 2, /* IN multiplier */ \
218 NULL, /* SETUP buffer (not a SETUP endpoint) */ \ 218 NULL, /* SETUP buffer (not a SETUP endpoint) */ \
219 }, \ 219 }, \
220 .config = { \ 220 .config = { \
221 .usbp = &USB_DRIVER, \ 221 .usbp = &USB_DRIVER, \
222 .bulk_in = stream##_IN_EPNUM, \ 222 .bulk_in = stream##_IN_EPNUM, \
223 .bulk_out = stream##_OUT_EPNUM, \ 223 .bulk_out = stream##_OUT_EPNUM, \
224 .int_in = notification, \ 224 .int_in = notification, \
225 .in_buffers = stream##_IN_CAPACITY, \ 225 .in_buffers = stream##_IN_CAPACITY, \
226 .out_buffers = stream##_OUT_CAPACITY, \ 226 .out_buffers = stream##_OUT_CAPACITY, \
227 .in_size = stream##_EPSIZE, \ 227 .in_size = stream##_EPSIZE, \
228 .out_size = stream##_EPSIZE, \ 228 .out_size = stream##_EPSIZE, \
229 .fixed_size = fixedsize, \ 229 .fixed_size = fixedsize, \
230 .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ 230 .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
231 .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ 231 .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
232 } \ 232 } \
233 } 233 }
234 234
235typedef struct { 235typedef struct {