mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-10-02 06:49:16 +02:00
Merge remote-tracking branch 'origin/develop' into xap
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "usb_main.h"
|
||||
|
||||
#include "host.h"
|
||||
#include "chibios_config.h"
|
||||
#include "debug.h"
|
||||
#include "suspend.h"
|
||||
#ifdef SLEEP_LED_ENABLE
|
||||
@@ -95,6 +96,13 @@ uint8_t extra_report_blank[3] = {0};
|
||||
* ---------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* USB Low Level driver specific endpoint fields */
|
||||
#if !defined(usb_lld_endpoint_fields)
|
||||
# define usb_lld_endpoint_fields \
|
||||
2, /* IN multiplier */ \
|
||||
NULL, /* SETUP buffer (not a SETUP endpoint) */
|
||||
#endif
|
||||
|
||||
/* HID specific constants */
|
||||
#define HID_GET_REPORT 0x01
|
||||
#define HID_GET_IDLE 0x02
|
||||
@@ -125,16 +133,15 @@ static const USBDescriptor *usb_get_descriptor_cb(USBDriver *usbp, uint8_t dtype
|
||||
static USBInEndpointState kbd_ep_state;
|
||||
/* keyboard endpoint initialization structure (IN) - see USBEndpointConfig comment at top of file */
|
||||
static const USBEndpointConfig kbd_ep_config = {
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */
|
||||
NULL, /* SETUP packet notification callback */
|
||||
kbd_in_cb, /* IN notification callback */
|
||||
NULL, /* OUT notification callback */
|
||||
KEYBOARD_EPSIZE, /* IN maximum packet size */
|
||||
0, /* OUT maximum packet size */
|
||||
&kbd_ep_state, /* IN Endpoint state */
|
||||
NULL, /* OUT endpoint state */
|
||||
2, /* IN multiplier */
|
||||
NULL /* SETUP buffer (not a SETUP endpoint) */
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */
|
||||
NULL, /* SETUP packet notification callback */
|
||||
kbd_in_cb, /* IN notification callback */
|
||||
NULL, /* OUT notification callback */
|
||||
KEYBOARD_EPSIZE, /* IN maximum packet size */
|
||||
0, /* OUT maximum packet size */
|
||||
&kbd_ep_state, /* IN Endpoint state */
|
||||
NULL, /* OUT endpoint state */
|
||||
usb_lld_endpoint_fields /* USB driver specific endpoint fields */
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -144,16 +151,15 @@ static USBInEndpointState mouse_ep_state;
|
||||
|
||||
/* mouse endpoint initialization structure (IN) - see USBEndpointConfig comment at top of file */
|
||||
static const USBEndpointConfig mouse_ep_config = {
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */
|
||||
NULL, /* SETUP packet notification callback */
|
||||
mouse_in_cb, /* IN notification callback */
|
||||
NULL, /* OUT notification callback */
|
||||
MOUSE_EPSIZE, /* IN maximum packet size */
|
||||
0, /* OUT maximum packet size */
|
||||
&mouse_ep_state, /* IN Endpoint state */
|
||||
NULL, /* OUT endpoint state */
|
||||
2, /* IN multiplier */
|
||||
NULL /* SETUP buffer (not a SETUP endpoint) */
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */
|
||||
NULL, /* SETUP packet notification callback */
|
||||
mouse_in_cb, /* IN notification callback */
|
||||
NULL, /* OUT notification callback */
|
||||
MOUSE_EPSIZE, /* IN maximum packet size */
|
||||
0, /* OUT maximum packet size */
|
||||
&mouse_ep_state, /* IN Endpoint state */
|
||||
NULL, /* OUT endpoint state */
|
||||
usb_lld_endpoint_fields /* USB driver specific endpoint fields */
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -163,16 +169,15 @@ static USBInEndpointState shared_ep_state;
|
||||
|
||||
/* shared endpoint initialization structure (IN) - see USBEndpointConfig comment at top of file */
|
||||
static const USBEndpointConfig shared_ep_config = {
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */
|
||||
NULL, /* SETUP packet notification callback */
|
||||
shared_in_cb, /* IN notification callback */
|
||||
NULL, /* OUT notification callback */
|
||||
SHARED_EPSIZE, /* IN maximum packet size */
|
||||
0, /* OUT maximum packet size */
|
||||
&shared_ep_state, /* IN Endpoint state */
|
||||
NULL, /* OUT endpoint state */
|
||||
2, /* IN multiplier */
|
||||
NULL /* SETUP buffer (not a SETUP endpoint) */
|
||||
USB_EP_MODE_TYPE_INTR, /* Interrupt EP */
|
||||
NULL, /* SETUP packet notification callback */
|
||||
shared_in_cb, /* IN notification callback */
|
||||
NULL, /* OUT notification callback */
|
||||
SHARED_EPSIZE, /* IN maximum packet size */
|
||||
0, /* OUT maximum packet size */
|
||||
&shared_ep_state, /* IN Endpoint state */
|
||||
NULL, /* OUT endpoint state */
|
||||
usb_lld_endpoint_fields /* USB driver specific endpoint fields */
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -255,29 +260,27 @@ typedef struct {
|
||||
.queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
|
||||
.in_ep_config = \
|
||||
{ \
|
||||
stream##_IN_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
qmkusbDataTransmitted, /* IN notification callback */ \
|
||||
NULL, /* OUT notification callback */ \
|
||||
stream##_EPSIZE, /* IN maximum packet size */ \
|
||||
0, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
stream##_IN_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
qmkusbDataTransmitted, /* IN notification callback */ \
|
||||
NULL, /* OUT notification callback */ \
|
||||
stream##_EPSIZE, /* IN maximum packet size */ \
|
||||
0, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
usb_lld_endpoint_fields /* USB driver specific endpoint fields */ \
|
||||
}, \
|
||||
.out_ep_config = \
|
||||
{ \
|
||||
stream##_OUT_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
NULL, /* IN notification callback */ \
|
||||
qmkusbDataReceived, /* OUT notification callback */ \
|
||||
0, /* IN maximum packet size */ \
|
||||
stream##_EPSIZE, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
stream##_OUT_MODE, /* Interrupt EP */ \
|
||||
NULL, /* SETUP packet notification callback */ \
|
||||
NULL, /* IN notification callback */ \
|
||||
qmkusbDataReceived, /* OUT notification callback */ \
|
||||
0, /* IN maximum packet size */ \
|
||||
stream##_EPSIZE, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
usb_lld_endpoint_fields /* USB driver specific endpoint fields */ \
|
||||
}, \
|
||||
.int_ep_config = \
|
||||
{ \
|
||||
@@ -289,8 +292,7 @@ typedef struct {
|
||||
0, /* OUT maximum packet size */ \
|
||||
NULL, /* IN Endpoint state */ \
|
||||
NULL, /* OUT endpoint state */ \
|
||||
2, /* IN multiplier */ \
|
||||
NULL, /* SETUP buffer (not a SETUP endpoint) */ \
|
||||
usb_lld_endpoint_fields /* USB driver specific endpoint fields */ \
|
||||
}, \
|
||||
.config = { \
|
||||
.usbp = &USB_DRIVER, \
|
||||
|
||||
Reference in New Issue
Block a user