{stm32,stm32l4,stm32f0l0g0}/otg: move STM32_NENDPOINTS definitions to header files
This value is useful for users when initializing a USB composite device in a board-specific logic
This commit is contained in:
parent
2c97c76577
commit
68f6fb2edd
@ -35,6 +35,14 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_STM32_OTGFS)
|
#if defined(CONFIG_STM32_OTGFS)
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Number of endpoints */
|
||||||
|
|
||||||
|
#define STM32_NENDPOINTS (4) /* ep0-3 x 2 for IN and OUT */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -271,10 +271,6 @@
|
|||||||
|
|
||||||
/* Endpoints ****************************************************************/
|
/* Endpoints ****************************************************************/
|
||||||
|
|
||||||
/* Number of endpoints */
|
|
||||||
|
|
||||||
#define STM32_NENDPOINTS (4) /* ep0-3 x 2 for IN and OUT */
|
|
||||||
|
|
||||||
/* Odd physical endpoint numbers are IN; even are OUT */
|
/* Odd physical endpoint numbers are IN; even are OUT */
|
||||||
|
|
||||||
#define STM32_EPPHYIN2LOG(epphy) ((uint8_t)(epphy)|USB_DIR_IN)
|
#define STM32_EPPHYIN2LOG(epphy) ((uint8_t)(epphy)|USB_DIR_IN)
|
||||||
|
@ -34,6 +34,14 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_STM32_OTGHS)
|
#if defined(CONFIG_STM32_OTGHS)
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Number of endpoints */
|
||||||
|
|
||||||
|
#define STM32_NENDPOINTS (4) /* ep0-3 x 2 for IN and OUT */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -227,10 +227,6 @@
|
|||||||
|
|
||||||
/* Endpoints ****************************************************************/
|
/* Endpoints ****************************************************************/
|
||||||
|
|
||||||
/* Number of endpoints */
|
|
||||||
|
|
||||||
#define STM32_NENDPOINTS (4) /* ep0-3 x 2 for IN and OUT */
|
|
||||||
|
|
||||||
/* Odd physical endpoint numbers are IN; even are OUT */
|
/* Odd physical endpoint numbers are IN; even are OUT */
|
||||||
|
|
||||||
#define STM32_EPPHYIN2LOG(epphy) ((uint8_t)(epphy)|USB_DIR_IN)
|
#define STM32_EPPHYIN2LOG(epphy) ((uint8_t)(epphy)|USB_DIR_IN)
|
||||||
|
@ -103,7 +103,6 @@
|
|||||||
* endpoint register sets there are.
|
* endpoint register sets there are.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STM32_NENDPOINTS (8)
|
|
||||||
#define EP0 (0)
|
#define EP0 (0)
|
||||||
#define EP1 (1)
|
#define EP1 (1)
|
||||||
#define EP2 (2)
|
#define EP2 (2)
|
||||||
|
@ -32,6 +32,14 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "hardware/stm32_usbdev.h"
|
#include "hardware/stm32_usbdev.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Number of endpoints */
|
||||||
|
|
||||||
|
#define STM32_NENDPOINTS (8)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions Prototypes
|
* Public Functions Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
* endpoint register sets there are.
|
* endpoint register sets there are.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STM32_NENDPOINTS (8)
|
|
||||||
#define EP0 (0)
|
#define EP0 (0)
|
||||||
#define EP1 (1)
|
#define EP1 (1)
|
||||||
#define EP2 (2)
|
#define EP2 (2)
|
||||||
|
@ -32,6 +32,14 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "hardware/stm32_usbfs.h"
|
#include "hardware/stm32_usbfs.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Number of endpoints */
|
||||||
|
|
||||||
|
#define STM32_NENDPOINTS (8)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions Prototypes
|
* Public Functions Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -89,7 +89,6 @@
|
|||||||
* endpoint register sets there are.
|
* endpoint register sets there are.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STM32_NENDPOINTS (8)
|
|
||||||
#define EP0 (0)
|
#define EP0 (0)
|
||||||
#define EP1 (1)
|
#define EP1 (1)
|
||||||
#define EP2 (2)
|
#define EP2 (2)
|
||||||
|
@ -41,6 +41,14 @@
|
|||||||
# error "Unsupported STM32L4 chip"
|
# error "Unsupported STM32L4 chip"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* Number of endpoints */
|
||||||
|
|
||||||
|
#define STM32L4_NENDPOINTS (6) /* ep0-5 x 2 for IN and OUT */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions Prototypes
|
* Public Functions Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -106,10 +106,6 @@
|
|||||||
# define CONFIG_USBDEV_EP5_TXFIFO_SIZE 128
|
# define CONFIG_USBDEV_EP5_TXFIFO_SIZE 128
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Number of endpoints */
|
|
||||||
|
|
||||||
#define STM32L4_NENDPOINTS (6) /* ep0-5 x 2 for IN and OUT */
|
|
||||||
|
|
||||||
/* Adjust actual number of endpoints based upon size;
|
/* Adjust actual number of endpoints based upon size;
|
||||||
* 0 means 'not available', and we expect that the first 0-length endpoint
|
* 0 means 'not available', and we expect that the first 0-length endpoint
|
||||||
* implies that all others after are unused as well (irrespective of what
|
* implies that all others after are unused as well (irrespective of what
|
||||||
|
Loading…
Reference in New Issue
Block a user