|
@@ -175,61 +175,61 @@ typedef struct {
|
|
} usb_driver_config_t;
|
|
} usb_driver_config_t;
|
|
|
|
|
|
|
|
|
|
-#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
|
|
+#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
|
|
- { \
|
|
+ { \
|
|
- .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
|
|
+ .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
|
|
- .in_ep_config = \
|
|
+ .in_ep_config = \
|
|
- { \
|
|
+ { \
|
|
- stream##_IN_MODE, \
|
|
+ stream##_IN_MODE, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- qmkusbDataTransmitted, \
|
|
+ qmkusbDataTransmitted, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- stream##_EPSIZE, \
|
|
+ stream##_EPSIZE, \
|
|
- 0, \
|
|
+ 0, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- 2, \
|
|
+ 2, \
|
|
- NULL \
|
|
+ NULL \
|
|
- }, \
|
|
+ }, \
|
|
- .out_ep_config = \
|
|
+ .out_ep_config = \
|
|
- { \
|
|
+ { \
|
|
- stream##_OUT_MODE, \
|
|
+ stream##_OUT_MODE, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- qmkusbDataReceived, \
|
|
+ qmkusbDataReceived, \
|
|
- 0, \
|
|
+ 0, \
|
|
- stream##_EPSIZE, \
|
|
+ stream##_EPSIZE, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- 2, \
|
|
+ 2, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- }, \
|
|
+ }, \
|
|
- .int_ep_config = \
|
|
+ .int_ep_config = \
|
|
- { \
|
|
+ { \
|
|
- USB_EP_MODE_TYPE_INTR, \
|
|
+ USB_EP_MODE_TYPE_INTR, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- qmkusbInterruptTransmitted, \
|
|
+ qmkusbInterruptTransmitted, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- CDC_NOTIFICATION_EPSIZE, \
|
|
+ CDC_NOTIFICATION_EPSIZE, \
|
|
- 0, \
|
|
+ 0, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- 2, \
|
|
+ 2, \
|
|
- NULL, \
|
|
+ NULL, \
|
|
- }, \
|
|
+ }, \
|
|
- .config = { \
|
|
+ .config = { \
|
|
- .usbp = &USB_DRIVER, \
|
|
+ .usbp = &USB_DRIVER, \
|
|
- .bulk_in = stream##_IN_EPNUM, \
|
|
+ .bulk_in = stream##_IN_EPNUM, \
|
|
- .bulk_out = stream##_OUT_EPNUM, \
|
|
+ .bulk_out = stream##_OUT_EPNUM, \
|
|
- .int_in = notification, \
|
|
+ .int_in = notification, \
|
|
- .in_buffers = stream##_IN_CAPACITY, \
|
|
+ .in_buffers = stream##_IN_CAPACITY, \
|
|
- .out_buffers = stream##_OUT_CAPACITY, \
|
|
+ .out_buffers = stream##_OUT_CAPACITY, \
|
|
- .in_size = stream##_EPSIZE, \
|
|
+ .in_size = stream##_EPSIZE, \
|
|
- .out_size = stream##_EPSIZE, \
|
|
+ .out_size = stream##_EPSIZE, \
|
|
- .fixed_size = fixedsize, \
|
|
+ .fixed_size = fixedsize, \
|
|
.ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
|
.ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
|
|
.ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
|
.ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
|
|
- } \
|
|
+ } \
|
|
}
|
|
}
|
|
|
|
|
|
typedef struct {
|
|
typedef struct {
|