feat: add build option for usb-c version
This commit is contained in:
6
Makefile
6
Makefile
@@ -9,6 +9,8 @@ TARGET = badgemagic-ch582
|
|||||||
######################################
|
######################################
|
||||||
# Uncomment below line to enable debugging
|
# Uncomment below line to enable debugging
|
||||||
# DEBUG = 1
|
# DEBUG = 1
|
||||||
|
# Uncomment below to build for USB-C version
|
||||||
|
# USBC_VERSION = 1
|
||||||
# optimization for size
|
# optimization for size
|
||||||
OPT = -Os
|
OPT = -Os
|
||||||
|
|
||||||
@@ -120,6 +122,10 @@ ifeq ($(DEBUG), 1)
|
|||||||
CFLAGS += -g -gdwarf-2 -DDEBUG=$(DEBUG)
|
CFLAGS += -g -gdwarf-2 -DDEBUG=$(DEBUG)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(USBC_VERSION), 1)
|
||||||
|
CFLAGS += -DUSBC_VERSION=$(USBC_VERSION)
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Generate dependency information
|
# Generate dependency information
|
||||||
CFLAGS += -MMD -MP
|
CFLAGS += -MMD -MP
|
||||||
|
|||||||
@@ -88,7 +88,11 @@ static const pinctrl_t led_pins[LED_PINCOUNT] = {
|
|||||||
PINCTRL(B, 4), // Q
|
PINCTRL(B, 4), // Q
|
||||||
PINCTRL(B, 2), // R
|
PINCTRL(B, 2), // R
|
||||||
PINCTRL(B, 1), // S
|
PINCTRL(B, 1), // S
|
||||||
|
#ifdef USBC_VERSION
|
||||||
|
PINCTRL(B, 6), // T
|
||||||
|
#else
|
||||||
PINCTRL(B, 23), // T
|
PINCTRL(B, 23), // T
|
||||||
|
#endif
|
||||||
PINCTRL(B, 21), // U
|
PINCTRL(B, 21), // U
|
||||||
PINCTRL(B, 20), // V
|
PINCTRL(B, 20), // V
|
||||||
PINCTRL(B, 19), // W
|
PINCTRL(B, 19), // W
|
||||||
|
|||||||
Reference in New Issue
Block a user