aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/OTGv1/stm32_otg.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-18 13:17:03 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-18 13:17:03 +0000
commitf50d9fb0480b9ce521e80af21ffbff79e0ca5b44 (patch)
treebc64438ca199758ca29135e6c747b6e8c21cba93 /os/hal/platforms/STM32/OTGv1/stm32_otg.h
parentebc792e58d45d96506bdb7afe379b4ddee9bc48e (diff)
downloadChibiOS-f50d9fb0480b9ce521e80af21ffbff79e0ca5b44.tar.gz
ChibiOS-f50d9fb0480b9ce521e80af21ffbff79e0ca5b44.tar.bz2
ChibiOS-f50d9fb0480b9ce521e80af21ffbff79e0ca5b44.zip
Added support for STM32 OTH_HS peripheral (not tested yet).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4578 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/OTGv1/stm32_otg.h')
-rw-r--r--os/hal/platforms/STM32/OTGv1/stm32_otg.h35
1 files changed, 23 insertions, 12 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/stm32_otg.h b/os/hal/platforms/STM32/OTGv1/stm32_otg.h
index 7313174b7..6ba0746c9 100644
--- a/os/hal/platforms/STM32/OTGv1/stm32_otg.h
+++ b/os/hal/platforms/STM32/OTGv1/stm32_otg.h
@@ -30,15 +30,26 @@
#define _STM32_OTG_H_
/**
- * @brief Number of the implemented endpoints.
+ * @brief Number of the implemented endpoints in OTG_FS.
* @details This value does not include the endpoint 0 that is always present.
*/
-#define STM32_OTG_ENDOPOINTS_NUMBER 3
+#define STM32_OTG1_ENDOPOINTS_NUMBER 3
/**
- * @brief FIFO memory size in words.
+ * @brief Number of the implemented endpoints in OTG_HS.
+ * @details This value does not include the endpoint 0 that is always present.
+ */
+#define STM32_OTG2_ENDOPOINTS_NUMBER 5
+
+/**
+ * @brief OTG_FS FIFO memory size in words.
+ */
+#define STM32_OTG1_FIFO_MEM_SIZE 384
+
+/**
+ * @brief OTG_HS FIFO memory size in words.
*/
-#define STM32_OTG_FIFO_MEM_SIZE 384
+#define STM32_OTG2_FIFO_MEM_SIZE 1024
/**
* @brief Host channel registers group.
@@ -881,24 +892,24 @@ typedef struct {
/** @} */
/**
- * @brief OTG registers block memory address.
+ * @brief OTG_FS registers block memory address.
*/
#define OTG_FS_ADDR 0x50000000
+
+/**
+ * @brief OTG_HS registers block memory address.
+ */
#define OTG_HS_ADDR 0x40040000
/**
- * @brief Accesses to the OTG registers block.
+ * @brief Accesses to the OTG_FS registers block.
*/
#define OTG_FS ((stm32_otg_t *)OTG_FS_ADDR)
-#define OTG OTG_FS
-#define OTG_HS ((stm32_otg_t *)OTG_HS_ADDR)
/**
- * @brief Returns a FIFO address.
+ * @brief Accesses to the OTG_HS registers block.
*/
-/*#define OTG1_FIFO(addr, n) ((volatile uint32_t *)((addr) + \
- 0x1000 + \
- (0x1000 * (n))))*/
+#define OTG_HS ((stm32_otg_t *)OTG_HS_ADDR)
#endif /* _STM32_OTG_H_ */