summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_mcu.h7
-rw-r--r--src/common/tusb_types.h10
2 files changed, 14 insertions, 3 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index 48f765674..f89467e75 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -197,10 +197,17 @@
#define TUP_DCD_ENDPOINT_MAX 9
#elif TU_CHECK_MCU(OPT_MCU_STM32G4)
+ // Device controller
#define TUP_USBIP_FSDEV
#define TUP_USBIP_FSDEV_STM32
+
+ // TypeC controller
+ #define TUP_USBIP_TYPEC_STM32
+
#define TUP_DCD_ENDPOINT_MAX 8
+ #define TUP_TYPEC_RHPORTS_NUM 1
+
#elif TU_CHECK_MCU(OPT_MCU_STM32G0)
#define TUP_USBIP_FSDEV
#define TUP_USBIP_FSDEV_STM32
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index 39a2d4564..fab680989 100644
--- a/src/common/tusb_types.h
+++ b/src/common/tusb_types.h
@@ -232,6 +232,9 @@ enum {
#define TUSB_DESC_CONFIG_POWER_MA(x) ((x)/2)
+//--------------------------------------------------------------------+
+//
+//--------------------------------------------------------------------+
typedef enum
{
XFER_RESULT_SUCCESS = 0,
@@ -474,9 +477,10 @@ typedef struct TU_ATTR_PACKED
uint16_t bcdDFUVersion;
} tusb_desc_dfu_functional_t;
-/*------------------------------------------------------------------*/
-/* Types
- *------------------------------------------------------------------*/
+//--------------------------------------------------------------------+
+//
+//--------------------------------------------------------------------+
+
typedef struct TU_ATTR_PACKED{
union {
struct TU_ATTR_PACKED {