diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-14 19:37:40 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-14 19:37:40 +0000 |
commit | 2c15c4864f33c3c71c58e54494561eff1b291a0f (patch) | |
tree | 0fe85fb7e1825b67d78cadab18901bc7e6068e1b /testhal/STM32/USB_CDC | |
parent | dd6a0b3ccdd62873e1cb874969741e3fb683db4b (diff) | |
download | ChibiOS-2c15c4864f33c3c71c58e54494561eff1b291a0f.tar.gz ChibiOS-2c15c4864f33c3c71c58e54494561eff1b291a0f.tar.bz2 ChibiOS-2c15c4864f33c3c71c58e54494561eff1b291a0f.zip |
More improvements in the USB driver model.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2738 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/USB_CDC')
-rw-r--r-- | testhal/STM32/USB_CDC/main.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/testhal/STM32/USB_CDC/main.c b/testhal/STM32/USB_CDC/main.c index 00f0d0e66..423a47413 100644 --- a/testhal/STM32/USB_CDC/main.c +++ b/testhal/STM32/USB_CDC/main.c @@ -233,21 +233,6 @@ static const USBDescriptor *get_descriptor(USBDriver *usbp, }
/**
- * @brief EP1 state.
- */
-USBEndpointState ep1state;
-
-/**
- * @brief EP2 state.
- */
-USBEndpointState ep2state;
-
-/**
- * @brief EP3 state.
- */
-USBEndpointState ep3state;
-
-/**
* @brief EP1 initialization structure (IN only).
*/
static const USBEndpointConfig ep1config = {
@@ -255,7 +240,9 @@ static const USBEndpointConfig ep1config = { sduDataTransmitted,
NULL,
0x0040,
- 0x0000
+ 0x0000,
+ NULL,
+ NULL
};
/**
@@ -266,7 +253,9 @@ static const USBEndpointConfig ep2config = { sduInterruptTransmitted,
NULL,
0x0010,
- 0x0000
+ 0x0000,
+ NULL,
+ NULL
};
/**
@@ -277,7 +266,9 @@ static const USBEndpointConfig ep3config = { NULL,
sduDataReceived,
0x0000,
- 0x0040
+ 0x0040,
+ NULL,
+ NULL
};
/*
@@ -293,9 +284,9 @@ static void usb_event(USBDriver *usbp, usbevent_t event) { case USB_EVENT_CONFIGURED:
/* Enables the endpoints specified into the configuration.*/
chSysLock();
- usbInitEndpointI(usbp, DATA_REQUEST_EP, &ep1state, &ep1config);
- usbInitEndpointI(usbp, INTERRUPT_REQUEST_EP, &ep2state, &ep2config);
- usbInitEndpointI(usbp, DATA_AVAILABLE_EP, &ep3state, &ep3config);
+ usbInitEndpointI(usbp, DATA_REQUEST_EP, &ep1config);
+ usbInitEndpointI(usbp, INTERRUPT_REQUEST_EP, &ep2config);
+ usbInitEndpointI(usbp, DATA_AVAILABLE_EP, &ep3config);
chSysUnlock();
return;
case USB_EVENT_SUSPEND:
|