Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ TARGET = badgemagic-ch582
# DEBUG = 1
# Uncomment below to build for USB-C version
# USBC_VERSION = 1

LED_REFRESH_RATE = 2000 # Hz

# optimization for size
OPT = -Os

Expand Down Expand Up @@ -142,6 +145,7 @@ CFLAGS += -DUSBC_VERSION=$(USBC_VERSION)
endif

CFLAGS += -DVERSION='"$(VERSION)"' -DVERSION_ABBR='"$(VERSION_ABBR)"'
CFLAGS += -DLED_REFRESH_RATE='$(LED_REFRESH_RATE)'

# Generate dependency information
CFLAGS += -MMD -MP
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ int main()
usb_start();

led_init();
TMR0_TimerInit((FREQ_SYS / 2000) / 2);
TMR0_TimerInit((FREQ_SYS / LED_REFRESH_RATE) / 2);
TMR0_ITCfg(ENABLE, TMR0_3_IT_CYC_END);
PFIC_EnableIRQ(TMR0_IRQn);

Expand Down
Loading