More fixes related to endpoints number.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10072 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2017-01-31 09:59:29 +00:00
parent 87aec1f48c
commit eb9e20c1dc
3 changed files with 10 additions and 14 deletions

View File

@ -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

View File

@ -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"

View File

@ -25,18 +25,6 @@
#ifndef STM32_OTG_H
#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.
*/