aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-01-31 09:59:29 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-01-31 09:59:29 +0000
commiteb9e20c1dcf32713d41d969c07d1e947ad3a40a4 (patch)
tree2f2c2f4d2a55b0ac4f9cb26eeb2ba475ef9beadb /os/hal/ports/STM32/LLD
parent87aec1f48cd79adb924d3cfb855e300a76a64559 (diff)
downloadChibiOS-eb9e20c1dcf32713d41d969c07d1e947ad3a40a4.tar.gz
ChibiOS-eb9e20c1dcf32713d41d969c07d1e947ad3a40a4.tar.bz2
ChibiOS-eb9e20c1dcf32713d41d969c07d1e947ad3a40a4.zip
More fixes related to endpoints number.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10072 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c4
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h8
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h12
3 files changed, 10 insertions, 14 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
index 73f585f21..069de3753 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
@@ -115,7 +115,7 @@ static const USBEndpointConfig ep0config = {
static const stm32_otg_params_t fsparams = {
STM32_USB_OTG1_RX_FIFO_SIZE / 4,
STM32_OTG1_FIFO_MEM_SIZE,
- STM32_OTG1_ENDOPOINTS_NUMBER
+ STM32_OTG1_ENDPOINTS
};
#endif
@@ -123,7 +123,7 @@ static const stm32_otg_params_t fsparams = {
static const stm32_otg_params_t hsparams = {
STM32_USB_OTG2_RX_FIFO_SIZE / 4,
STM32_OTG2_FIFO_MEM_SIZE,
- STM32_OTG2_ENDOPOINTS_NUMBER
+ STM32_OTG2_ENDPOINTS
};
#endif
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
index 38dde56b2..5f94a67ab 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h
@@ -167,6 +167,14 @@
#error "STM32_OTG2_ENDPOINTS not defined in registry"
#endif
+#if STM32_HAS_OTG1 && !defined(STM32_OTG1_FIFO_MEM_SIZE)
+#error "STM32_OTG1_FIFO_MEM_SIZE not defined in registry"
+#endif
+
+#if STM32_HAS_OTG2 && !defined(STM32_OTG2_FIFO_MEM_SIZE)
+#error "STM32_OTG2_FIFO_MEM_SIZE not defined in registry"
+#endif
+
#if (STM32_USB_USE_OTG1 && !defined(STM32_OTG1_HANDLER)) || \
(STM32_USB_USE_OTG2 && !defined(STM32_OTG2_HANDLER))
#error "STM32_OTGx_HANDLER not defined in registry"
diff --git a/os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h b/os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h
index 82c843083..00b67b32a 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h
+++ b/os/hal/ports/STM32/LLD/OTGv1/stm32_otg.h
@@ -26,18 +26,6 @@
#define STM32_OTG_H
/**
- * @brief Number of the implemented endpoints in OTG_FS.
- * @details This value does not include the endpoint 0 that is always present.
- */
-#define STM32_OTG1_ENDOPOINTS_NUMBER 3
-
-/**
- * @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 320