Rename USB endpoints, update ChibiOS-Contrib (#2334)
* rename endpoints * update chibios contrib Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
275b058e32
commit
315360cb04
|
@ -1 +1 @@
|
||||||
Subproject commit 61baa6b036138c155f7cfc5646d833d9423f3243
|
Subproject commit 0a0aa7491dc24b7d984c4d391b9647e270af7c53
|
|
@ -251,48 +251,35 @@ static const USBDescriptor *get_descriptor(USBDriver *usbp,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// IN CDC data state.
|
||||||
* @brief IN EP1 state.
|
static USBInEndpointState cdcDataInstate;
|
||||||
*/
|
// OUT CDC data state.
|
||||||
static USBInEndpointState ep1instate;
|
static USBOutEndpointState cdcDataOutstate;
|
||||||
|
// CDC data initialization structure (both IN and OUT).
|
||||||
/**
|
static const USBEndpointConfig cdcDataEpConfig = {
|
||||||
* @brief OUT EP1 state.
|
|
||||||
*/
|
|
||||||
static USBOutEndpointState ep1outstate;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief EP1 initialization structure (both IN and OUT).
|
|
||||||
*/
|
|
||||||
static const USBEndpointConfig ep1config = {
|
|
||||||
USB_EP_MODE_TYPE_BULK,
|
USB_EP_MODE_TYPE_BULK,
|
||||||
NULL,
|
NULL,
|
||||||
sduDataTransmitted,
|
sduDataTransmitted,
|
||||||
sduDataReceived,
|
sduDataReceived,
|
||||||
0x0040,
|
0x0040,
|
||||||
0x0040,
|
0x0040,
|
||||||
&ep1instate,
|
&cdcDataInstate,
|
||||||
&ep1outstate,
|
&cdcDataOutstate,
|
||||||
4,
|
4,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
// IN CDC interrupt state.
|
||||||
* @brief IN EP2 state.
|
static USBInEndpointState cdcInterruptInstate;
|
||||||
*/
|
// CDC interrupt initialization structure (IN only).
|
||||||
static USBInEndpointState ep2instate;
|
static const USBEndpointConfig cdcInterruptEpConfig = {
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief EP2 initialization structure (IN only).
|
|
||||||
*/
|
|
||||||
static const USBEndpointConfig ep2config = {
|
|
||||||
USB_EP_MODE_TYPE_INTR,
|
USB_EP_MODE_TYPE_INTR,
|
||||||
NULL,
|
NULL,
|
||||||
sduInterruptTransmitted,
|
sduInterruptTransmitted,
|
||||||
NULL,
|
NULL,
|
||||||
0x0010,
|
0x0010,
|
||||||
0x0000,
|
0x0000,
|
||||||
&ep2instate,
|
&cdcInterruptInstate,
|
||||||
NULL,
|
NULL,
|
||||||
1,
|
1,
|
||||||
NULL
|
NULL
|
||||||
|
@ -311,8 +298,8 @@ static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||||
/* Enables the endpoints specified into the configuration.
|
/* Enables the endpoints specified into the configuration.
|
||||||
Note, this callback is invoked from an ISR so I-Class functions
|
Note, this callback is invoked from an ISR so I-Class functions
|
||||||
must be used.*/
|
must be used.*/
|
||||||
usbInitEndpointI(usbp, USBD1_DATA_REQUEST_EP, &ep1config);
|
usbInitEndpointI(usbp, USBD1_DATA_REQUEST_EP, &cdcDataEpConfig);
|
||||||
usbInitEndpointI(usbp, USBD1_INTERRUPT_REQUEST_EP, &ep2config);
|
usbInitEndpointI(usbp, USBD1_INTERRUPT_REQUEST_EP, &cdcInterruptEpConfig);
|
||||||
|
|
||||||
/* Resetting the state of the CDC subsystem.*/
|
/* Resetting the state of the CDC subsystem.*/
|
||||||
sduConfigureHookI(&SDU1);
|
sduConfigureHookI(&SDU1);
|
||||||
|
|
Loading…
Reference in New Issue