aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-06 09:51:16 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-06 09:51:16 +0000
commit4e68b68d5a799300bcbbfb3fdff0ea584239bcb0 (patch)
tree4e9bd4ee6753cbe7a32cc276d3309c6a391f4630 /os/hal/include
parent200f020df922ac84ffc0e0c98c97a193e3180b1f (diff)
downloadChibiOS-4e68b68d5a799300bcbbfb3fdff0ea584239bcb0.tar.gz
ChibiOS-4e68b68d5a799300bcbbfb3fdff0ea584239bcb0.tar.bz2
ChibiOS-4e68b68d5a799300bcbbfb3fdff0ea584239bcb0.zip
USB rework, step 2.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2714 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/usb.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h
index 9f0d95837..e5f309bd3 100644
--- a/os/hal/include/usb.h
+++ b/os/hal/include/usb.h
@@ -73,6 +73,9 @@
#define USB_FEATURE_DEVICE_REMOTE_WAKEUP 1
#define USB_FEATURE_TEST_MODE 2
+#define USB_EARLY_SET_ADDRESS 0
+#define USB_LATE_SET_ADDRESS 1
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -296,10 +299,9 @@ typedef const USBDescriptor * (*usbgetdescriptor_t)(USBDriver *usbp,
*
* @api
*/
-#define usbSetupTransfer(usbp, buf, n, endcb) { \
- (usbp)->usb_ep0next = (buf); \
- (usbp)->usb_ep0n = (n); \
- (usbp)->usb_ep0endcb = (endcb); \
+#define usbSetupTransfer(usbp, buf, n) { \
+ (usbp)->ep0next = (buf); \
+ (usbp)->ep0n = (n); \
}
/*===========================================================================*/
@@ -315,6 +317,13 @@ extern "C" {
void usbStop(USBDriver *usbp);
void usbInitEndpointI(USBDriver *usbp, usbep_t ep, USBEndpointState *epp,
const USBEndpointConfig *epcp);
+ void usbDisableEndpointsI(USBDriver *usbp);
+ bool_t usbStartReceiveI(USBDriver *usbp, usbep_t ep,
+ uint8_t *buf, size_t n);
+ bool_t usbStartTransmitI(USBDriver *usbp, usbep_t ep,
+ const uint8_t *buf, size_t n);
+ bool_t usbStallReceiveI(USBDriver *usbp, usbep_t ep);
+ bool_t usbStallTransmitI(USBDriver *usbp, usbep_t ep);
void _usb_reset(USBDriver *usbp);
void _usb_ep0in(USBDriver *usbp, usbep_t ep);
void _usb_ep0out(USBDriver *usbp, usbep_t ep);