git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4271 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
467af68aa0
commit
41eb1a7e7e
|
@ -288,8 +288,8 @@ void sduDataTransmitted(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
(void)ep;
|
(void)ep;
|
||||||
|
|
||||||
chnAddFlagsI(sdup, CHN_OUTPUT_EMPTY);
|
|
||||||
chSysLockFromIsr();
|
chSysLockFromIsr();
|
||||||
|
chnAddFlagsI(sdup, CHN_OUTPUT_EMPTY);
|
||||||
|
|
||||||
if ((n = chOQGetFullI(&sdup->oqueue)) > 0) {
|
if ((n = chOQGetFullI(&sdup->oqueue)) > 0) {
|
||||||
/* The endpoint cannot be busy, we are in the context of the callback,
|
/* The endpoint cannot be busy, we are in the context of the callback,
|
||||||
|
@ -321,8 +321,8 @@ void sduDataReceived(USBDriver *usbp, usbep_t ep) {
|
||||||
|
|
||||||
(void)ep;
|
(void)ep;
|
||||||
|
|
||||||
chnAddFlagsI(sdup, CHN_INPUT_AVAILABLE);
|
|
||||||
chSysLockFromIsr();
|
chSysLockFromIsr();
|
||||||
|
chnAddFlagsI(sdup, CHN_INPUT_AVAILABLE);
|
||||||
|
|
||||||
/* Writes to the input queue can only happen when there is enough space
|
/* Writes to the input queue can only happen when there is enough space
|
||||||
to hold at least one packet.*/
|
to hold at least one packet.*/
|
||||||
|
|
|
@ -225,6 +225,11 @@ static const USBDescriptor *get_descriptor(USBDriver *usbp,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief IN EP1 state.
|
||||||
|
*/
|
||||||
|
static USBInEndpointState ep1instate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief EP1 initialization structure (IN only).
|
* @brief EP1 initialization structure (IN only).
|
||||||
*/
|
*/
|
||||||
|
@ -235,11 +240,16 @@ static const USBEndpointConfig ep1config = {
|
||||||
NULL,
|
NULL,
|
||||||
0x0040,
|
0x0040,
|
||||||
0x0000,
|
0x0000,
|
||||||
NULL,
|
&ep1instate,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OUT EP1 state.
|
||||||
|
*/
|
||||||
|
USBOutEndpointState ep1outstate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief EP2 initialization structure (IN only).
|
* @brief EP2 initialization structure (IN only).
|
||||||
*/
|
*/
|
||||||
|
@ -251,10 +261,15 @@ static const USBEndpointConfig ep2config = {
|
||||||
0x0010,
|
0x0010,
|
||||||
0x0000,
|
0x0000,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
&ep1outstate,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OUT EP2 state.
|
||||||
|
*/
|
||||||
|
USBOutEndpointState ep2outstate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief EP3 initialization structure (OUT only).
|
* @brief EP3 initialization structure (OUT only).
|
||||||
*/
|
*/
|
||||||
|
@ -266,7 +281,7 @@ static const USBEndpointConfig ep3config = {
|
||||||
0x0000,
|
0x0000,
|
||||||
0x0040,
|
0x0040,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
&ep2outstate,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue