aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/usb_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-02 15:24:30 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-11-02 15:24:30 +0000
commita94bfc5f713ee3b7659c53458b61f40ff39dc660 (patch)
tree59f7112dc401c17d9d70509259fa64f3e327fa52 /os/hal/templates/usb_lld.h
parent359413415a20db40244a23794b8aef2d979254fc (diff)
downloadChibiOS-a94bfc5f713ee3b7659c53458b61f40ff39dc660.tar.gz
ChibiOS-a94bfc5f713ee3b7659c53458b61f40ff39dc660.tar.bz2
ChibiOS-a94bfc5f713ee3b7659c53458b61f40ff39dc660.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7461 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates/usb_lld.h')
-rw-r--r--os/hal/templates/usb_lld.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/os/hal/templates/usb_lld.h b/os/hal/templates/usb_lld.h
index 7dbf8b4b9..40970043a 100644
--- a/os/hal/templates/usb_lld.h
+++ b/os/hal/templates/usb_lld.h
@@ -1,5 +1,5 @@
/*
- ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
+ ChibiOS/HAL - Copyright (C) 2006-2014 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -15,8 +15,8 @@
*/
/**
- * @file templates/usb_lld.h
- * @brief USB Driver subsystem low level driver header template.
+ * @file PLATFORM/usb_lld.h
+ * @brief PLATFORM USB subsystem low level driver header.
*
* @addtogroup USB
* @{
@@ -37,9 +37,14 @@
#define USB_MAX_ENDPOINTS 4
/**
+ * @brief Status stage handling method.
+ */
+#define USB_EP0_STATUS_STAGE USB_EP0_STATUS_STAGE_SW
+
+/**
* @brief The address can be changed immediately upon packet reception.
*/
-#define USB_SET_ADDRESS_MODE USB_EARLY_SET_ADDRESS
+#define USB_SET_ADDRESS_MODE USB_LATE_SET_ADDRESS
/*===========================================================================*/
/* Driver pre-compile time settings. */
@@ -54,7 +59,7 @@
* @details If set to @p TRUE the support for USB1 is included.
*/
#if !defined(PLATFORM_USB_USE_USB1) || defined(__DOXYGEN__)
-#define PLATFORM_USB_USE_USB1 FALSE
+#define PLATFORM_USB_USE_USB1 FALSE
#endif
/** @} */
@@ -73,7 +78,7 @@ typedef struct {
/**
* @brief Buffer mode, queue or linear.
*/
- bool_t txqueued;
+ bool txqueued;
/**
* @brief Requested transmit transfer size.
*/
@@ -93,8 +98,9 @@ typedef struct {
/**
* @brief Pointer to the output queue.
*/
- OutputQueue *txqueue;
+ output_queue_t *txqueue;
} queue;
+ /* End of the mandatory fields.*/
} mode;
} USBInEndpointState;
@@ -105,7 +111,7 @@ typedef struct {
/**
* @brief Buffer mode, queue or linear.
*/
- bool_t rxqueued;
+ bool rxqueued;
/**
* @brief Requested receive transfer size.
*/
@@ -125,9 +131,10 @@ typedef struct {
/**
* @brief Pointer to the input queue.
*/
- InputQueue *rxqueue;
+ input_queue_t *rxqueue;
} queue;
} mode;
+ /* End of the mandatory fields.*/
} USBOutEndpointState;
/**
@@ -295,6 +302,16 @@ struct USBDriver {
/*===========================================================================*/
/**
+ * @brief Returns the current frame number.
+ *
+ * @param[in] usbp pointer to the @p USBDriver object
+ * @return The current frame number.
+ *
+ * @notapi
+ */
+#define usb_lld_get_frame_number(usbp) 0
+
+/**
* @brief Returns the exact size of a receive transaction.
* @details The received size can be different from the size specified in
* @p usbStartReceiveI() because the last packet could have a size