Skip to content

Commit

Permalink
per-board pinout
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Sep 7, 2024
1 parent 8fbbcd1 commit ac70231
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions board.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp \
$(BOARD_DIR)/firmware/pinouts.cpp \
$(BOARD_DIR)/default_tune.cpp \


Expand Down
21 changes: 21 additions & 0 deletions firmware/pinouts.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "pch.h"

static void setBoard_04_pinout() {
engineConfiguration->injectionPins[0] = Gpio::D8;
engineConfiguration->injectionPins[1] = Gpio::D9;
engineConfiguration->injectionPins[2] = Gpio::D10;
engineConfiguration->injectionPins[3] = Gpio::D11;
}

static void setBoard_ua4c_pinout() {
engineConfiguration->injectionPins[0] = Gpio::D8;
engineConfiguration->injectionPins[0] = Gpio::B15;
}

/*PUBLIC_API_WEAK*/ void boardTsAction(uint16_t index) {
if (index == 0) {
setBoard_04_pinout();
} else if (index == 1) {
setBoard_ua4c_pinout();
}
}

0 comments on commit ac70231

Please sign in to comment.