From 2c15c4864f33c3c71c58e54494561eff1b291a0f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 14 Feb 2011 19:37:40 +0000 Subject: 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 --- testhal/STM32/USB_CDC/main.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'testhal/STM32') 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 @@ -232,21 +232,6 @@ static const USBDescriptor *get_descriptor(USBDriver *usbp, return NULL; } -/** - * @brief EP1 state. - */ -USBEndpointState ep1state; - -/** - * @brief EP2 state. - */ -USBEndpointState ep2state; - -/** - * @brief EP3 state. - */ -USBEndpointState ep3state; - /** * @brief EP1 initialization structure (IN only). */ @@ -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: -- cgit v1.2.3