summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/usb/usbhost.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-12-18 17:35:54 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-12-18 17:35:54 +0000
commit077973d0f4af265524de327cded137a9bd17516c (patch)
treefb875ad4dd04742de55367fe7f1fef523e1fc41b /nuttx/include/nuttx/usb/usbhost.h
parent513f435250e6a6e5d0af288358091e9aff47cdba (diff)
downloadnuttx-077973d0f4af265524de327cded137a9bd17516c.tar.gz
nuttx-077973d0f4af265524de327cded137a9bd17516c.tar.bz2
nuttx-077973d0f4af265524de327cded137a9bd17516c.zip
Finishes first cut at USB host MS class
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3195 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/nuttx/usb/usbhost.h')
-rw-r--r--nuttx/include/nuttx/usb/usbhost.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/usb/usbhost.h b/nuttx/include/nuttx/usb/usbhost.h
index f49db871e..821d127d2 100644
--- a/nuttx/include/nuttx/usb/usbhost.h
+++ b/nuttx/include/nuttx/usb/usbhost.h
@@ -314,6 +314,30 @@
#define DRVR_TRANSFER(drvr,ed,buffer,buflen) ((drvr)->transfer(drvr,ed,buffer,buflen))
/************************************************************************************
+ * Name: DRVR_DISCONNECT
+ *
+ * Description:
+ * Called by the class when an error occurs and driver has been disconnected.
+ * The USB host driver should discard the handle to the class instance (it is
+ * stale) and not attempt any further interaction with the class driver instance
+ * (until a new instance is received from the create() method). The driver
+ * should not called the class' disconnected() method.
+ *
+ * Input Parameters:
+ * drvr - The USB host driver instance obtained as a parameter from the call to
+ * the class create() method.
+ *
+ * Returned Values:
+ * None
+ *
+ * Assumptions:
+ * This function will *not* be called from an interrupt handler.
+ *
+ ************************************************************************************/
+
+#define DRVR_DISCONNECT(drvr) ((drvr)->disconnect(drvr))
+
+/************************************************************************************
* Public Types
************************************************************************************/
@@ -444,6 +468,14 @@ struct usbhost_driver_s
int (*transfer)(FAR struct usbhost_driver_s *drvr,
FAR struct usbhost_epdesc_s *ed,
FAR uint8_t *buffer, size_t buflen);
+
+ /* Called by the class when an error occurs and driver has been disconnected.
+ * The USB host driver should discard the handle to the class instance (it is
+ * stale) and not attempt any further interaction with the class driver instance
+ * (until a new instance is received from the create() method).
+ */
+
+ void (*disconnect)(FAR struct usbhost_driver_s *drvr);
};
/* This structure describes one endpoint */