diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-01 10:16:13 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-11-01 10:16:13 +0000 |
commit | 656ec7b1fbd543c5c32a9eee3292cdf2f70701f8 (patch) | |
tree | 3cfa19b74a11a4a44ec1ed6c45339c9e449ad768 /os/hal/platforms/STM32/USBv1/stm32_usb.h | |
parent | a54d331c93e98f75a2784adf48e61dcd81b792bb (diff) | |
download | ChibiOS-656ec7b1fbd543c5c32a9eee3292cdf2f70701f8.tar.gz ChibiOS-656ec7b1fbd543c5c32a9eee3292cdf2f70701f8.tar.bz2 ChibiOS-656ec7b1fbd543c5c32a9eee3292cdf2f70701f8.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3459 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/USBv1/stm32_usb.h')
-rw-r--r-- | os/hal/platforms/STM32/USBv1/stm32_usb.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32/USBv1/stm32_usb.h b/os/hal/platforms/STM32/USBv1/stm32_usb.h index b06e8d887..435224033 100644 --- a/os/hal/platforms/STM32/USBv1/stm32_usb.h +++ b/os/hal/platforms/STM32/USBv1/stm32_usb.h @@ -78,7 +78,7 @@ typedef struct { /**
* @brief TX buffer offset register.
*/
- volatile uint32_t TXADDR;
+ volatile uint32_t TXADDR0;
/**
* @brief TX counter register 0.
*/
@@ -90,7 +90,7 @@ typedef struct { /**
* @brief RX buffer offset register.
*/
- volatile uint32_t RXADDR;
+ volatile uint32_t RXADDR0;
/**
* @brief RX counter register 0.
*/
@@ -102,6 +102,14 @@ typedef struct { } stm32_usb_descriptor_t;
/**
+ * @name Register aliases
+ * @{
+ */
+#define RXADDR1 TXADDR0
+#define TXADDR1 RXADDR0
+/** @} */
+
+/**
* @brief USB registers block numeric address.
*/
#define STM32_USB_BASE (APB1PERIPH_BASE + 0x5C00)
@@ -140,9 +148,11 @@ typedef struct { #define EPR_STAT_TX_NAK 0x0020
#define EPR_STAT_TX_VALID 0x0030
#define EPR_DTOG_TX 0x0040
-#define EPR_SWBUF_RX 0x0040
+#define EPR_SWBUF_RX EPR_DTOG_TX
#define EPR_CTR_TX 0x0080
#define EPR_EP_KIND 0x0100
+#define EPR_EP_DBL_BUF EPR_EP_KIND
+#define EPR_EP_STATUS_OUT EPR_EP_KIND
#define EPR_EP_TYPE_MASK 0x0600
#define EPR_EP_TYPE_BULK 0x0000
#define EPR_EP_TYPE_CONTROL 0x0200
@@ -155,7 +165,7 @@ typedef struct { #define EPR_STAT_RX_NAK 0x2000
#define EPR_STAT_RX_VALID 0x3000
#define EPR_DTOG_RX 0x4000
-#define EPR_SWBUF_TX 0x4000
+#define EPR_SWBUF_TX EPR_DTOG_RX
#define EPR_CTR_RX 0x8000
#define CNTR_FRES 0x0001
|