format code according to conventions [skip ci]
parent
e9ffc53476
commit
09370a95db
|
@ -175,61 +175,61 @@ typedef struct {
|
||||||
} usb_driver_config_t;
|
} usb_driver_config_t;
|
||||||
|
|
||||||
/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
|
/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
|
||||||
#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, /* Interrupt EP */ \
|
stream##_IN_MODE, /* Interrupt EP */ \
|
||||||
NULL, /* SETUP packet notification callback */ \
|
NULL, /* SETUP packet notification callback */ \
|
||||||
qmkusbDataTransmitted, /* IN notification callback */ \
|
qmkusbDataTransmitted, /* IN notification callback */ \
|
||||||
NULL, /* OUT notification callback */ \
|
NULL, /* OUT notification callback */ \
|
||||||
stream##_EPSIZE, /* IN maximum packet size */ \
|
stream##_EPSIZE, /* IN maximum packet size */ \
|
||||||
0, /* OUT maximum packet size */ \
|
0, /* OUT maximum packet size */ \
|
||||||
NULL, /* IN Endpoint state */ \
|
NULL, /* IN Endpoint state */ \
|
||||||
NULL, /* OUT endpoint state */ \
|
NULL, /* OUT endpoint state */ \
|
||||||
2, /* IN multiplier */ \
|
2, /* IN multiplier */ \
|
||||||
NULL /* SETUP buffer (not a SETUP endpoint) */ \
|
NULL /* SETUP buffer (not a SETUP endpoint) */ \
|
||||||
}, \
|
}, \
|
||||||
.out_ep_config = \
|
.out_ep_config = \
|
||||||
{ \
|
{ \
|
||||||
stream##_OUT_MODE, /* Interrupt EP */ \
|
stream##_OUT_MODE, /* Interrupt EP */ \
|
||||||
NULL, /* SETUP packet notification callback */ \
|
NULL, /* SETUP packet notification callback */ \
|
||||||
NULL, /* IN notification callback */ \
|
NULL, /* IN notification callback */ \
|
||||||
qmkusbDataReceived, /* OUT notification callback */ \
|
qmkusbDataReceived, /* OUT notification callback */ \
|
||||||
0, /* IN maximum packet size */ \
|
0, /* IN maximum packet size */ \
|
||||||
stream##_EPSIZE, /* OUT maximum packet size */ \
|
stream##_EPSIZE, /* OUT maximum packet size */ \
|
||||||
NULL, /* IN Endpoint state */ \
|
NULL, /* IN Endpoint state */ \
|
||||||
NULL, /* OUT endpoint state */ \
|
NULL, /* OUT endpoint state */ \
|
||||||
2, /* IN multiplier */ \
|
2, /* IN multiplier */ \
|
||||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||||
}, \
|
}, \
|
||||||
.int_ep_config = \
|
.int_ep_config = \
|
||||||
{ \
|
{ \
|
||||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
|
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
|
||||||
NULL, /* SETUP packet notification callback */ \
|
NULL, /* SETUP packet notification callback */ \
|
||||||
qmkusbInterruptTransmitted, /* IN notification callback */ \
|
qmkusbInterruptTransmitted, /* IN notification callback */ \
|
||||||
NULL, /* OUT notification callback */ \
|
NULL, /* OUT notification callback */ \
|
||||||
CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
|
CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
|
||||||
0, /* OUT maximum packet size */ \
|
0, /* OUT maximum packet size */ \
|
||||||
NULL, /* IN Endpoint state */ \
|
NULL, /* IN Endpoint state */ \
|
||||||
NULL, /* OUT endpoint state */ \
|
NULL, /* OUT endpoint state */ \
|
||||||
2, /* IN multiplier */ \
|
2, /* IN multiplier */ \
|
||||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||||
}, \
|
}, \
|
||||||
.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 {
|
||||||
|
|
Loading…
Reference in New Issue