Auto updated submodule references [01-02-2025]
[betaflight.git] / src / platform / APM32 / usb / usbd_board.h
blob58546ab8df5cb5e643771a1b9444b07487ec0793
1 /**
2 * @file usbd_board.h
4 * @brief Header file for USB Board
6 * @attention
8 * Copyright (C) 2023 Geehy Semiconductor
10 * You may not use this file except in compliance with the
11 * GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
13 * The program is only for reference, which is distributed in the hope
14 * that it will be useful and instructional for customers to develop
15 * their software. Unless required by applicable law or agreed to in
16 * writing, the program is distributed on an "AS IS" BASIS, WITHOUT
17 * ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
19 * and limitations under the License.
22 /* Define to prevent recursive inclusion */
23 #ifndef _USBD_BOARD_H_
24 #define _USBD_BOARD_H_
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
30 /* Includes ***************************************************************/
31 #include "platform.h"
33 /* Exported macro *********************************************************/
34 #define USBD_SUP_CLASS_MAX_NUM 1U
35 #define USBD_SUP_INTERFACE_MAX_NUM 1U
36 #define USBD_SUP_CONFIGURATION_MAX_NUM 1U
37 #define USBD_SUP_STR_DESC_MAX_NUM 512U
38 #define USBD_SUP_MSC_MEDIA_PACKET 512U
40 /* Only support LPM USB device */
41 #define USBD_SUP_LPM 0U
42 #define USBD_SUP_SELF_PWR 1U
43 #define USBD_DEBUG_LEVEL 0U
44 #define USE_USB_FS
45 // #define USE_USB_HS
47 #if (USBD_DEBUG_LEVEL > 0U)
48 #define USBD_USR_LOG(...) do { \
49 printf(__VA_ARGS__); \
50 printf("\r\n"); \
51 } while(0)
52 #else
53 #define USBD_USR_LOG(...) do {} while (0)
54 #endif
56 #if (USBD_DEBUG_LEVEL > 1U)
57 #define USBD_USR_Debug(...) do { \
58 printf("Debug:"); \
59 printf(__VA_ARGS__); \
60 printf("\r\n"); \
61 } while(0)
62 #else
63 #define USBD_USR_Debug(...) do {} while (0)
64 #endif
66 /* Exported typedef *******************************************************/
68 /* Exported function prototypes *******************************************/
70 #ifdef __cplusplus
72 #endif
74 #endif /* USBD_BOARD_H */