diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-10 18:54:58 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-03-10 18:54:58 +0000 |
commit | 3d50b5c9e0eee6ca4eb2e9c1114fcd8ff109e984 (patch) | |
tree | 0090c63c20385e38b366710798e72769f21775f6 /os/hal/templates | |
parent | 310fd0745ef78c90279dcb0004971f26c01bae79 (diff) | |
download | ChibiOS-3d50b5c9e0eee6ca4eb2e9c1114fcd8ff109e984.tar.gz ChibiOS-3d50b5c9e0eee6ca4eb2e9c1114fcd8ff109e984.tar.bz2 ChibiOS-3d50b5c9e0eee6ca4eb2e9c1114fcd8ff109e984.zip |
USB improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2815 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r-- | os/hal/templates/usb_lld.c | 18 | ||||
-rw-r--r-- | os/hal/templates/usb_lld.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/os/hal/templates/usb_lld.c b/os/hal/templates/usb_lld.c index d2750d2e5..823946385 100644 --- a/os/hal/templates/usb_lld.c +++ b/os/hal/templates/usb_lld.c @@ -204,6 +204,24 @@ usbepstatus_t usb_lld_get_status_in(USBDriver *usbp, usbep_t ep) { }
/**
+ * @brief Reads a setup packet from the dedicated packet buffer.
+ * @details This function must be invoked in the context of the @p setup_cb
+ * callback in order to read the received setup packet.
+ * @pre In order to use this function the endpoint must have been
+ * initialized as a control endpoint.
+ * @post The endpoint is ready to accept another packet.
+ *
+ * @param[in] usbp pointer to the @p USBDriver object
+ * @param[in] ep endpoint number
+ * @param[out] buf buffer where to copy the packet data
+ *
+ * @notapi
+ */
+void usb_lld_read_setup(USBDriver *usbp, usbep_t ep, uint8_t *buf) {
+
+}
+
+/**
* @brief Reads a packet from the dedicated packet buffer.
* @pre In order to use this function he endpoint must have been
* initialized in packet mode.
diff --git a/os/hal/templates/usb_lld.h b/os/hal/templates/usb_lld.h index 254f6c5da..5b235eaa4 100644 --- a/os/hal/templates/usb_lld.h +++ b/os/hal/templates/usb_lld.h @@ -282,6 +282,7 @@ extern "C" { void usb_lld_disable_endpoints(USBDriver *usbp);
usbepstatus_t usb_lld_get_status_in(USBDriver *usbp, usbep_t ep);
usbepstatus_t usb_lld_get_status_out(USBDriver *usbp, usbep_t ep);
+ void usb_lld_read_setup(USBDriver *usbp, usbep_t ep, uint8_t *buf);
size_t usb_lld_read_packet(USBDriver *usbp, usbep_t ep,
uint8_t *buf, size_t n);
void usb_lld_write_packet(USBDriver *usbp, usbep_t ep,
|