aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/USBv1/usb_lld.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-12-30 11:47:19 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-12-30 11:47:19 +0000
commit32f4a2999d412aba93a6a252152ec8ca204c5b96 (patch)
treed25e0b223bf1e2089132c4d16f3bc95cd2df256f /os/hal/ports/STM32/LLD/USBv1/usb_lld.h
parent73b405b13ff98171368c9b76aa37f07f189eb31f (diff)
downloadChibiOS-32f4a2999d412aba93a6a252152ec8ca204c5b96.tar.gz
ChibiOS-32f4a2999d412aba93a6a252152ec8ca204c5b96.tar.bz2
ChibiOS-32f4a2999d412aba93a6a252152ec8ca204c5b96.zip
USBv1 ported to the new model.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8655 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/USBv1/usb_lld.h')
-rw-r--r--os/hal/ports/STM32/LLD/USBv1/usb_lld.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/os/hal/ports/STM32/LLD/USBv1/usb_lld.h b/os/hal/ports/STM32/LLD/USBv1/usb_lld.h
index 7464d52da..3f4abc052 100644
--- a/os/hal/ports/STM32/LLD/USBv1/usb_lld.h
+++ b/os/hal/ports/STM32/LLD/USBv1/usb_lld.h
@@ -151,6 +151,13 @@ typedef struct {
* @brief Pointer to the transmission linear buffer.
*/
const uint8_t *txbuf;
+#if (USB_USE_WAIT == TRUE) || defined(__DOXYGEN__)
+ /**
+ * @brief Waiting thread.
+ */
+ thread_reference_t thread;
+#endif
+ /* End of the mandatory fields.*/
} USBInEndpointState;
/**
@@ -169,6 +176,12 @@ typedef struct {
* @brief Pointer to the receive linear buffer.
*/
uint8_t *rxbuf;
+#if (USB_USE_WAIT == TRUE) || defined(__DOXYGEN__)
+ /**
+ * @brief Waiting thread.
+ */
+ thread_reference_t thread;
+#endif
/* End of the mandatory fields.*/
/**
* @brief Number of packets to receive.
@@ -198,36 +211,34 @@ typedef struct {
usbepcallback_t setup_cb;
/**
* @brief IN endpoint notification callback.
- * @details This field must be set to @p NULL if the IN endpoint is not
- * used.
+ * @details This field must be set to @p NULL if callback is not required.
*/
usbepcallback_t in_cb;
/**
* @brief OUT endpoint notification callback.
- * @details This field must be set to @p NULL if the OUT endpoint is not
- * used.
+ * @details This field must be set to @p NULL if callback is not required.
*/
usbepcallback_t out_cb;
/**
* @brief IN endpoint maximum packet size.
- * @details This field must be set to zero if the IN endpoint is not
- * used.
+ * @details This field must be set to zero if the IN endpoint is not used.
*/
uint16_t in_maxsize;
/**
* @brief OUT endpoint maximum packet size.
- * @details This field must be set to zero if the OUT endpoint is not
- * used.
+ * @details This field must be set to zero if the OUT endpoint is not used.
*/
uint16_t out_maxsize;
/**
* @brief @p USBEndpointState associated to the IN endpoint.
- * @details This structure maintains the state of the IN endpoint.
+ * @details This field must be set to @p NULL if the IN endpoint is not
+ * used.
*/
USBInEndpointState *in_state;
/**
* @brief @p USBEndpointState associated to the OUT endpoint.
- * @details This structure maintains the state of the OUT endpoint.
+ * @details This field must be set to @p NULL if the OUT endpoint is not
+ * used.
*/
USBOutEndpointState *out_state;
/* End of the mandatory fields.*/
@@ -433,8 +444,6 @@ extern "C" {
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);
- void usb_lld_prepare_receive(USBDriver *usbp, usbep_t ep);
- void usb_lld_prepare_transmit(USBDriver *usbp, usbep_t ep);
void usb_lld_start_out(USBDriver *usbp, usbep_t ep);
void usb_lld_start_in(USBDriver *usbp, usbep_t ep);
void usb_lld_stall_out(USBDriver *usbp, usbep_t ep);