Brain pin is enum class (#4108)

* change most usages to Gpio::

* board configs

* engine configs etc

* isBrainPinValid, smart gpio

* generator

* generator

* generator

* connector yamls

* kinetis enums

* cypress txt

* kinetis config

* frankenso

* config generator

* actually do it for the others

* disable skips for pr ci

* fix tle8888

* misc

* weird cast from int

* needs this operator too

* this can be an unsigned subtract

* happy tests

* s

* kinetis isConfigurationChanged weirdness

* missed J/K

* cypress efifeatures

* build script mistake (!)

* mistake in smart gpio

* debounce

* eg33

* kinetis, so needy

* it's pretty green, we can skip these again
This commit is contained in:
Matthew Kennedy 2022-04-28 14:32:39 -07:00 committed by GitHub
parent 0800b81875
commit e4a0979dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
183 changed files with 3127 additions and 3139 deletions

View File

@ -3,7 +3,7 @@ echo "Compiling for https://rusefi.com/forum/viewtopic.php?f=4&t=1489"
cd ../.. cd ../..
rem TODO: somehow this -DDUMMY is helping us to not mess up the parameters, why?! rem TODO: somehow this -DDUMMY is helping us to not mess up the parameters, why?!
rem https://github.com/rusefi/rusefi/issues/684 rem https://github.com/rusefi/rusefi/issues/684
set EXTRA_PARAMS="-DDUMMY -DEFI_COMMUNICATION_PIN=GPIOA_7" set EXTRA_PARAMS="-DDUMMY -DEFI_COMMUNICATION_PIN=Gpio::A7"
make -j8 clean make -j8 clean
call config/boards/common_make.bat call config/boards/common_make.bat

View File

@ -5,7 +5,7 @@ rem TODO: somehow this -DDUMMY is helping us to not mess up the parameters, why?
rem https://github.com/rusefi/rusefi/issues/684 rem https://github.com/rusefi/rusefi/issues/684
rem this board has only 512K flash so using custom FLASH_ADDR rem this board has only 512K flash so using custom FLASH_ADDR
rem You probably want "flash0 : org = 0x08000000, len = 450K" in the .ld file rem You probably want "flash0 : org = 0x08000000, len = 450K" in the .ld file
set EXTRA_PARAMS=-DDUMMY -DEFI_COMMUNICATION_PIN=GPIOB_9 -DSTM32_RTCPRE_VALUE=25 ^ set EXTRA_PARAMS=-DDUMMY -DEFI_COMMUNICATION_PIN=Gpio::B9 -DSTM32_RTCPRE_VALUE=25 ^
-DEFI_INTERNAL_FLASH=FALSE ^ -DEFI_INTERNAL_FLASH=FALSE ^
-DHAL_USE_RTC=FALSE ^ -DHAL_USE_RTC=FALSE ^
-DBOARD_OTG_NOVBUSSENS ^ -DBOARD_OTG_NOVBUSSENS ^

View File

@ -3,7 +3,7 @@ BOARDCPPSRC = $(PROJECT_DIR)/config/boards/atlas/board_configuration.cpp
BOARDINC = $(PROJECT_DIR)/config/boards/atlas BOARDINC = $(PROJECT_DIR)/config/boards/atlas
#DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3 #DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
DDEFS += -DFIRMWARE_ID=\"atlas\" DDEFS += -DFIRMWARE_ID=\"atlas\"
# This stuff doesn't work on H7 yet # This stuff doesn't work on H7 yet

View File

@ -19,10 +19,10 @@
#define EFI_USB_AF 10U #define EFI_USB_AF 10U
#undef EFI_USB_SERIAL_DM #undef EFI_USB_SERIAL_DM
#define EFI_USB_SERIAL_DM GPIOA_11 #define EFI_USB_SERIAL_DM Gpio::A11
#undef EFI_USB_SERIAL_DP #undef EFI_USB_SERIAL_DP
#define EFI_USB_SERIAL_DP GPIOA_12 #define EFI_USB_SERIAL_DP Gpio::A12
#undef STM32_SERIAL_USE_USART1 #undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART1 FALSE
@ -34,10 +34,10 @@
#define TS_PRIMARY_PORT UARTD1 #define TS_PRIMARY_PORT UARTD1
#undef EFI_CONSOLE_TX_BRAIN_PIN #undef EFI_CONSOLE_TX_BRAIN_PIN
#define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_9 #define EFI_CONSOLE_TX_BRAIN_PIN Gpio::A9
#undef EFI_CONSOLE_RX_BRAIN_PIN #undef EFI_CONSOLE_RX_BRAIN_PIN
#define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_10 #define EFI_CONSOLE_RX_BRAIN_PIN Gpio::A10
#undef EFI_USE_OSC #undef EFI_USE_OSC
#define EFI_USE_OSC TRUE #define EFI_USE_OSC TRUE
@ -67,7 +67,7 @@
#define HAL_VSS_USE_PAL TRUE #define HAL_VSS_USE_PAL TRUE
#undef LED_CRITICAL_ERROR_BRAIN_PIN #undef LED_CRITICAL_ERROR_BRAIN_PIN
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOG_11 #define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::G11
// Ignore USB VBUS pin (we're never a host, only a device) // Ignore USB VBUS pin (we're never a host, only a device)
#define BOARD_OTG_NOVBUSSENS TRUE #define BOARD_OTG_NOVBUSSENS TRUE

View File

@ -11,27 +11,27 @@
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->injectionPins[0] = GPIOF_13; engineConfiguration->injectionPins[0] = Gpio::F13;
engineConfiguration->injectionPins[1] = GPIOF_14; engineConfiguration->injectionPins[1] = Gpio::F14;
engineConfiguration->injectionPins[2] = GPIOD_8; engineConfiguration->injectionPins[2] = Gpio::D8;
engineConfiguration->injectionPins[3] = GPIOD_9; engineConfiguration->injectionPins[3] = Gpio::D9;
engineConfiguration->injectionPins[4] = GPIOD_10; engineConfiguration->injectionPins[4] = Gpio::D10;
engineConfiguration->injectionPins[5] = GPIOD_11; engineConfiguration->injectionPins[5] = Gpio::D11;
engineConfiguration->injectionPins[6] = GPIOD_12; engineConfiguration->injectionPins[6] = Gpio::D12;
engineConfiguration->injectionPins[7] = GPIOD_13; engineConfiguration->injectionPins[7] = Gpio::D13;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
engineConfiguration->ignitionPins[0] = GPIOE_15; engineConfiguration->ignitionPins[0] = Gpio::E15;
engineConfiguration->ignitionPins[1] = GPIOE_14; engineConfiguration->ignitionPins[1] = Gpio::E14;
engineConfiguration->ignitionPins[2] = GPIOE_13; engineConfiguration->ignitionPins[2] = Gpio::E13;
engineConfiguration->ignitionPins[3] = GPIOE_12; engineConfiguration->ignitionPins[3] = Gpio::E12;
engineConfiguration->ignitionPins[4] = GPIOE_11; engineConfiguration->ignitionPins[4] = Gpio::E11;
engineConfiguration->ignitionPins[5] = GPIOF_15; engineConfiguration->ignitionPins[5] = Gpio::F15;
engineConfiguration->ignitionPins[6] = GPIOG_0; engineConfiguration->ignitionPins[6] = Gpio::G0;
engineConfiguration->ignitionPins[7] = GPIOG_1; engineConfiguration->ignitionPins[7] = Gpio::G1;
} }
@ -47,23 +47,23 @@ static void setEtbConfig() {
// Throttle #1 // Throttle #1
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = GPIOB_8; engineConfiguration->etbIo[0].controlPin = Gpio::B8;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = GPIOB_9; engineConfiguration->etbIo[0].directionPin1 = Gpio::B9;
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = GPIOB_7; engineConfiguration->etbIo[0].disablePin = Gpio::B7;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
// Throttle #2 // Throttle #2
// PWM pin // PWM pin
engineConfiguration->etbIo[1].controlPin = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].controlPin = Gpio::Unassigned;
// DIR pin // DIR pin
engineConfiguration->etbIo[1].directionPin1 = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].directionPin1 = Gpio::Unassigned;
// Disable pin // Disable pin
engineConfiguration->etbIo[1].disablePin = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
// Unused // Unused
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
// we only have pwm/dir, no dira/dirb // we only have pwm/dir, no dira/dirb
engineConfiguration->etb_use_two_wires = false; engineConfiguration->etb_use_two_wires = false;
@ -83,9 +83,9 @@ static void setupVbatt() {
} }
static void setStepperConfig() { static void setStepperConfig() {
engineConfiguration->idle.stepperDirectionPin = GPIOF_7; engineConfiguration->idle.stepperDirectionPin = Gpio::F7;
engineConfiguration->idle.stepperStepPin = GPIOF_8; engineConfiguration->idle.stepperStepPin = Gpio::F8;
engineConfiguration->stepperEnablePin = GPIOF_9; engineConfiguration->stepperEnablePin = Gpio::F9;
} }
void setBoardConfigOverrides() { void setBoardConfigOverrides() {
@ -94,20 +94,20 @@ void setBoardConfigOverrides() {
setStepperConfig(); setStepperConfig();
// PE3 is error LED, configured in board.mk // PE3 is error LED, configured in board.mk
engineConfiguration->communicationLedPin = GPIOG_12; engineConfiguration->communicationLedPin = Gpio::G12;
engineConfiguration->runningLedPin = GPIOG_9; engineConfiguration->runningLedPin = Gpio::G9;
engineConfiguration->warningLedPin = GPIOG_10; engineConfiguration->warningLedPin = Gpio::G10;
engineConfiguration->clt.config.bias_resistor = 2490; engineConfiguration->clt.config.bias_resistor = 2490;
engineConfiguration->iat.config.bias_resistor = 2490; engineConfiguration->iat.config.bias_resistor = 2490;
//CAN 1 bus overwrites //CAN 1 bus overwrites
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
//CAN 2 bus overwrites //CAN 2 bus overwrites
engineConfiguration->can2RxPin = GPIOB_5; engineConfiguration->can2RxPin = Gpio::B5;
engineConfiguration->can2TxPin = GPIOB_6; engineConfiguration->can2TxPin = Gpio::B6;
} }
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
@ -117,8 +117,8 @@ static void setupDefaultSensorInputs() {
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE; engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
engineConfiguration->lps25BaroSensorScl = GPIOB_10; engineConfiguration->lps25BaroSensorScl = Gpio::B10;
engineConfiguration->lps25BaroSensorSda = GPIOB_11; engineConfiguration->lps25BaroSensorSda = Gpio::B11;
} }

View File

@ -1,56 +1,56 @@
pins: pins:
# Grey A line # Grey A line
- pin: Grey A1 - pin: Grey A1
id: GPIOF_13 id: F13
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
ts_name: Grey A1 - Injector 1 ts_name: Grey A1 - Injector 1
- pin: Grey A2 - pin: Grey A2
id: GPIOF_14 id: F14
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
ts_name: Grey A2 - Injector 2 ts_name: Grey A2 - Injector 2
- pin: Grey A3 - pin: Grey A3
id: GPIOD_8 id: D8
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
ts_name: Grey A3 - Injector 3 ts_name: Grey A3 - Injector 3
- pin: Grey A4 - pin: Grey A4
id: GPIOD_9 id: D9
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
ts_name: Grey A4 - Injector 4 ts_name: Grey A4 - Injector 4
- pin: Grey A5 - pin: Grey A5
id: GPIOD_10 id: D10
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
ts_name: Grey A5 - Injector 5 ts_name: Grey A5 - Injector 5
- pin: Grey A6 - pin: Grey A6
id: GPIOD_11 id: D11
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
ts_name: Grey A6 - Injector 6 ts_name: Grey A6 - Injector 6
- pin: Grey A7 - pin: Grey A7
id: GPIOD_12 id: D12
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
ts_name: Grey A7 - Injector 7 ts_name: Grey A7 - Injector 7
- pin: Grey A8 - pin: Grey A8
id: GPIOD_13 id: D13
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: inj type: inj
@ -59,56 +59,56 @@ pins:
# Grey B line # Grey B line
- pin: Grey B1 - pin: Grey B1
id: GPIOE_15 id: E15
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
ts_name: Grey B1 - Ignition 1 ts_name: Grey B1 - Ignition 1
- pin: Grey B2 - pin: Grey B2
id: GPIOE_14 id: E14
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
ts_name: Grey B2 - Ignition 2 ts_name: Grey B2 - Ignition 2
- pin: Grey B3 - pin: Grey B3
id: GPIOE_13 id: E13
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
ts_name: Grey B3 - Ignition 3 ts_name: Grey B3 - Ignition 3
- pin: Grey B4 - pin: Grey B4
id: GPIOE_12 id: E12
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
ts_name: Grey B4 - Ignition 4 ts_name: Grey B4 - Ignition 4
- pin: Grey B5 - pin: Grey B5
id: GPIOE_11 id: E11
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
ts_name: Grey B5 - Ignition 5 ts_name: Grey B5 - Ignition 5
- pin: Grey B6 - pin: Grey B6
id: GPIOF_15 id: F15
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
ts_name: Grey B6 - Ignition 6 ts_name: Grey B6 - Ignition 6
- pin: Grey B7 - pin: Grey B7
id: GPIOG_0 id: G0
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
ts_name: Grey B7 - Ignition 7 ts_name: Grey B7 - Ignition 7
- pin: Grey B8 - pin: Grey B8
id: GPIOG_1 id: G1
class: outputs class: outputs
function: High Side Output function: High Side Output
type: ign type: ign
@ -159,7 +159,7 @@ pins:
ts_name: Grey C7 - Analog Sensor Input ts_name: Grey C7 - Analog Sensor Input
- pin: Grey C8 - pin: Grey C8
id: GPIOD_14 id: D14
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: ls type: ls
@ -168,49 +168,49 @@ pins:
# Black A line # Black A line
- pin: Black A1 - pin: Black A1
id: GPIOG_3 id: G3
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: ls type: ls
ts_name: Black A1 - Low Side Output ts_name: Black A1 - Low Side Output
- pin: Black A2 - pin: Black A2
id: GPIOG_4 id: G4
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: ls type: ls
ts_name: Black A2 - Low Side Output ts_name: Black A2 - Low Side Output
- pin: Black A3 - pin: Black A3
id: GPIOG_5 id: G5
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: ls type: ls
ts_name: Black A3 - Low Side Output ts_name: Black A3 - Low Side Output
- pin: Black A4 - pin: Black A4
id: GPIOG_6 id: G6
class: outputs class: outputs
function: Low Side Output / DBW_OUT+ function: Low Side Output / DBW_OUT+
type: ls type: ls
ts_name: Black A4 - Low Side Output / DBW_OUT+ ts_name: Black A4 - Low Side Output / DBW_OUT+
- pin: Black A5 - pin: Black A5
id: GPIOG_7 id: G7
class: outputs class: outputs
function: Low Side Output / DBW_OUT- function: Low Side Output / DBW_OUT-
type: ls type: ls
ts_name: Black A5 - Low Side Output / DBW_OUT- ts_name: Black A5 - Low Side Output / DBW_OUT-
- pin: Black A6 - pin: Black A6
id: GPIOC_13 id: C13
class: switch_inputs class: switch_inputs
function: LSU1_IA / Digital Input function: LSU1_IA / Digital Input
type: hall type: hall
ts_name: Black A6 - LSU4.9 PIN 5 / Digital Input 8 ts_name: Black A6 - LSU4.9 PIN 5 / Digital Input 8
- pin: Black A7 - pin: Black A7
id: GPIOF_1 id: F1
class: switch_inputs class: switch_inputs
function: LSU1_VGND / Digital Input function: LSU1_VGND / Digital Input
type: hall type: hall
@ -224,28 +224,28 @@ pins:
# Black B line # Black B line
- pin: Black B1 - pin: Black B1
id: GPIOG_2 id: G2
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: ls type: ls
ts_name: Black B1 - Low Side Output ts_name: Black B1 - Low Side Output
- pin: Black B2 - pin: Black B2
id: GPIOF_5 id: F5
class: switch_inputs class: switch_inputs
function: Digital Input function: Digital Input
type: hall type: hall
ts_name: Black B2 - Digital Input 1 ts_name: Black B2 - Digital Input 1
- pin: Black B3 - pin: Black B3
id: GPIOF_4 id: F4
class: switch_inputs class: switch_inputs
function: Digital Input function: Digital Input
type: hall type: hall
ts_name: Black B3 - Digital Input 2 ts_name: Black B3 - Digital Input 2
- pin: Black B4 - pin: Black B4
id: GPIOF_3 id: F3
class: switch_inputs class: switch_inputs
function: Digital Input function: Digital Input
type: hall type: hall
@ -258,14 +258,14 @@ pins:
ts_name: Black B5 - Analog Sensor Input / Knock 2 ts_name: Black B5 - Analog Sensor Input / Knock 2
- pin: Black B6 - pin: Black B6
id: GPIOE_6 id: E6
class: switch_inputs class: switch_inputs
function: LSU1_NERMEST / Digital Input function: LSU1_NERMEST / Digital Input
type: hall type: hall
ts_name: Black B6 - LSU4.9 PIN 6 / Digital Input 7 ts_name: Black B6 - LSU4.9 PIN 6 / Digital Input 7
- pin: Black B7 - pin: Black B7
id: GPIOF_0 id: F0
class: switch_inputs class: switch_inputs
function: LSU1_IP / Digital Input function: LSU1_IP / Digital Input
type: hall type: hall
@ -278,14 +278,14 @@ pins:
# Black C line # Black C line
- pin: Black C1 - pin: Black C1
id: GPIOD_15 id: D15
class: outputs class: outputs
function: Low Side Output function: Low Side Output
type: ls type: ls
ts_name: Black C1 - Low Side Output ts_name: Black C1 - Low Side Output
- pin: Black C2 - pin: Black C2
id: [GPIOE_2, GPIOE_2] id: [E2, E2]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Camshaft Sensor (VR+/Hall) function: Camshaft Sensor (VR+/Hall)
type: hall type: hall
@ -304,7 +304,7 @@ pins:
ts_name: Crank Sensor VR- ts_name: Crank Sensor VR-
- pin: Black C5 - pin: Black C5
id: [GPIOE_3, GPIOE_3] id: [E3, E3]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Crank Sensor (VR+/Hall) function: Crank Sensor (VR+/Hall)
type: hall type: hall

View File

@ -40,9 +40,9 @@
* USB settings * USB settings
*/ */
#define EFI_USB_AF 12U #define EFI_USB_AF 12U
//#define EFI_USB_SERIAL_ID GPIOA_10 //#define EFI_USB_SERIAL_ID Gpio::A10
#define EFI_USB_SERIAL_DM GPIOB_14 #define EFI_USB_SERIAL_DM Gpio::B14
#define EFI_USB_SERIAL_DP GPIOB_15 #define EFI_USB_SERIAL_DP Gpio::B15
/* /*
* Board oscillators-related settings. * Board oscillators-related settings.

View File

@ -14,7 +14,7 @@ IS_STM32F429 = yes
EFI_HAS_EXT_SDRAM = yes EFI_HAS_EXT_SDRAM = yes
#LED #LED
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOG_14 DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::G14
DDEFS += -DSTM32_FSMC_USE_FSMC1=TRUE -DSTM32_SDRAM_USE_SDRAM2=TRUE DDEFS += -DSTM32_FSMC_USE_FSMC1=TRUE -DSTM32_SDRAM_USE_SDRAM2=TRUE

View File

@ -17,7 +17,7 @@ void boardInit(void)
* @todo Add your board-specific code, if any. * @todo Add your board-specific code, if any.
*/ */
void setBoardDefaultConfiguration() { void setBoardDefaultConfiguration() {
engineConfiguration->communicationLedPin = GPIO_UNASSIGNED; engineConfiguration->communicationLedPin = Gpio::Unassigned;
engineConfiguration->runningLedPin = GPIOG_13; /* LD3 - green */ engineConfiguration->runningLedPin = Gpio::G13; /* LD3 - green */
engineConfiguration->warningLedPin = GPIO_UNASSIGNED; engineConfiguration->warningLedPin = Gpio::Unassigned;
} }

View File

@ -4,49 +4,49 @@ pins:
- pin: 6 - pin: 6
id: GPIOC_9 id: C9
class: outputs class: outputs
function: Ignition Coil #1 function: Ignition Coil #1
ts_name: Coil 1F ts_name: Coil 1F
- pin: 7 - pin: 7
id: GPIOE_14 id: E14
class: outputs class: outputs
function: Ignition Coil #3 function: Ignition Coil #3
ts_name: Coil 1G ts_name: Coil 1G
- pin: 8 - pin: 8
id: GPIOC_7 id: C7
class: outputs class: outputs
function: Ignition Coil #2 function: Ignition Coil #2
ts_name: Coil 1H ts_name: Coil 1H
- pin: 9 - pin: 9
id: GPIOE_10 id: E10
class: outputs class: outputs
function: Spare High #5 function: Spare High #5
ts_name: Coil 1I ts_name: Coil 1I
- pin: 12 - pin: 12
id: GPIOE_8 id: E8
class: outputs class: outputs
function: Spare High #6 function: Spare High #6
ts_name: Coil 1L ts_name: Coil 1L
- pin: 13 - pin: 13
id: GPIOE_12 id: E12
class: outputs class: outputs
function: Ignition Coil #4 function: Ignition Coil #4
ts_name: Coil 1M ts_name: Coil 1M
- pin: 15 - pin: 15
id: GPIOD_8 id: D8
class: outputs class: outputs
function: Spare High #8 function: Spare High #8
ts_name: Coil 1O ts_name: Coil 1O
- pin: 16 - pin: 16
id: GPIOD_9 id: D9
class: outputs class: outputs
function: Spare High #7 function: Spare High #7
ts_name: Coil 1P ts_name: Coil 1P
@ -76,25 +76,25 @@ pins:
function: CAN low function: CAN low
- pin: 35 - pin: 35
id: GPIOC_13 id: C13
class: outputs class: outputs
ts_name: Injector 2M ts_name: Injector 2M
function: Idle Valve Control Solenoid function: Idle Valve Control Solenoid
- pin: 36 - pin: 36
id: GPIOD_7 id: D7
class: outputs class: outputs
ts_name: Injector 2N ts_name: Injector 2N
function: Main Relay function: Main Relay
- pin: 37 - pin: 37
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: Injector 2O ts_name: Injector 2O
function: Coolant Fan Relay function: Coolant Fan Relay
- pin: 38 - pin: 38
id: GPIOE_6 id: E6
class: outputs class: outputs
ts_name: Injector 2P ts_name: Injector 2P
function: Spare low #2 function: Spare low #2
@ -176,49 +176,49 @@ pins:
function: Coolant Temp Sensor function: Coolant Temp Sensor
- pin: 57 - pin: 57
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: Injector 3S ts_name: Injector 3S
function: Spare low #1 function: Spare low #1
- pin: 58 - pin: 58
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: Injector 3T ts_name: Injector 3T
function: Fuel Pump Relay function: Fuel Pump Relay
- pin: 59 - pin: 59
id: GPIOD_3 id: D3
class: outputs class: outputs
ts_name: Injector 3U ts_name: Injector 3U
function: Spare low function: Spare low
- pin: 60 - pin: 60
id: GPIOE_2 id: E2
class: outputs class: outputs
ts_name: Injector 3V ts_name: Injector 3V
function: Injector #2 function: Injector #2
- pin: 61 - pin: 61
id: GPIOB_9 id: B9
class: outputs class: outputs
ts_name: Injector 3W ts_name: Injector 3W
function: Injector #1 function: Injector #1
- pin: 62 - pin: 62
id: GPIOD_5 id: D5
class: outputs class: outputs
ts_name: Injector 3X ts_name: Injector 3X
function: Spare low function: Spare low
- pin: 63 - pin: 63
id: GPIOB_8 id: B8
class: outputs class: outputs
ts_name: Injector 3Y ts_name: Injector 3Y
function: Injector #3 function: Injector #3
- pin: 64 - pin: 64
id: GPIOB_7 id: B7
class: outputs class: outputs
ts_name: Injector 3Z ts_name: Injector 3Z
function: Injector #4 function: Injector #4

View File

@ -25,31 +25,31 @@ static OutputPin alphaCamPullDown;
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = H144_LS_1; engineConfiguration->injectionPins[0] = H144_LS_1;
engineConfiguration->injectionPins[1] = H144_LS_2; engineConfiguration->injectionPins[1] = H144_LS_2;
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[2] = Gpio::Unassigned;
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[3] = Gpio::Unassigned;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->clutchDownPin = GPIO_UNASSIGNED; engineConfiguration->clutchDownPin = Gpio::Unassigned;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED; engineConfiguration->malfunctionIndicatorPin = Gpio::Unassigned;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = H144_IGN_1; engineConfiguration->ignitionPins[0] = H144_IGN_1;
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
engineConfiguration->ignitionPins[2] = H144_IGN_2; engineConfiguration->ignitionPins[2] = H144_IGN_2;
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -72,8 +72,8 @@ static void setupDefaultSensorInputs() {
// trigger inputs, hall // trigger inputs, hall
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK; engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[1] = H144_IN_CAM; engineConfiguration->triggerInputPins[1] = H144_IN_CAM;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; engineConfiguration->camInputs[0] = Gpio::Unassigned;
engineConfiguration->tps1_1AdcChannel = H144_IN_TPS; engineConfiguration->tps1_1AdcChannel = H144_IN_TPS;
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE; engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
@ -123,8 +123,8 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
} }
/** /**
@ -140,10 +140,10 @@ void setBoardDefaultConfiguration() {
engineConfiguration->boardUseTempPullUp = true; engineConfiguration->boardUseTempPullUp = true;
engineConfiguration->acSwitch = GPIO_UNASSIGNED; engineConfiguration->acSwitch = Gpio::Unassigned;
engineConfiguration->fuelPumpPin = H144_OUT_PWM2; engineConfiguration->fuelPumpPin = H144_OUT_PWM2;
engineConfiguration->fanPin = H144_OUT_PWM4; engineConfiguration->fanPin = H144_OUT_PWM4;
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED; engineConfiguration->mainRelayPin = Gpio::Unassigned;
engineConfiguration->tachOutputPin = H144_OUT_PWM3; engineConfiguration->tachOutputPin = H144_OUT_PWM3;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
@ -159,7 +159,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->clutchDownPin = H144_IN_D_2; engineConfiguration->clutchDownPin = H144_IN_D_2;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
setHellenDefaultVrThresholds(); setHellenDefaultVrThresholds();
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6; engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6;
} }

View File

@ -16,7 +16,7 @@ pins:
- pin: A3 - pin: A3
# H144_OUT_PWM2 # H144_OUT_PWM2
id: GPIOC_6 id: C6
class: outputs class: outputs
function: Fuel Pump Relay Output (low) function: Fuel Pump Relay Output (low)
type: ls type: ls
@ -25,7 +25,7 @@ pins:
- pin: A4 - pin: A4
# H144_OUT_PWM3 # H144_OUT_PWM3
id: GPIOC_7 id: C7
class: outputs class: outputs
function: Tachometer Output function: Tachometer Output
ts_name: A4 - Tachometer ts_name: A4 - Tachometer
@ -38,7 +38,7 @@ pins:
- pin: A6 - pin: A6
# H144_IGN_1 # H144_IGN_1
id: GPIOC_13 id: C13
class: outputs class: outputs
function: Smart Ignition A Output function: Smart Ignition A Output
type: ign type: ign
@ -47,7 +47,7 @@ pins:
- pin: A7 - pin: A7
# H144_IGN_2 # H144_IGN_2
id: GPIOE_5 id: E5
class: outputs class: outputs
function: Smart Ignition B Output function: Smart Ignition B Output
type: ign type: ign
@ -56,7 +56,7 @@ pins:
- pin: A8 - pin: A8
# H144_LS_1 # H144_LS_1
id: GPIOG_7 id: G7
function: Injector A Output function: Injector A Output
class: outputs class: outputs
type: inj type: inj
@ -123,7 +123,7 @@ pins:
- pin: B8 - pin: B8
# H144_LS_2 # H144_LS_2
id: GPIOG_8 id: G8
function: Injector B Output function: Injector B Output
class: outputs class: outputs
type: inj type: inj
@ -132,7 +132,7 @@ pins:
- pin: C1 - pin: C1
# H144_OUT_PWM4 # H144_OUT_PWM4
id: GPIOC_8 id: C8
class: outputs class: outputs
function: Fan Relay or 5A Power Output (low) function: Fan Relay or 5A Power Output (low)
type: ls type: ls
@ -141,7 +141,7 @@ pins:
- pin: C2 - pin: C2
# H144_IN_D_3 # H144_IN_D_3
id: [GPIOE_14, GPIOE_14] id: [E14, E14]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Crank Sensor - function: Crank Sensor -
type: hall type: hall
@ -150,7 +150,7 @@ pins:
- pin: C3 - pin: C3
# H144_IN_D_1 # H144_IN_D_1
id: [GPIOE_12, GPIOE_12] id: [E12, E12]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Crank Sensor + function: Crank Sensor +
type: hall type: hall
@ -159,7 +159,7 @@ pins:
- pin: C2C3 - pin: C2C3
# H144_IN_CRANK # H144_IN_CRANK
id: GPIOB_1 id: B1
class: event_inputs class: event_inputs
function: Crank Sensor (VR) function: Crank Sensor (VR)
type: hall type: hall
@ -168,7 +168,7 @@ pins:
- pin: C4 - pin: C4
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: switch_inputs class: switch_inputs
function: 2Step Digital Input function: 2Step Digital Input
type: hall type: hall
@ -187,7 +187,7 @@ pins:
- pin: C7 - pin: C7
# H144_IN_CAM # H144_IN_CAM
id: [GPIOA_6, GPIOA_6, EFI_ADC_6] id: [A6, A6, EFI_ADC_6]
class: [event_inputs, switch_inputs, analog_inputs] class: [event_inputs, switch_inputs, analog_inputs]
function: Camshaft HALL Sensor or Generic Digital Input function: Camshaft HALL Sensor or Generic Digital Input
type: hall type: hall
@ -196,7 +196,7 @@ pins:
- pin: C8 - pin: C8
# H144_OUT_PWM1 # H144_OUT_PWM1
id: GPIOD_13 id: D13
class: outputs class: outputs
function: Idle Output (low) function: Idle Output (low)
type: ls type: ls

View File

@ -35,15 +35,15 @@ static void setInjectorPins() {
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->clutchDownPin = GPIO_UNASSIGNED; engineConfiguration->clutchDownPin = Gpio::Unassigned;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED; engineConfiguration->malfunctionIndicatorPin = Gpio::Unassigned;
} }
static void setupEtb() { static void setupEtb() {
@ -60,7 +60,7 @@ static void setupEtb() {
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = H144_GP2; engineConfiguration->etbIo[0].disablePin = H144_GP2;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
// we only have pwm/dir, no dira/dirb // we only have pwm/dir, no dira/dirb
engineConfiguration->etb_use_two_wires = false; engineConfiguration->etb_use_two_wires = false;
@ -74,7 +74,7 @@ static void setIgnitionPins() {
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -97,8 +97,8 @@ static void setupDefaultSensorInputs() {
// trigger inputs, hall // trigger inputs, hall
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK; engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[1] = H144_IN_CAM; engineConfiguration->triggerInputPins[1] = H144_IN_CAM;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; engineConfiguration->camInputs[0] = Gpio::Unassigned;
engineConfiguration->tps1_1AdcChannel = H144_IN_TPS; engineConfiguration->tps1_1AdcChannel = H144_IN_TPS;
engineConfiguration->tps1_2AdcChannel = H144_IN_AUX1; engineConfiguration->tps1_2AdcChannel = H144_IN_AUX1;
@ -163,8 +163,8 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
} }
/** /**
@ -183,7 +183,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->boardUseTempPullUp = true; engineConfiguration->boardUseTempPullUp = true;
engineConfiguration->acSwitch = GPIO_UNASSIGNED; engineConfiguration->acSwitch = Gpio::Unassigned;
engineConfiguration->fuelPumpPin = H144_OUT_IO12; engineConfiguration->fuelPumpPin = H144_OUT_IO12;
engineConfiguration->fanPin = H144_OUT_IO11; engineConfiguration->fanPin = H144_OUT_IO11;
engineConfiguration->mainRelayPin = H144_OUT_IO10; engineConfiguration->mainRelayPin = H144_OUT_IO10;
@ -203,7 +203,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->clutchDownPin = H144_IN_D_2; engineConfiguration->clutchDownPin = H144_IN_D_2;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
setHellenDefaultVrThresholds(); setHellenDefaultVrThresholds();
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6; engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6;
engineConfiguration->vrThreshold[1].pin = H144_OUT_PWM4; engineConfiguration->vrThreshold[1].pin = H144_OUT_PWM4;

View File

@ -13,7 +13,7 @@ pins:
- pin: A3 - pin: A3
# H144_OUT_IO12 # H144_OUT_IO12
id: GPIOA_8 id: A8
class: outputs class: outputs
function: Fuel Pump Relay Output (low) function: Fuel Pump Relay Output (low)
type: ls type: ls
@ -22,7 +22,7 @@ pins:
- pin: A4 - pin: A4
# H144_OUT_IO13 # H144_OUT_IO13
id: GPIOG_6 id: G6
class: outputs class: outputs
function: Tachometer Output function: Tachometer Output
ts_name: A4 - Tachometer ts_name: A4 - Tachometer
@ -35,7 +35,7 @@ pins:
- pin: A6 - pin: A6
# H144_IGN_1 # H144_IGN_1
id: GPIOC_13 id: C13
class: outputs class: outputs
function: Smart Ignition 1 function: Smart Ignition 1
type: ign type: ign
@ -44,7 +44,7 @@ pins:
- pin: A7 - pin: A7
# H144_IGN_2 # H144_IGN_2
id: GPIOE_5 id: E5
class: outputs class: outputs
function: Smart Ignition 2 Output function: Smart Ignition 2 Output
type: ign type: ign
@ -53,7 +53,7 @@ pins:
- pin: A8 - pin: A8
# H144_LS_1 # H144_LS_1
id: GPIOG_7 id: G7
function: Injector 1 Output function: Injector 1 Output
class: outputs class: outputs
type: inj type: inj
@ -120,7 +120,7 @@ pins:
- pin: B8 - pin: B8
# H144_LS_2 # H144_LS_2
id: GPIOG_8 id: G8
function: Injector 2 Output function: Injector 2 Output
class: outputs class: outputs
type: inj type: inj
@ -129,7 +129,7 @@ pins:
- pin: C1 - pin: C1
# H144_OUT_IO11 # H144_OUT_IO11
id: GPIOG_2 id: G2
class: outputs class: outputs
function: Fan Relay or 5A Power Output (low) function: Fan Relay or 5A Power Output (low)
type: ls type: ls
@ -138,7 +138,7 @@ pins:
- pin: C2 - pin: C2
# H144_IN_D_3 # H144_IN_D_3
id: [GPIOE_14, GPIOE_14] id: [E14, E14]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Crank Sensor - function: Crank Sensor -
type: hall type: hall
@ -147,7 +147,7 @@ pins:
- pin: C3 - pin: C3
# H144_IN_D_1 # H144_IN_D_1
id: [GPIOE_12, GPIOE_12] id: [E12, E12]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Crank Sensor + function: Crank Sensor +
type: hall type: hall
@ -156,7 +156,7 @@ pins:
- pin: C2C3 - pin: C2C3
# H144_IN_CRANK # H144_IN_CRANK
id: GPIOB_1 id: B1
class: event_inputs class: event_inputs
function: Crank Sensor (VR) function: Crank Sensor (VR)
type: hall type: hall
@ -165,7 +165,7 @@ pins:
- pin: C4 - pin: C4
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: switch_inputs class: switch_inputs
function: 2Step Digital Input function: 2Step Digital Input
type: hall type: hall
@ -184,7 +184,7 @@ pins:
- pin: C7 - pin: C7
# H144_IN_CAM # H144_IN_CAM
id: [GPIOA_6, GPIOA_6, EFI_ADC_6] id: [A6, A6, EFI_ADC_6]
class: [event_inputs, switch_inputs, analog_inputs] class: [event_inputs, switch_inputs, analog_inputs]
function: Camshaft HALL Sensor or Generic Digital Input function: Camshaft HALL Sensor or Generic Digital Input
type: hall type: hall
@ -193,7 +193,7 @@ pins:
- pin: C8 - pin: C8
# H144_OUT_PWM1 # H144_OUT_PWM1
id: GPIOD_13 id: D13
class: outputs class: outputs
function: Idle Output (low) function: Idle Output (low)
type: ls type: ls
@ -202,7 +202,7 @@ pins:
- pin: D1 - pin: D1
# H144_LS_3 # H144_LS_3
id: GPIOD_11 id: D11
function: Injector 3 function: Injector 3
class: outputs class: outputs
type: inj type: inj
@ -211,7 +211,7 @@ pins:
- pin: D2 - pin: D2
# H144_OUT_PWM3 # H144_OUT_PWM3
id: GPIOC_7 id: C7
function: Out Boost function: Out Boost
class: outputs class: outputs
ts_name: D2 - Out Boost ts_name: D2 - Out Boost
@ -219,7 +219,7 @@ pins:
- pin: D3 - pin: D3
# H144_IN_SENS1 # H144_IN_SENS1
id: GPIOF_3 id: F3
class: switch_inputs class: switch_inputs
function: Digital Input 2 function: Digital Input 2
type: hall type: hall
@ -244,7 +244,7 @@ pins:
- pin: D6 - pin: D6
# H144_IGN_3 # H144_IGN_3
id: GPIOE_4 id: E4
class: outputs class: outputs
function: Smart Ignition 3 Output function: Smart Ignition 3 Output
type: ign type: ign
@ -253,7 +253,7 @@ pins:
- pin: D7 - pin: D7
# H144_IGN_4 # H144_IGN_4
id: GPIOE_3 id: E3
class: outputs class: outputs
function: Smart Ignition 4 Output function: Smart Ignition 4 Output
type: ign type: ign
@ -267,7 +267,7 @@ pins:
- pin: E1 - pin: E1
# H144_LS_4 # H144_LS_4
id: GPIOD_10 id: D10
function: Injector 4 function: Injector 4
class: outputs class: outputs
type: inj type: inj
@ -276,7 +276,7 @@ pins:
- pin: E2 - pin: E2
# H144_OUT_IO6 # H144_OUT_IO6
id: GPIOG_11 id: G11
function: Out NOS function: Out NOS
class: outputs class: outputs
ts_name: E2 - Out NOS ts_name: E2 - Out NOS
@ -284,7 +284,7 @@ pins:
- pin: E3 - pin: E3
# H144_IN_SENS2 # H144_IN_SENS2
id: GPIOF_4 id: F4
class: switch_inputs class: switch_inputs
function: Digital Input 3 function: Digital Input 3
type: hall type: hall
@ -293,7 +293,7 @@ pins:
- pin: E4 - pin: E4
# H144_IN_SENS3 # H144_IN_SENS3
id: GPIOF_5 id: F5
class: switch_inputs class: switch_inputs
function: Digital Input 4 function: Digital Input 4
type: hall type: hall
@ -306,7 +306,7 @@ pins:
- pin: E6 - pin: E6
# H144_IN_D_4 # H144_IN_D_4
id: [GPIOE_15, GPIOE_15] id: [E15, E15]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Cam Sensor VR+ as Hall function: Cam Sensor VR+ as Hall
type: hall type: hall
@ -315,7 +315,7 @@ pins:
- pin: E5E6 - pin: E5E6
# H144_IN_RES1 # H144_IN_RES1
id: GPIOF_9 id: F9
class: event_inputs class: event_inputs
function: Cam Sensor (VR) function: Cam Sensor (VR)
type: vr type: vr
@ -324,7 +324,7 @@ pins:
- pin: E7 - pin: E7
# H144_IN_D_AUX4 # H144_IN_D_AUX4
id: GPIOA_7 id: A7
class: event_inputs class: event_inputs
ts_name: E7 - Flex ts_name: E7 - Flex
function: Digital Input / Flex fuel sensor function: Digital Input / Flex fuel sensor
@ -337,7 +337,7 @@ pins:
- pin: F1 - pin: F1
# H144_OUT_PWM5 # H144_OUT_PWM5
id: GPIOC_9 id: C9
class: outputs class: outputs
function: Idle2 Output (low) function: Idle2 Output (low)
type: ls type: ls
@ -346,7 +346,7 @@ pins:
- pin: F2 - pin: F2
# H144_OUT_PWM7 # H144_OUT_PWM7
id: GPIOD_15 id: D15
function: VVT#1 function: VVT#1
class: outputs class: outputs
type: ls type: ls
@ -356,7 +356,7 @@ pins:
# also used as knock input (is hard-coded at the moment) # also used as knock input (is hard-coded at the moment)
- pin: F3 - pin: F3
# H144_IN_SENS4 # H144_IN_SENS4
id: GPIOF_6 id: F6
class: switch_inputs class: switch_inputs
function: Digital Input 5 / Knock Input function: Digital Input 5 / Knock Input
type: hall type: hall
@ -365,7 +365,7 @@ pins:
- pin: F4 - pin: F4
# H144_OUT_PWM8 # H144_OUT_PWM8
id: GPIOD_12 id: D12
function: VVT#2 function: VVT#2
class: outputs class: outputs
type: ls type: ls
@ -374,7 +374,7 @@ pins:
- pin: F5 - pin: F5
# H144_OUT_IO10 # H144_OUT_IO10
id: GPIOG_12 id: G12
class: outputs class: outputs
ts_name: F5 - MAIN ts_name: F5 - MAIN
function: Main relay control function: Main relay control

View File

@ -40,9 +40,9 @@ void setBoardDefaultConfiguration() {
engineConfiguration->idleStepperReactionTime = 10; engineConfiguration->idleStepperReactionTime = 10;
engineConfiguration->stepperDirectionPinMode = OM_INVERTED; engineConfiguration->stepperDirectionPinMode = OM_INVERTED;
engineConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED; engineConfiguration->idle.stepperDirectionPin = Gpio::Unassigned;
engineConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED; engineConfiguration->idle.stepperStepPin = Gpio::Unassigned;
engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED; engineConfiguration->stepperEnablePin = Gpio::Unassigned;
engineConfiguration->useLinearCltSensor = true; engineConfiguration->useLinearCltSensor = true;
// todo: // todo:
@ -64,10 +64,10 @@ void setBoardDefaultConfiguration() {
engineConfiguration->mapMinBufferLength = 4; engineConfiguration->mapMinBufferLength = 4;
engineConfiguration->communicationLedPin = GPIO_UNASSIGNED;//GPIOJ_0; engineConfiguration->communicationLedPin = Gpio::Unassigned;//GPIOJ_0;
engineConfiguration->runningLedPin = GPIO_UNASSIGNED; engineConfiguration->runningLedPin = Gpio::Unassigned;
engineConfiguration->warningLedPin = GPIO_UNASSIGNED; engineConfiguration->warningLedPin = Gpio::Unassigned;
engineConfiguration->triggerErrorPin = GPIO_UNASSIGNED; engineConfiguration->triggerErrorPin = Gpio::Unassigned;
engineConfiguration->map.sensor.hwChannel = EFI_ADC_13; engineConfiguration->map.sensor.hwChannel = EFI_ADC_13;
engineConfiguration->clt.adcChannel = EFI_ADC_26; engineConfiguration->clt.adcChannel = EFI_ADC_26;
@ -94,19 +94,19 @@ void setBoardDefaultConfiguration() {
engineConfiguration->fuelLevelSensor = EFI_ADC_NONE; engineConfiguration->fuelLevelSensor = EFI_ADC_NONE;
engineConfiguration->oilPressure.hwChannel = EFI_ADC_NONE; engineConfiguration->oilPressure.hwChannel = EFI_ADC_NONE;
engineConfiguration->acSwitch = GPIO_UNASSIGNED; engineConfiguration->acSwitch = Gpio::Unassigned;
engineConfiguration->triggerInputPins[0] = GPIOB_0; engineConfiguration->triggerInputPins[0] = Gpio::B0;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
#if 0 #if 0
// todo: // todo:
int i; int i;
for (i = 0; i < MAX_CYLINDER_COUNT; i++) for (i = 0; i < MAX_CYLINDER_COUNT; i++)
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
for (i = 0; i < MAX_CYLINDER_COUNT; i++) for (i = 0; i < MAX_CYLINDER_COUNT; i++)
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
engineConfiguration->adcVcc = 5.0f; engineConfiguration->adcVcc = 5.0f;
engineConfiguration->analogInputDividerCoefficient = 1; engineConfiguration->analogInputDividerCoefficient = 1;
@ -122,10 +122,10 @@ void setBoardDefaultConfiguration() {
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
#if 0 #if 0
engineConfiguration->useSerialPort = true; engineConfiguration->useSerialPort = true;
engineConfiguration->binarySerialTxPin = GPIOC_7; engineConfiguration->binarySerialTxPin = Gpio::C7;
engineConfiguration->binarySerialRxPin = GPIOC_6; engineConfiguration->binarySerialRxPin = Gpio::C6;
engineConfiguration->consoleSerialTxPin = GPIOA_10; engineConfiguration->consoleSerialTxPin = Gpio::A10;
engineConfiguration->consoleSerialRxPin = GPIOA_11; engineConfiguration->consoleSerialRxPin = Gpio::A11;
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED; engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED; engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
#endif #endif

View File

@ -4,7 +4,7 @@
! all these #defines are in priority over the "default" values in rusefi_config.txt ! all these #defines are in priority over the "default" values in rusefi_config.txt
! see firmware/config/boards/hellen/cypress/rusefi_hw_enums.h ! see firmware/config/boards/hellen/cypress/rusefi_hw_enums.h
#define brain_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16" #define Gpio_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16"
! Based on Cypress S6E2Cx pinout (144-pin package) ! Based on Cypress S6E2Cx pinout (144-pin package)
#define brain_input_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16" #define brain_input_pin_e_enum "NONE", "INVALID", "P00 (A_0)", "P01 (A_1)", "P02 (A_2)", "P03 (A_3)", "P04 (A_4)", "P05 (A_5)", "P06 (A_6)", "P07 (A_7)", "P08 (A_8)", "P09 (A_9)", "P0A (A_10)", "P0B (A_11)", "P0C (A_12)", "P0D (A_13)", "P0E (A_14)", "P0F (A_15)", "P10 (B_0)", "P11 (B_1)", "P12 (B_2)", "P13 (B_3)", "P14 (B_4)", "P15 (B_5)", "P16 (B_6)", "P17 (B_7)", "P18 (B_8)", "P19 (B_9)", "P1A (B_10)", "P1B (B_11)", "P1C (B_12)", "P1D (B_13)", "P1E (B_14)", "P1F (B_15)", "P20 (C_0)", "P21 (C_1)", "P22 (C_2)", "P23 (C_3)", "P24 (C_4)", "P25 (C_5)", "P26 (C_6)", "P27 (C_7)", "P28 (C_8)", "P29 (C_9)", "P2A (C_10)", "P2B (C_11)", "P2C (C_12)", "P2D (C_13)", "P2E (C_14)", "P2F (C_15)", "P30 (D_0)", "P31 (D_1)", "P32 (D_2)", "P33 (D_3)", "P34 (D_4)", "P35 (D_5)", "P36 (D_6)", "P37 (D_7)", "P38 (D_8)", "P39 (D_9)", "P3A (D_10)", "P3B (D_11)", "P3C (D_12)", "P3D (D_13)", "P3E (D_14)", "P3F (D_15)", "P40 (E_0)", "P41 (E_1)", "P42 (E_2)", "P43 (E_3)", "P44 (E_4)", "P45 (E_5)", "P46 (E_6)", "P47 (E_7)", "P48 (E_8)", "P49 (E_9)", "P4A (E_10)", "P4B (E_11)", "P4C (E_12)", "P4D (E_13)", "P4E (E_14)", "P4F (E_15)", "P50 (F_0)", "P51 (F_1)", "P52 (F_2)", "P53 (F_3)", "P54 (F_4)", "P55 (F_5)", "P56 (F_6)", "P57 (F_7)", "P58 (F_8)", "P59 (F_9)", "P5A (F_10)", "P5B (F_11)", "P5C (F_12)", "P5D (F_13)", "P5E (F_14)", "P5F (F_15)", "P70 (G_0)", "P71 (G_1)", "P72 (G_2)", "P73 (G_3)", "P74 (G_4)", "P75 (G_5)", "P76 (G_6)", "P77 (G_7)", "P78 (G_8)", "P79 (G_9)", "P7A (G_10)", "P7B (G_11)", "P7C (G_12)", "P7D (G_13)", "P7E (G_14)", "P7F (G_15)", "PA0 (H_0)", "PA1 (H_1)", "PA2 (H_2)", "PA3 (H_3)", "PA4 (H_4)", "PA5 (H_5)", "PA6 (H_6)", "PA7 (H_7)", "PA8 (H_8)", "PA9 (H_9)", "PAA (H_10)", "PAB (H_11)", "PAC (H_12)", "PAD (H_13)", "PAE (H_14)", "PAF (H_15)", "PB0 (I_0)", "PB1 (I_1)", "PB2 (I_2)", "PB3 (I_3)", "PB4 (I_4)", "PB5 (I_5)", "PB6 (I_6)", "PB7 (I_7)", "PB8 (I_8)", "PB9 (I_9)", "PBA (I_10)", "PBB (I_11)", "PBC (I_12)", "PBD (I_13)", "PBE (I_14)", "PBF (I_15)", "PC0 (J_0)", "PC1 (J_1)", "PC2 (J_2)", "PC3 (J_3)", "PC4 (J_4)", "PC5 (J_5)", "PC6 (J_6)", "PC7 (J_7)", "PC8 (J_8)", "PC9 (J_9)", "PCA (J_10)", "PCB (J_11)", "PCC (J_12)", "PCD (J_13)", "PCE (J_14)", "PCF (J_15)", "PF0 (K_0)", "PF1 (K_1)", "PF2 (K_2)", "PF3 (K_3)", "PF4 (K_4)", "PF5 (K_5)", "PF6 (K_6)", "PF7 (K_7)", "PF8 (K_8)", "PF9 (K_9)", "PFA (K_10)", "PFB (K_11)", "PFC (K_12)", "PFD (K_13)", "PFE (K_14)", "PFF (K_15)", "DRV8860_1", "DRV8860_2", "DRV8860_3", "DRV8860_4", "DRV8860_5", "DRV8860_6", "DRV8860_7", "DRV8860_8", "DRV8860_9", "DRV8860_10", "DRV8860_11", "DRV8860_12", "DRV8860_13", "DRV8860_14", "DRV8860_15", "DRV8860_16"

View File

@ -250,11 +250,6 @@
#define EFI_SPI3_AF PAL_MODE_ALTERNATIVE_SPI #define EFI_SPI3_AF PAL_MODE_ALTERNATIVE_SPI
#define EFI_I2C_SCL_BRAIN_PIN GPIOB_6
#define EFI_I2C_SDA_BRAIN_PIN GPIOB_7
#define EFI_I2C_AF 4
/** /**
* Patched version of ChibiOS/RT support extra details in the system error messages * Patched version of ChibiOS/RT support extra details in the system error messages
*/ */
@ -310,11 +305,11 @@
// LED1 = GPIOJ_15 // LED1 = GPIOJ_15
// LED2 = GPIOJ_0 // LED2 = GPIOJ_0
// LED3 = GPIOJ_12 // LED3 = GPIOJ_12
// LED4 = GPIOA_0 // LED4 = Gpio::A0
#define LED_WARNING_BRAIN_PIN GPIOA_0 #define LED_WARNING_BRAIN_PIN Gpio::A0
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOJ_15 #define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::J15
#define LED_ERROR_BRAIN_PIN_MODE INVERTED_OUTPUT #define LED_ERROR_BRAIN_PIN_MODE INVERTED_OUTPUT
#define EFI_WARNING_LED FALSE #define EFI_WARNING_LED FALSE

View File

@ -8,8 +8,6 @@
#pragma once #pragma once
enum class TestCppStyleEnum : uint8_t { };
// todo: migrate/unify with pin_output_mode_e? rename? something is messy here // todo: migrate/unify with pin_output_mode_e? rename? something is messy here
// this enum is currently only used for SPI pins // this enum is currently only used for SPI pins
typedef enum __attribute__ ((__packed__)) { typedef enum __attribute__ ((__packed__)) {
@ -23,196 +21,196 @@ typedef enum __attribute__ ((__packed__)) {
/** /**
* Hardware pin. This enum is platform-specific. * Hardware pin. This enum is platform-specific.
*/ */
typedef enum __attribute__ ((__packed__)) { enum class Gpio : uint8_t {
GPIO_UNASSIGNED = 0, Unassigned = 0,
GPIO_INVALID = 1, Invalid = 1,
GPIOA_0 = 2, A0 = 2,
GPIOA_1 = 3, A1 = 3,
GPIOA_2 = 4, A2 = 4,
GPIOA_3 = 5, A3 = 5,
GPIOA_4 = 6, A4 = 6,
GPIOA_5 = 7, A5 = 7,
GPIOA_6 = 8, A6 = 8,
GPIOA_7 = 9, A7 = 9,
GPIOA_8 = 10, A8 = 10,
GPIOA_9 = 11, A9 = 11,
GPIOA_10 = 12, A10 = 12,
GPIOA_11 = 13, A11 = 13,
GPIOA_12 = 14, A12 = 14,
GPIOA_13 = 15, A13 = 15,
GPIOA_14 = 16, A14 = 16,
GPIOA_15 = 17, A15 = 17,
GPIOB_0 = 18, B0 = 18,
GPIOB_1 = 19, B1 = 19,
GPIOB_2 = 20, B2 = 20,
GPIOB_3 = 21, B3 = 21,
GPIOB_4 = 22, B4 = 22,
GPIOB_5 = 23, B5 = 23,
GPIOB_6 = 24, B6 = 24,
GPIOB_7 = 25, B7 = 25,
GPIOB_8 = 26, B8 = 26,
GPIOB_9 = 27, B9 = 27,
GPIOB_10 = 28, B10 = 28,
GPIOB_11 = 29, B11 = 29,
GPIOB_12 = 30, B12 = 30,
GPIOB_13 = 31, B13 = 31,
GPIOB_14 = 32, B14 = 32,
GPIOB_15 = 33, B15 = 33,
GPIOC_0 = 34, C0 = 34,
GPIOC_1 = 35, C1 = 35,
GPIOC_2 = 36, C2 = 36,
GPIOC_3 = 37, C3 = 37,
GPIOC_4 = 38, C4 = 38,
GPIOC_5 = 39, C5 = 39,
GPIOC_6 = 40, C6 = 40,
GPIOC_7 = 41, C7 = 41,
GPIOC_8 = 42, C8 = 42,
GPIOC_9 = 43, C9 = 43,
GPIOC_10 = 44, C10 = 44,
GPIOC_11 = 45, C11 = 45,
GPIOC_12 = 46, C12 = 46,
GPIOC_13 = 47, C13 = 47,
GPIOC_14 = 48, C14 = 48,
GPIOC_15 = 49, C15 = 49,
GPIOD_0 = 50, D0 = 50,
GPIOD_1 = 51, D1 = 51,
GPIOD_2 = 52, D2 = 52,
GPIOD_3 = 53, D3 = 53,
GPIOD_4 = 54, D4 = 54,
GPIOD_5 = 55, D5 = 55,
GPIOD_6 = 56, D6 = 56,
GPIOD_7 = 57, D7 = 57,
GPIOD_8 = 58, D8 = 58,
GPIOD_9 = 59, D9 = 59,
GPIOD_10 = 60, D10 = 60,
GPIOD_11 = 61, D11 = 61,
GPIOD_12 = 62, D12 = 62,
GPIOD_13 = 63, D13 = 63,
GPIOD_14 = 64, D14 = 64,
GPIOD_15 = 65, D15 = 65,
GPIOE_0 = 66, E0 = 66,
GPIOE_1 = 67, E1 = 67,
GPIOE_2 = 68, E2 = 68,
GPIOE_3 = 69, E3 = 69,
GPIOE_4 = 70, E4 = 70,
GPIOE_5 = 71, E5 = 71,
GPIOE_6 = 72, E6 = 72,
GPIOE_7 = 73, E7 = 73,
GPIOE_8 = 74, E8 = 74,
GPIOE_9 = 75, E9 = 75,
GPIOE_10 = 76, E10 = 76,
GPIOE_11 = 77, E11 = 77,
GPIOE_12 = 78, E12 = 78,
GPIOE_13 = 79, E13 = 79,
GPIOE_14 = 80, E14 = 80,
GPIOE_15 = 81, E15 = 81,
GPIOF_0 = 82, F0 = 82,
GPIOF_1 = 83, F1 = 83,
GPIOF_2 = 84, F2 = 84,
GPIOF_3 = 85, F3 = 85,
GPIOF_4 = 86, F4 = 86,
GPIOF_5 = 87, F5 = 87,
GPIOF_6 = 88, F6 = 88,
GPIOF_7 = 89, F7 = 89,
GPIOF_8 = 90, F8 = 90,
GPIOF_9 = 91, F9 = 91,
GPIOF_10 = 92, F10 = 92,
GPIOF_11 = 93, F11 = 93,
GPIOF_12 = 94, F12 = 94,
GPIOF_13 = 95, F13 = 95,
GPIOF_14 = 96, F14 = 96,
GPIOF_15 = 97, F15 = 97,
GPIOG_0 = 98, G0 = 98,
GPIOG_1 = 99, G1 = 99,
GPIOG_2 = 100, G2 = 100,
GPIOG_3 = 101, G3 = 101,
GPIOG_4 = 102, G4 = 102,
GPIOG_5 = 103, G5 = 103,
GPIOG_6 = 104, G6 = 104,
GPIOG_7 = 105, G7 = 105,
GPIOG_8 = 106, G8 = 106,
GPIOG_9 = 107, G9 = 107,
GPIOG_10 = 108, G10 = 108,
GPIOG_11 = 109, G11 = 109,
GPIOG_12 = 110, G12 = 110,
GPIOG_13 = 111, G13 = 111,
GPIOG_14 = 112, G14 = 112,
GPIOG_15 = 113, G15 = 113,
GPIOH_0 = 114, H0 = 114,
GPIOH_1 = 115, H1 = 115,
GPIOH_2 = 116, H2 = 116,
GPIOH_3 = 117, H3 = 117,
GPIOH_4 = 118, H4 = 118,
GPIOH_5 = 119, H5 = 119,
GPIOH_6 = 120, H6 = 120,
GPIOH_7 = 121, H7 = 121,
GPIOH_8 = 122, H8 = 122,
GPIOH_9 = 123, H9 = 123,
GPIOH_10 = 124, H10 = 124,
GPIOH_11 = 125, H11 = 125,
GPIOH_12 = 126, H12 = 126,
GPIOH_13 = 127, H13 = 127,
GPIOH_14 = 128, H14 = 128,
GPIOH_15 = 129, H15 = 129,
GPIOI_0 = 130, I0 = 130,
GPIOI_1 = 131, I1 = 131,
GPIOI_2 = 132, I2 = 132,
GPIOI_3 = 133, I3 = 133,
GPIOI_4 = 134, I4 = 134,
GPIOI_5 = 135, I5 = 135,
GPIOI_6 = 136, I6 = 136,
GPIOI_7 = 137, I7 = 137,
GPIOI_8 = 138, I8 = 138,
GPIOI_9 = 139, I9 = 139,
GPIOI_10 = 140, I10 = 140,
GPIOI_11 = 141, I11 = 141,
GPIOI_12 = 142, I12 = 142,
GPIOI_13 = 143, I13 = 143,
GPIOI_14 = 144, I14 = 144,
GPIOI_15 = 145, I15 = 145,
GPIOJ_0 = 146, J0 = 146,
GPIOJ_1 = 147, J1 = 147,
GPIOJ_2 = 148, J2 = 148,
GPIOJ_3 = 149, J3 = 149,
GPIOJ_4 = 150, J4 = 150,
GPIOJ_5 = 151, J5 = 151,
GPIOJ_6 = 152, J6 = 152,
GPIOJ_7 = 153, J7 = 153,
GPIOJ_8 = 154, J8 = 154,
GPIOJ_9 = 155, J9 = 155,
GPIOJ_10 = 156, J10 = 156,
GPIOJ_11 = 157, J11 = 157,
GPIOJ_12 = 158, J12 = 158,
GPIOJ_13 = 159, J13 = 159,
GPIOJ_14 = 160, J14 = 160,
GPIOJ_15 = 161, J15 = 161,
GPIOK_0 = 162, K0 = 162,
GPIOK_1 = 163, K1 = 163,
GPIOK_2 = 164, K2 = 164,
GPIOK_3 = 165, K3 = 165,
GPIOK_4 = 166, K4 = 166,
GPIOK_5 = 167, K5 = 167,
GPIOK_6 = 168, K6 = 168,
GPIOK_7 = 169, K7 = 169,
GPIOK_8 = 170, K8 = 170,
GPIOK_9 = 171, K9 = 171,
GPIOK_10 = 172, K10 = 172,
GPIOK_11 = 173, K11 = 173,
GPIOK_12 = 174, K12 = 174,
GPIOK_13 = 175, K13 = 175,
GPIOK_14 = 176, K14 = 176,
GPIOK_15 = 177, K15 = 177,
DRV8860_PIN_1 = 178, DRV8860_PIN_1 = 178,
DRV8860_PIN_2 = 179, DRV8860_PIN_2 = 179,
@ -230,14 +228,13 @@ typedef enum __attribute__ ((__packed__)) {
DRV8860_PIN_14 = 191, DRV8860_PIN_14 = 191,
DRV8860_PIN_15 = 192, DRV8860_PIN_15 = 192,
DRV8860_PIN_16 = 193, DRV8860_PIN_16 = 193,
};
} brain_pin_e;
/* Plase keep updating this defines */ /* Plase keep updating this defines */
#define BRAIN_PIN_ONCHIP_LAST GPIOK_15 #define BRAIN_PIN_ONCHIP_LAST Gpio::K15
#define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - GPIOA_0 + 1) #define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - Gpio::A0 + 1)
#define BRAIN_PIN_LAST DRV8860_PIN_16 #define BRAIN_PIN_LAST Gpio::DRV8860_PIN_16
#define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - GPIOA_0 + 1) #define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - Gpio::A0 + 1)
typedef enum __attribute__ ((__packed__)) { typedef enum __attribute__ ((__packed__)) {
EFI_ADC_NONE = 0, EFI_ADC_NONE = 0,

View File

@ -23,31 +23,31 @@ static OutputPin alphaCrankNPullUp;
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = H144_LS_1; engineConfiguration->injectionPins[0] = H144_LS_1;
engineConfiguration->injectionPins[1] = H144_LS_2; engineConfiguration->injectionPins[1] = H144_LS_2;
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[2] = Gpio::Unassigned;
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[3] = Gpio::Unassigned;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->clutchDownPin = GPIO_UNASSIGNED; engineConfiguration->clutchDownPin = Gpio::Unassigned;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
engineConfiguration->malfunctionIndicatorPin = GPIO_UNASSIGNED; engineConfiguration->malfunctionIndicatorPin = Gpio::Unassigned;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = H144_IGN_1; engineConfiguration->ignitionPins[0] = H144_IGN_1;
engineConfiguration->ignitionPins[1] = H144_IGN_2; engineConfiguration->ignitionPins[1] = H144_IGN_2;
engineConfiguration->ignitionPins[2] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -67,7 +67,7 @@ static void setupEtb() {
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = H144_OUT_IO1; engineConfiguration->etbIo[0].disablePin = H144_OUT_IO1;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
// we only have pwm/dir, no dira/dirb // we only have pwm/dir, no dira/dirb
engineConfiguration->etb_use_two_wires = false; engineConfiguration->etb_use_two_wires = false;
@ -89,9 +89,9 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs, hall // trigger inputs, hall
engineConfiguration->triggerInputPins[0] = H144_IN_SENS4; engineConfiguration->triggerInputPins[0] = H144_IN_SENS4;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; engineConfiguration->camInputs[0] = Gpio::Unassigned;
engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS; engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS;
@ -143,8 +143,8 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
@ -167,10 +167,10 @@ void setBoardDefaultConfiguration() {
setInjectorPins(); setInjectorPins();
setIgnitionPins(); setIgnitionPins();
setupEtb(); setupEtb();
engineConfiguration->acSwitch = GPIO_UNASSIGNED; engineConfiguration->acSwitch = Gpio::Unassigned;
engineConfiguration->fuelPumpPin = H144_OUT_PWM2; engineConfiguration->fuelPumpPin = H144_OUT_PWM2;
engineConfiguration->fanPin = H144_OUT_PWM4; engineConfiguration->fanPin = H144_OUT_PWM4;
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED; engineConfiguration->mainRelayPin = Gpio::Unassigned;
engineConfiguration->tachOutputPin = H144_OUT_PWM3; engineConfiguration->tachOutputPin = H144_OUT_PWM3;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
@ -186,7 +186,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->clutchDownPin = H144_IN_D_2; engineConfiguration->clutchDownPin = H144_IN_D_2;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
setHellenDefaultVrThresholds(); setHellenDefaultVrThresholds();
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6; engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6;
} }

View File

@ -1,19 +1,19 @@
pins: pins:
- pin: auxMain - pin: auxMain
#H144_OUT_IO7 #H144_OUT_IO7
id: GPIOG_3 id: G3
class: outputs class: outputs
ts_name: auxMain ts_name: auxMain
- pin: auxWastegate - pin: auxWastegate
#H176_OUT_PWM3 #H176_OUT_PWM3
id: GPIOC_7 id: C7
class: outputs class: outputs
ts_name: auxWastegate ts_name: auxWastegate
- pin: 1 - pin: 1
# H144_OUT_PWM7 # H144_OUT_PWM7
id: GPIOD_15 id: D15
class: outputs class: outputs
function: Right Oil Cooling Fan function: Right Oil Cooling Fan
ts_name: 1 Right Oil Cooling ts_name: 1 Right Oil Cooling
@ -28,7 +28,7 @@ pins:
- pin: 4 - pin: 4
# H144_OUT_PWM6 # H144_OUT_PWM6
id: GPIOD_14 id: D14
class: outputs class: outputs
function: Left Oil Cooling Fan function: Left Oil Cooling Fan
ts_name: 4 Left Oil Fan ts_name: 4 Left Oil Fan
@ -42,28 +42,28 @@ pins:
- pin: 6 - pin: 6
# H144_LS_1 # H144_LS_1
id: GPIOG_7 id: G7
class: outputs class: outputs
function: Front Injector function: Front Injector
ts_name: 6 Front Injector ts_name: 6 Front Injector
- pin: 7 - pin: 7
# H144_LS_2 # H144_LS_2
id: GPIOG_8 id: G8
class: outputs class: outputs
function: Rear Injector function: Rear Injector
ts_name: 7 Rear Injector ts_name: 7 Rear Injector
- pin: 8 - pin: 8
# H144_OUT_IO6 # H144_OUT_IO6
id: GPIOG_11 id: G11
class: outputs class: outputs
function: Rear ACR function: Rear ACR
ts_name: 8 Rear ACR ts_name: 8 Rear ACR
- pin: 11 - pin: 11
# H144_IN_SENS4 # H144_IN_SENS4
id: GPIOF_6 id: F6
class: event_inputs class: event_inputs
function: Crank Sensor VR- Negative Input function: Crank Sensor VR- Negative Input
ts_name: 11 Crank VR- ts_name: 11 Crank VR-
@ -80,7 +80,7 @@ pins:
- pin: 24 - pin: 24
# H144_IGN_1 # H144_IGN_1
id: GPIOC_13 id: C13
class: outputs class: outputs
ts_name: 24 Front Coil ts_name: 24 Front Coil
function: Front Coil function: Front Coil
@ -88,7 +88,7 @@ pins:
- pin: 25 - pin: 25
# H144_OUT_IO5 # H144_OUT_IO5
id: GPIOD_2 id: D2
class: outputs class: outputs
ts_name: 25 Front ACR ts_name: 25 Front ACR
function: Front ACR function: Front ACR
@ -152,7 +152,7 @@ pins:
- pin: 43 - pin: 43
# H144_IGN_2 # H144_IGN_2
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 43 Rear Coil ts_name: 43 Rear Coil
function: Rear Coil function: Rear Coil
@ -180,7 +180,7 @@ pins:
- pin: 51 - pin: 51
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: 51 - VSS ts_name: 51 - VSS
function: VSS in function: VSS in
@ -207,7 +207,7 @@ pins:
- pin: 61 - pin: 61
# low6 huh? # low6 huh?
# H144_OUT_IO3 # H144_OUT_IO3
id: GPIOG_14 id: G14
class: outputs class: outputs
ts_name: 61 Reverse Gear ts_name: 61 Reverse Gear
function: Reverse Gear function: Reverse Gear
@ -215,7 +215,7 @@ pins:
- pin: 63 - pin: 63
# low7 huh? # low7 huh?
# H144_OUT_IO4 # H144_OUT_IO4
id: GPIOG_5 id: G5
class: outputs class: outputs
ts_name: 63 Cooling Pump ts_name: 63 Cooling Pump
function: Cooling Pump function: Cooling Pump

View File

@ -6,6 +6,6 @@ endif
DDEFS += $(LED_CRITICAL_ERROR_BRAIN_PIN) DDEFS += $(LED_CRITICAL_ERROR_BRAIN_PIN)
PRIMARY_COMMUNICATION_PORT_USART2=-DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_6 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_5 -DTS_PRIMARY_PORT=UARTD2 -DSTM32_UART_USE_USART2=1 PRIMARY_COMMUNICATION_PORT_USART2=-DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D6 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D5 -DTS_PRIMARY_PORT=UARTD2 -DSTM32_UART_USE_USART2=1
include $(BOARDS_DIR)/hellen/hellen-common.mk include $(BOARDS_DIR)/hellen/hellen-common.mk

View File

@ -22,12 +22,12 @@ static void setInjectorPins() {
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->clutchDownPin = GPIOC_4; // Clutch switch input engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO8; engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO8;
@ -35,13 +35,13 @@ static void setInjectorPins() {
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = H144_IGN_1; engineConfiguration->ignitionPins[0] = H144_IGN_1;
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
engineConfiguration->ignitionPins[2] = H144_IGN_2; engineConfiguration->ignitionPins[2] = H144_IGN_2;
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -64,8 +64,8 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs, hall // trigger inputs, hall
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK; engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->camInputs[0] = H144_IN_CAM; engineConfiguration->camInputs[0] = H144_IN_CAM;
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4; engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
@ -92,8 +92,8 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
if (engineConfiguration->trigger.type == TT_MAZDA_MIATA_NB1) { if (engineConfiguration->trigger.type == TT_MAZDA_MIATA_NB1) {
engineConfiguration->trigger.type = TT_MIATA_VVT; engineConfiguration->trigger.type = TT_MIATA_VVT;
@ -123,10 +123,10 @@ void setBoardDefaultConfiguration() {
engineConfiguration->boostControlPin = H144_LS_6; engineConfiguration->boostControlPin = H144_LS_6;
engineConfiguration->acSwitch = H144_IN_D_AUX3; engineConfiguration->acSwitch = H144_IN_D_AUX3;
engineConfiguration->acRelayPin = H144_OUT_IO6; engineConfiguration->acRelayPin = H144_OUT_IO6;
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9 engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5 engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3 engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
engineConfiguration->tachOutputPin = H144_OUT_PWM1; engineConfiguration->tachOutputPin = H144_OUT_PWM1;
engineConfiguration->alternatorControlPin = H144_OUT_PWM7; engineConfiguration->alternatorControlPin = H144_OUT_PWM7;
engineConfiguration->fan2Pin = H144_OUT_IO2; engineConfiguration->fan2Pin = H144_OUT_IO2;
@ -144,7 +144,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->clutchDownPin = H144_IN_D_2; engineConfiguration->clutchDownPin = H144_IN_D_2;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
} }
/** /**

View File

@ -20,26 +20,26 @@ pins:
type: can type: can
- pin: 1F - pin: 1F
id: [GPIOF_9, ADC3_CHANNEL_7] id: [F9, ADC3_CHANNEL_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 1F - Brake/RES1 ts_name: 1F - Brake/RES1
function: Brake Switch function: Brake Switch
- pin: 1E - pin: 1E
id: GPIOG_4 id: G4
class: outputs class: outputs
ts_name: 1E - Check Engine Light ts_name: 1E - Check Engine Light
function: Check Engine Light function: Check Engine Light
type: ls type: ls
- pin: 1G - pin: 1G
id: [GPIOF_10, EFI_ADC_3] id: [F10, EFI_ADC_3]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 1G - Steering/RES2 ts_name: 1G - Steering/RES2
function: Power Steering Switch function: Power Steering Switch
- pin: 1I - pin: 1I
id: GPIOA_9 id: A9
class: outputs class: outputs
ts_name: 1I AC Fan Relay ts_name: 1I AC Fan Relay
function: AC Fan Relay function: AC Fan Relay
@ -49,27 +49,27 @@ pins:
type: ls type: ls
- pin: 1O - pin: 1O
id: GPIOD_15 id: D15
class: outputs class: outputs
ts_name: 1O - ALTERN ts_name: 1O - ALTERN
function: PWM signal to control alternator field voltage function: PWM signal to control alternator field voltage
type: ls type: ls
- pin: 1P - pin: 1P
id: [GPIOC_5, EFI_ADC_15] id: [C5, EFI_ADC_15]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 1P - AC Switch ts_name: 1P - AC Switch
function: A/C Pressure In function: A/C Pressure In
- pin: 1Q - pin: 1Q
id: GPIOG_12 id: G12
class: outputs class: outputs
ts_name: 1Q - Aternator Warning Lamp ts_name: 1Q - Aternator Warning Lamp
function: Alternator Warning Light function: Alternator Warning Light
type: ls type: ls
- pin: 1R - pin: 1R
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: 1R - ECF ts_name: 1R - ECF
function: Engine Radiator Fan function: Engine Radiator Fan
@ -77,26 +77,26 @@ pins:
- pin: 1S - pin: 1S
#H144_OUT_IO6 #H144_OUT_IO6
id: GPIOG_11 id: G11
class: outputs class: outputs
ts_name: 1S - AC Relay ts_name: 1S - AC Relay
function: A/C Relay function: A/C Relay
type: ls type: ls
- pin: 1U - pin: 1U
id: GPIOD_3 id: D3
class: outputs class: outputs
ts_name: 1U - O2H ts_name: 1U - O2H
function: Front O2 sens. heater function: Front O2 sens. heater
- pin: 1V - pin: 1V
id: GPIOE_14 id: E14
class: switch_inputs class: switch_inputs
ts_name: 1V - Neutral ts_name: 1V - Neutral
function: Neutral Switch function: Neutral Switch
- pin: 2A - pin: 2A
id: [GPIOB_0, EFI_ADC_8] id: [B0, EFI_ADC_8]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 2A - Pressure Input ts_name: 2A - Pressure Input
function: FTP input function: FTP input
@ -115,7 +115,7 @@ pins:
- pin: 2D - pin: 2D
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: 2D - VSS ts_name: 2D - VSS
function: VSS in function: VSS in
@ -127,13 +127,13 @@ pins:
function: CLT sensor function: CLT sensor
- pin: 2F - pin: 2F
id: GPIOF_7 id: F7
class: analog_inputs class: analog_inputs
ts_name: 2M - KNOCK ts_name: 2M - KNOCK
function: Knock sens. in function: Knock sens. in
- pin: 2H - pin: 2H
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 2H - CAM ts_name: 2H - CAM
function: Camshaft Sensor function: Camshaft Sensor
@ -142,14 +142,14 @@ pins:
function: +5v function: +5v
- pin: 2J - pin: 2J
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 2J - CRANK ts_name: 2J - CRANK
function: Crankshaft Sensor function: Crankshaft Sensor
- pin: 2K - pin: 2K
# H144_OUT_PWM1 # H144_OUT_PWM1
id: GPIOD_13 id: D13
class: outputs class: outputs
ts_name: 2K - TACH ts_name: 2K - TACH
function: Tach Out function: Tach Out
@ -171,7 +171,7 @@ pins:
function: GND function: GND
- pin: 3D - pin: 3D
id: [GPIOC_1, EFI_ADC_11] id: [C1, EFI_ADC_11]
class: [outputs, analog_inputs] class: [outputs, analog_inputs]
ts_name: 3D - MAP ts_name: 3D - MAP
function: MAP INPUT function: MAP INPUT
@ -191,40 +191,40 @@ pins:
function: GND function: GND
- pin: 3G - pin: 3G
id: GPIOC_13 id: C13
class: outputs class: outputs
ts_name: 3G - IGN_1 (1&4) ts_name: 3G - IGN_1 (1&4)
function: Coil #1 function: Coil #1
type: ign type: ign
- pin: 3H - pin: 3H
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 3H - IGN_2 (2&3) ts_name: 3H - IGN_2 (2&3)
function: Coil #2 function: Coil #2
type: ign type: ign
- pin: 3I - pin: 3I
id: GPIOE_13 id: E13
class: switch_inputs class: switch_inputs
ts_name: 3I - Clutch ts_name: 3I - Clutch
function: Clutch Switch function: Clutch Switch
- pin: 3J - pin: 3J
id: GPIOF_3 id: F3
class: switch_inputs class: switch_inputs
ts_name: 3J - O2S2 ts_name: 3J - O2S2
function: Rear O2 Sensor Signal function: Rear O2 Sensor Signal
- pin: 3M - pin: 3M
id: GPIOD_14 id: D14
class: outputs class: outputs
ts_name: 2Q - IDLE ts_name: 2Q - IDLE
function: IAC (negative), with diode function: IAC (negative), with diode
type: ls type: ls
- pin: 3N - pin: 3N
id: GPIOG_2 id: G2
class: outputs class: outputs
ts_name: 2M US / 2P EUROPE - FPUMP ts_name: 2M US / 2P EUROPE - FPUMP
function: Fuel Pump Relay function: Fuel Pump Relay
@ -234,55 +234,55 @@ pins:
funtion: +12v funtion: +12v
- pin: 3Q - pin: 3Q
id: GPIOF_14 id: F14
class: outputs class: outputs
ts_name: 3Q - VICS ts_name: 3Q - VICS
function: VICS function: VICS
type: inj type: inj
- pin: 3S - pin: 3S
id: [GPIOA_7, EFI_ADC_7] id: [A7, EFI_ADC_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 3S - EGR BOOST IN ts_name: 3S - EGR BOOST IN
function: EGR BOOST function: EGR BOOST
- pin: 3T - pin: 3T
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: 3T/4D - BOOST OUT ts_name: 3T/4D - BOOST OUT
function: BOOST OUT function: BOOST OUT
type: inj type: inj
- pin: 3V - pin: 3V
id: GPIOG_13 id: G13
class: outputs class: outputs
ts_name: 3V - O2H2 ts_name: 3V - O2H2
function: Rear O2 sensor heater function: Rear O2 sensor heater
type: ls type: ls
- pin: 3W - pin: 3W
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: 3W - INJ_1 ts_name: 3W - INJ_1
function: Injector #1 function: Injector #1
type: inj type: inj
- pin: 3X - pin: 3X
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: 3X - INJ_2 ts_name: 3X - INJ_2
function: Injector #2 function: Injector #2
type: inj type: inj
- pin: 3Y - pin: 3Y
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: 3Y - INJ_3 ts_name: 3Y - INJ_3
function: Injector #3 function: Injector #3
type: inj type: inj
- pin: 3Z - pin: 3Z
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: 3Z - INJ_4 ts_name: 3Z - INJ_4
function: Injector #4 function: Injector #4
@ -292,13 +292,13 @@ pins:
function: GND function: GND
- pin: 4B - pin: 4B
id: GPIOE_12 id: E12
class: event_inputs class: event_inputs
ts_name: 4B - DIGITAL/FLEX ts_name: 4B - DIGITAL/FLEX
function: DIGITAL function: DIGITAL
- pin: 4C - pin: 4C
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 4C - IN TEMP/PPS2 ts_name: 4C - IN TEMP/PPS2
function: TEMP OR PPS2 function: TEMP OR PPS2
@ -308,7 +308,7 @@ pins:
- pin: 4E - pin: 4E
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: 4E - VVT ts_name: 4E - VVT
function: VVT Oil Control Valve neg. function: VVT Oil Control Valve neg.
@ -336,27 +336,27 @@ pins:
function: WBO function: WBO
- pin: int_pps1 - pin: int_pps1
id: [GPIOA_3] id: [A3]
class: [switch_inputs] class: [switch_inputs]
ts_name: PPS1 ts_name: PPS1
- pin: int_tps2 - pin: int_tps2
id: [GPIOA_1, EFI_ADC_1] id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: TPS1 ts_name: TPS1
- pin: int_etb+ - pin: int_etb+
id: GPIOC_7 id: C7
class: outputs class: outputs
ts_name: ETB + ts_name: ETB +
- pin: int_etb- - pin: int_etb-
id: GPIOC_8 id: C8
class: outputs class: outputs
ts_name: ETB - ts_name: ETB -
- pin: int_etb_EN - pin: int_etb_EN
id: GPIOC_6 id: C6
class: outputs class: outputs
ts_name: ETB EN ts_name: ETB EN

View File

@ -25,7 +25,7 @@ static void setInjectorPins() {
// Disable remainder // Disable remainder
for (int i = 6; i < MAX_CYLINDER_COUNT;i++) { for (int i = 6; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
@ -41,7 +41,7 @@ static void setIgnitionPins() {
// disable remainder // disable remainder
for (int i = 6; i < MAX_CYLINDER_COUNT; i++) { for (int i = 6; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -64,8 +64,8 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK; engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = H144_IN_CAM; engineConfiguration->camInputs[0] = H144_IN_CAM;
// todo: remove from default since 4 cylinder does not use it // todo: remove from default since 4 cylinder does not use it
@ -125,20 +125,20 @@ void setBoardDefaultConfiguration() {
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->canNbcType = CAN_BUS_NISSAN_VQ; engineConfiguration->canNbcType = CAN_BUS_NISSAN_VQ;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->fuelPumpPin = GPIOD_12; // OUT_IO9 // 113 Fuel Pump Relay engineConfiguration->fuelPumpPin = Gpio::D12; // OUT_IO9 // 113 Fuel Pump Relay
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
// engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 // engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIOG_14; // pin: 111a, OUT_IO3 engineConfiguration->mainRelayPin = Gpio::G14; // pin: 111a, OUT_IO3
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();
engineConfiguration->etbIo[0].directionPin1 = GPIOD_15; // out_pwm7 engineConfiguration->etbIo[0].directionPin1 = Gpio::D15; // out_pwm7
engineConfiguration->etbIo[0].directionPin2 = GPIOD_14; // out_pwm6 engineConfiguration->etbIo[0].directionPin2 = Gpio::D14; // out_pwm6
engineConfiguration->etbIo[0].controlPin = GPIOD_13; // ETB_EN out_pwm1 engineConfiguration->etbIo[0].controlPin = Gpio::D13; // ETB_EN out_pwm1
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
// Some sensible defaults for other options // Some sensible defaults for other options
@ -160,7 +160,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS; engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL; engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL;
engineConfiguration->luaOutputPins[0] = GPIOG_5; // 104 ETB Relay engineConfiguration->luaOutputPins[0] = Gpio::G5; // 104 ETB Relay
engineConfiguration->throttlePedalUpVoltage = 0.75; engineConfiguration->throttlePedalUpVoltage = 0.75;
engineConfiguration->throttlePedalWOTVoltage = 4.45; engineConfiguration->throttlePedalWOTVoltage = 4.45;
@ -183,14 +183,14 @@ void setBoardDefaultConfiguration() {
void setSdCardConfigurationOverrides() { void setSdCardConfigurationOverrides() {
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->sdCardCsPin = GPIOA_15; engineConfiguration->sdCardCsPin = Gpio::A15;
// engineConfiguration->spi2mosiPin = GPIOB_15; // engineConfiguration->spi2mosiPin = Gpio::B15;
// engineConfiguration->spi2misoPin = GPIOB_14; // engineConfiguration->spi2misoPin = Gpio::B14;
// engineConfiguration->spi2sckPin = GPIOB_13; // engineConfiguration->spi2sckPin = Gpio::B13;
// engineConfiguration->sdCardCsPin = GPIOB_12; // engineConfiguration->sdCardCsPin = Gpio::B12;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
} }

View File

@ -20,14 +20,14 @@ pins:
function: USB - function: USB -
- pin: 10a - pin: 10a
id: GPIOF_13 id: F13
ts_name: 10 - VTC Left ts_name: 10 - VTC Left
class: outputs class: outputs
function: Intake VTC solenoid Bank 2 function: Intake VTC solenoid Bank 2
# OUT_C-IVC_L OUT_INJ7 # OUT_C-IVC_L OUT_INJ7
- pin: 11a - pin: 11a
id: GPIOF_14 id: F14
ts_name: 11 - VTC Right ts_name: 11 - VTC Right
class: outputs class: outputs
function: Intake VTC solenoid Bank 1 function: Intake VTC solenoid Bank 1
@ -36,20 +36,20 @@ pins:
- pin: 13a - pin: 13a
function: Crank Sensor function: Crank Sensor
# IN_CRANK AIN24 A24 # IN_CRANK AIN24 A24
id: [GPIOB_1] id: [B1]
class: [event_inputs] class: [event_inputs]
ts_name: 13 - Crank ts_name: 13 - Crank
- pin: 14a - pin: 14a
function: Cam Sensor Left function: Cam Sensor Left
# IN_CAM_L IN_CAM AIN19 A19 # IN_CAM_L IN_CAM AIN19 A19
id: [GPIOA_6] id: [A6]
class: [event_inputs] class: [event_inputs]
ts_name: 14 - Cam Left ts_name: 14 - Cam Left
- pin: 21a - pin: 21a
# Q307 # Q307
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: 21 - INJ_5 ts_name: 21 - INJ_5
function: Injector 5 function: Injector 5
@ -57,7 +57,7 @@ pins:
- pin: 22a - pin: 22a
# Q309 # Q309
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: 22 - INJ_3 ts_name: 22 - INJ_3
function: Injector 3 function: Injector 3
@ -65,14 +65,14 @@ pins:
- pin: 23a - pin: 23a
# Q312 # Q312
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: 23 - INJ_1 ts_name: 23 - INJ_1
function: Injector 1 function: Injector 1
type: inj type: inj
- pin: 29a - pin: 29a
id: GPIOD_3 id: D3
ts_name: 29 - VIAS ts_name: 29 - VIAS
class: outputs class: outputs
function: VIAS control Solenoid function: VIAS control Solenoid
@ -80,7 +80,7 @@ pins:
- pin: 33a - pin: 33a
function: Cam Sensor Right function: Cam Sensor Right
# IN_CAM_R IN_AUX4 AIN20 A20 # IN_CAM_R IN_AUX4 AIN20 A20
id: [GPIOA_7] id: [A7]
class: [event_inputs] class: [event_inputs]
ts_name: 33 - Cam Right ts_name: 33 - Cam Right
@ -92,7 +92,7 @@ pins:
- pin: 40a - pin: 40a
# Q311 # Q311
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: 40 - INJ_6 ts_name: 40 - INJ_6
function: Injector 6 function: Injector 6
@ -100,7 +100,7 @@ pins:
- pin: 41a - pin: 41a
# Q310 # Q310
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: 41 - INJ_4 ts_name: 41 - INJ_4
function: Injector 4 function: Injector 4
@ -108,7 +108,7 @@ pins:
- pin: 42a - pin: 42a
# Q305 # Q305
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: 42 - INJ_2 ts_name: 42 - INJ_2
function: Injector 2 function: Injector 2
@ -129,21 +129,21 @@ pins:
function: TPS 1 sensor input function: TPS 1 sensor input
- pin: 60a - pin: 60a
id: GPIOE_2 id: E2
class: outputs class: outputs
ts_name: 60 - Coil 5 ts_name: 60 - Coil 5
function: Coil 5 function: Coil 5
type: ign type: ign
- pin: 61a - pin: 61a
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: 61 - Coil 3 ts_name: 61 - Coil 3
function: Coil 3 function: Coil 3
type: ign type: ign
- pin: 62a - pin: 62a
id: GPIOC_13 id: C13
class: outputs class: outputs
ts_name: 62 - Coil 1 ts_name: 62 - Coil 1
function: Coil 1 function: Coil 1
@ -191,21 +191,21 @@ pins:
function: GNDA function: GNDA
- pin: 79a - pin: 79a
id: GPIOB_8 id: B8
class: outputs class: outputs
ts_name: 79 - Coil 6 ts_name: 79 - Coil 6
function: Coil 6 function: Coil 6
type: ign type: ign
- pin: 80a - pin: 80a
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: 80 - Coil 4 ts_name: 80 - Coil 4
function: Coil 4 function: Coil 4
type: ign type: ign
- pin: 81a - pin: 81a
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 81 - Coil 2 ts_name: 81 - Coil 2
function: Coil 2 function: Coil 2
@ -242,20 +242,20 @@ pins:
function: PPS 2 sensor input function: PPS 2 sensor input
- pin: 101a - pin: 101a
id: GPIOF_9 id: F9
class: switch_inputs class: switch_inputs
ts_name: 101 - Brake Input ts_name: 101 - Brake Input
function: Brake Switch function: Brake Switch
- pin: 102a - pin: 102a
id: GPIOF_10 id: F10
class: switch_inputs class: switch_inputs
ts_name: 102 - Power Steering Input ts_name: 102 - Power Steering Input
function: Power Steering Switch function: Power Steering Switch
- pin: 104a - pin: 104a
# LOW6_DIODE _IO4 # LOW6_DIODE _IO4
id: GPIOG_5 id: G5
class: outputs class: outputs
ts_name: 104 ETB Relay ts_name: 104 ETB Relay
function: ETB relay control function: ETB relay control
@ -278,7 +278,7 @@ pins:
- pin: 111a - pin: 111a
# OUT_IO3 # OUT_IO3
id: GPIOG_14 id: G14
class: outputs class: outputs
ts_name: 111 Main Relay ts_name: 111 Main Relay
function: Main relay control function: Main relay control
@ -286,7 +286,7 @@ pins:
- pin: 113a - pin: 113a
# OUT_PWM8 # OUT_PWM8
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: 113 Fuel Pump Relay ts_name: 113 Fuel Pump Relay
function: Fuel Pump control function: Fuel Pump control

View File

@ -16,33 +16,33 @@
#include "hellen_meta.h" #include "hellen_meta.h"
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = GPIOG_7; // 96 - INJ_1 engineConfiguration->injectionPins[0] = Gpio::G7; // 96 - INJ_1
engineConfiguration->injectionPins[1] = GPIOG_8; engineConfiguration->injectionPins[1] = Gpio::G8;
engineConfiguration->injectionPins[2] = GPIOD_11; // 97 - INJ_3 engineConfiguration->injectionPins[2] = Gpio::D11; // 97 - INJ_3
engineConfiguration->injectionPins[3] = GPIOD_10; engineConfiguration->injectionPins[3] = Gpio::D10;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = GPIOI_8; // 102 - IGN_1 engineConfiguration->ignitionPins[0] = Gpio::I8; // 102 - IGN_1
engineConfiguration->ignitionPins[1] = GPIOE_5 ; // 7 - IGN_2 engineConfiguration->ignitionPins[1] = Gpio::E5 ; // 7 - IGN_2
engineConfiguration->ignitionPins[2] = GPIOE_4; // 111 - IGN_3 engineConfiguration->ignitionPins[2] = Gpio::E4; // 111 - IGN_3
engineConfiguration->ignitionPins[3] = GPIOE_3; // 94 - IGN_4 engineConfiguration->ignitionPins[3] = Gpio::E3; // 94 - IGN_4
//engineConfiguration->ignitionPins[4] = GPIOE_2; //engineConfiguration->ignitionPins[4] = Gpio::E2;
//engineConfiguration->ignitionPins[5] = GPIOI_5; //engineConfiguration->ignitionPins[5] = Gpio::I5;
//engineConfiguration->ignitionPins[6] = GPIOI_6; //engineConfiguration->ignitionPins[6] = Gpio::I6;
//engineConfiguration->ignitionPins[7] = GPIOI_7; //engineConfiguration->ignitionPins[7] = Gpio::I7;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -64,11 +64,11 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
engineConfiguration->triggerInputPins[0] = GPIOB_1; // 82 - VR engineConfiguration->triggerInputPins[0] = Gpio::B1; // 82 - VR
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = GPIOA_6; // 86 - CAM1 engineConfiguration->camInputs[0] = Gpio::A6; // 86 - CAM1
engineConfiguration->tps1_1AdcChannel = H144_IN_TPS; // 92 - TPS 1 engineConfiguration->tps1_1AdcChannel = H144_IN_TPS; // 92 - TPS 1
engineConfiguration->tps1_2AdcChannel = H144_IN_AUX1; engineConfiguration->tps1_2AdcChannel = H144_IN_AUX1;
@ -104,8 +104,8 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
@ -128,9 +128,9 @@ void setBoardDefaultConfiguration() {
setInjectorPins(); setInjectorPins();
setIgnitionPins(); setIgnitionPins();
engineConfiguration->etbIo[0].directionPin1 = GPIOC_6; // out_pwm2 engineConfiguration->etbIo[0].directionPin1 = Gpio::C6; // out_pwm2
engineConfiguration->etbIo[0].directionPin2 = GPIOC_7; // out_pwm3 engineConfiguration->etbIo[0].directionPin2 = Gpio::C7; // out_pwm3
engineConfiguration->etbIo[0].controlPin = GPIOA_8; // ETB_EN out_io12 engineConfiguration->etbIo[0].controlPin = Gpio::A8; // ETB_EN out_io12
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
setBoschVAGETB(); setBoschVAGETB();
@ -148,10 +148,10 @@ void setBoardDefaultConfiguration() {
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->fuelPumpPin = H144_OUT_IO3; engineConfiguration->fuelPumpPin = H144_OUT_IO3;
engineConfiguration->malfunctionIndicatorPin = GPIOG_4; // 47 - CEL engineConfiguration->malfunctionIndicatorPin = Gpio::G4; // 47 - CEL
engineConfiguration->tachOutputPin = H144_OUT_PWM7; engineConfiguration->tachOutputPin = H144_OUT_PWM7;
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5 engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = H144_OUT_IO1; engineConfiguration->mainRelayPin = H144_OUT_IO1;
// engineConfiguration->injectorCompensationMode // engineConfiguration->injectorCompensationMode
@ -182,14 +182,14 @@ void setBoardDefaultConfiguration() {
void setSdCardConfigurationOverrides() { void setSdCardConfigurationOverrides() {
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->sdCardCsPin = GPIOA_15; engineConfiguration->sdCardCsPin = Gpio::A15;
// engineConfiguration->spi2mosiPin = GPIOB_15; // engineConfiguration->spi2mosiPin = Gpio::B15;
// engineConfiguration->spi2misoPin = GPIOB_14; // engineConfiguration->spi2misoPin = Gpio::B14;
// engineConfiguration->spi2sckPin = GPIOB_13; // engineConfiguration->spi2sckPin = Gpio::B13;
// engineConfiguration->sdCardCsPin = GPIOB_12; // engineConfiguration->sdCardCsPin = Gpio::B12;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
} }

View File

@ -1,6 +1,6 @@
pins: pins:
- pin: MR - pin: MR
id: GPIOI_2 id: I2
class: outputs class: outputs
ts_name: Main Relay ts_name: Main Relay
function: OUT_MAIN function: OUT_MAIN
@ -22,13 +22,13 @@ pins:
function: LSU Heat - function: LSU Heat -
- pin: 7a - pin: 7a
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 7 - IGN_2 ts_name: 7 - IGN_2
type: ign type: ign
- pin: 8a - pin: 8a
id: GPIOI_6 id: I6
class: outputs class: outputs
ts_name: 8 - IGN_7 ts_name: 8 - IGN_7
type: ign type: ign
@ -40,13 +40,13 @@ pins:
function: O2 sensor signal function: O2 sensor signal
- pin: 18a - pin: 18a
id: GPIOC_9 id: C9
class: outputs class: outputs
ts_name: 18 - VVT2 B1 ts_name: 18 - VVT2 B1
function: OUT_VVT2_B1 function: OUT_VVT2_B1
- pin: 19a - pin: 19a
id: GPIOF_13 id: F13
class: outputs class: outputs
ts_name: 19 - INJ 7 ts_name: 19 - INJ 7
function: OUT_INJ7 function: OUT_INJ7
@ -56,7 +56,7 @@ pins:
function: Main relay A function: Main relay A
- pin: 22a - pin: 22a
id: GPIOI_0 id: I0
class: outputs class: outputs
ts_name: 22 - VVT1 1 ts_name: 22 - VVT1 1
function: OUT_VVT1_1 function: OUT_VVT1_1
@ -65,7 +65,7 @@ pins:
function: Main relay B function: Main relay B
- pin: 24a - pin: 24a
id: GPIOF_14 id: F14
class: outputs class: outputs
ts_name: 24 - INJ 8 ts_name: 24 - INJ 8
function: OUT_INJ8 function: OUT_INJ8
@ -109,26 +109,26 @@ pins:
function: GNDA function: GNDA
- pin: 37 - pin: 37
id: GPIOD_13 id: D13
class: outputs class: outputs
ts_name: 37 - TACH ts_name: 37 - TACH
function: Tach Out function: Tach Out
type: ls type: ls
- pin: 38 - pin: 38
id: [GPIOF_9, ADC3_CHANNEL_7] id: [F9, ADC3_CHANNEL_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 48 - IN RES1 ts_name: 48 - IN RES1
function: IN_RES1 function: IN_RES1
- pin: 39 - pin: 39
id: [GPIOF_10] id: [F10]
class: [switch_inputs] class: [switch_inputs]
ts_name: 39 - IN RES2 ts_name: 39 - IN RES2
function: IN_RES2 function: IN_RES2
- pin: 47a - pin: 47a
id: GPIOG_4 id: G4
class: outputs class: outputs
ts_name: 47 - CEL ts_name: 47 - CEL
function: MIL Control function: MIL Control
@ -148,19 +148,19 @@ pins:
- pin: 54a - pin: 54a
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: 54 - VSS ts_name: 54 - VSS
function: VSS in function: VSS in
- pin: 55a - pin: 55a
id: GPIOE_12 id: E12
ts_name: In D1 ts_name: In D1
class: switch_inputs class: switch_inputs
function: IN_D1 function: IN_D1
- pin: 57a - pin: 57a
id: GPIOE_13 id: E13
ts_name: In D2 ts_name: In D2
class: switch_inputs class: switch_inputs
function: IN_D2 function: IN_D2
@ -174,7 +174,7 @@ pins:
type: can type: can
- pin: 65a - pin: 65a
id: GPIOH_14 id: H14
class: outputs class: outputs
ts_name: 65 - Fuel Pump ts_name: 65 - Fuel Pump
function: Fuel Pump Relay function: Fuel Pump Relay
@ -187,25 +187,25 @@ pins:
function: LSU_CALIBR_RES function: LSU_CALIBR_RES
- pin: 75a - pin: 75a
id: GPIOE_14 id: E14
ts_name: In D3 ts_name: In D3
class: switch_inputs class: switch_inputs
function: IN_D3 function: IN_D3
- pin: 76a - pin: 76a
id: GPIOE_15 id: E15
ts_name: In D4 ts_name: In D4
class: switch_inputs class: switch_inputs
function: IN_D4 function: IN_D4
- pin: 81a - pin: 81a
id: GPIOD_15 id: D15
class: outputs class: outputs
function: OUT_FUEL_CONSUMPTION function: OUT_FUEL_CONSUMPTION
- pin: 82a - pin: 82a
function: Crank Sensor function: Crank Sensor
id: [GPIOB_1] id: [B1]
class: [event_inputs] class: [event_inputs]
ts_name: 82 - VR ts_name: 82 - VR
@ -226,26 +226,26 @@ pins:
function: IAT sensor function: IAT sensor
- pin: 86a - pin: 86a
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 86 - CAM1 ts_name: 86 - CAM1
function: Camshaft Sensor 1 function: Camshaft Sensor 1
- pin: 87a - pin: 87a
id: [GPIOA_7, EFI_ADC_7] id: [A7, EFI_ADC_7]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 87 - CAM2 ts_name: 87 - CAM2
function: Camshaft Sensor 2 function: Camshaft Sensor 2
- pin: 88a - pin: 88a
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: 88 - INJ_4 ts_name: 88 - INJ_4
function: Injector #4 function: Injector #4
type: inj type: inj
- pin: 89a - pin: 89a
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: 89 - INJ_2 ts_name: 89 - INJ_2
function: Injector #2 function: Injector #2
@ -270,26 +270,26 @@ pins:
function: CLT sensor function: CLT sensor
- pin: 94a - pin: 94a
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: 94 - IGN_4 ts_name: 94 - IGN_4
type: ign type: ign
- pin: 95a - pin: 95a
id: GPIOI_7 id: I7
class: outputs class: outputs
ts_name: 95 - IGN_8 ts_name: 95 - IGN_8
type: ign type: ign
- pin: 96a - pin: 96a
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: 96 - INJ_1 ts_name: 96 - INJ_1
function: Injector #1 function: Injector #1
type: inj type: inj
- pin: 97a - pin: 97a
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: 97 - INJ_3 ts_name: 97 - INJ_3
function: Injector #3 function: Injector #3
@ -302,32 +302,32 @@ pins:
function: GNDA function: GNDA
- pin: 101a - pin: 101a
id: [GPIOC_1, EFI_ADC_11] id: [C1, EFI_ADC_11]
class: [outputs, analog_inputs] class: [outputs, analog_inputs]
ts_name: 101 - MAP2 ts_name: 101 - MAP2
function: Map2 function: Map2
- pin: 102a - pin: 102a
id: GPIOI_8 id: I8
class: outputs class: outputs
ts_name: 102 - IGN_1 ts_name: 102 - IGN_1
function: Coil #1 function: Coil #1
type: ign type: ign
- pin: 103a - pin: 103a
id: GPIOE_2 id: E2
class: outputs class: outputs
ts_name: 103 - IGN_5 ts_name: 103 - IGN_5
type: ign type: ign
- pin: 104a - pin: 104a
id: GPIOA_9 id: A9
class: outputs class: outputs
ts_name: 104 Wastegate ts_name: 104 Wastegate
function: OUT_WASTEGATE function: OUT_WASTEGATE
- pin: 105a - pin: 105a
id: GPIOD_14 id: D14
class: outputs class: outputs
ts_name: 105 - IDLE ts_name: 105 - IDLE
function: IAC function: IAC
@ -346,51 +346,51 @@ pins:
function: GNDA function: GNDA
- pin: 110a - pin: 110a
id: GPIOI_5 id: I5
class: outputs class: outputs
ts_name: 110 - IGN_6 ts_name: 110 - IGN_6
type: ign type: ign
- pin: 111a - pin: 111a
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: 111 - IGN_3 ts_name: 111 - IGN_3
type: ign type: ign
- pin: 112a - pin: 112a
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: 112 INJ 6 ts_name: 112 INJ 6
function: INJ_6 function: INJ_6
type: inj type: inj
- pin: 113a - pin: 113a
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: 113 INJ 5 ts_name: 113 INJ 5
function: INJ_5 function: INJ_5
type: inj type: inj
- pin: 115a - pin: 115a
id: GPIOG_3 id: G3
class: outputs class: outputs
ts_name: 115 - VVT1_2 ts_name: 115 - VVT1_2
function: OUT_VVT1_2 function: OUT_VVT1_2
- pin: 117a - pin: 117a
id: GPIOC_6 id: C6
class: outputs class: outputs
ts_name: 117 ETB_OUT+ ts_name: 117 ETB_OUT+
function: +ETB_OUT function: +ETB_OUT
- pin: 118a - pin: 118a
id: GPIOC_7 id: C7
class: outputs class: outputs
ts_name: 118 ETB_OUT- ts_name: 118 ETB_OUT-
function: -ETB_OUT function: -ETB_OUT
- pin: 120a - pin: 120a
id: GPIOC_8 id: C8
class: outputs class: outputs
ts_name: 120 - VVT2 B2 ts_name: 120 - VVT2 B2
function: OUT_VVT2_B2 function: OUT_VVT2_B2

View File

@ -9,7 +9,7 @@
// knock 1 - pin PF7 // knock 1 - pin PF7
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5 #define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
#define KNOCK_PIN_CH1 GPIOF_7 #define KNOCK_PIN_CH1 Gpio::F7
// Sample rate & time - depends on the exact MCU // Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 #define KNOCK_SAMPLE_TIME ADC_SAMPLE_84

View File

@ -28,25 +28,25 @@ static void setInjectorPins() {
// Disable remainder // Disable remainder
for (int i = 8; i < MAX_CYLINDER_COUNT;i++) { for (int i = 8; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = GPIOI_8; engineConfiguration->ignitionPins[0] = Gpio::I8;
engineConfiguration->ignitionPins[1] = GPIOE_5; engineConfiguration->ignitionPins[1] = Gpio::E5;
engineConfiguration->ignitionPins[2] = GPIOE_4; engineConfiguration->ignitionPins[2] = Gpio::E4;
engineConfiguration->ignitionPins[3] = GPIOE_3; engineConfiguration->ignitionPins[3] = Gpio::E3;
engineConfiguration->ignitionPins[4] = GPIOE_2; engineConfiguration->ignitionPins[4] = Gpio::E2;
engineConfiguration->ignitionPins[5] = GPIOI_5; engineConfiguration->ignitionPins[5] = Gpio::I5;
engineConfiguration->ignitionPins[6] = GPIOI_6; engineConfiguration->ignitionPins[6] = Gpio::I6;
engineConfiguration->ignitionPins[7] = GPIOI_7; engineConfiguration->ignitionPins[7] = Gpio::I7;
// disable remainder // disable remainder
for (int i = 8; i < MAX_CYLINDER_COUNT; i++) { for (int i = 8; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -68,11 +68,11 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
engineConfiguration->triggerInputPins[0] = GPIOB_1; engineConfiguration->triggerInputPins[0] = Gpio::B1;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = GPIOA_6; engineConfiguration->camInputs[0] = Gpio::A6;
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4; engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
engineConfiguration->tps1_2AdcChannel = EFI_ADC_8; engineConfiguration->tps1_2AdcChannel = EFI_ADC_8;
@ -96,7 +96,7 @@ static void setHellen128ETBConfig() {
uint8_t variant[2]={0xff,0xff}; uint8_t variant[2]={0xff,0xff};
//same pins as for LPS25 //same pins as for LPS25
m_i2c.init(GPIOB_10, GPIOB_11); m_i2c.init(Gpio::B10, Gpio::B11);
m_i2c.read(0x20, variant, sizeof(variant)); m_i2c.read(0x20, variant, sizeof(variant));
efiPrintf ("BoardID [%02x%02x] ", variant[0],variant[1] ); efiPrintf ("BoardID [%02x%02x] ", variant[0],variant[1] );
@ -117,17 +117,17 @@ static void setHellen128ETBConfig() {
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = H176_OUT_PWM1; engineConfiguration->etbIo[0].disablePin = H176_OUT_PWM1;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
//ETB2 //ETB2
// PWM pin // PWM pin
engineConfiguration->etbIo[1].controlPin = GPIOI_2; engineConfiguration->etbIo[1].controlPin = Gpio::I2;
// DIR pin // DIR pin
engineConfiguration->etbIo[1].directionPin1 = GPIOH_13; engineConfiguration->etbIo[1].directionPin1 = Gpio::H13;
// Disable pin // Disable pin
engineConfiguration->etbIo[1].disablePin = GPIOB_7; engineConfiguration->etbIo[1].disablePin = Gpio::B7;
// Unused // Unused
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
// we only have pwm/dir, no dira/dirb // we only have pwm/dir, no dira/dirb
engineConfiguration->etb_use_two_wires = false; engineConfiguration->etb_use_two_wires = false;
@ -179,10 +179,10 @@ void setBoardDefaultConfiguration() {
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->fuelPumpPin = GPIOD_15; engineConfiguration->fuelPumpPin = Gpio::D15;
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIO_UNASSIGNED; engineConfiguration->mainRelayPin = Gpio::Unassigned;
engineConfiguration->starterControlPin = H176_OUT_IO10; engineConfiguration->starterControlPin = H176_OUT_IO10;
engineConfiguration->startStopButtonPin = H176_IN_A16; engineConfiguration->startStopButtonPin = H176_IN_A16;
@ -216,7 +216,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.24; engineConfiguration->throttlePedalSecondaryWOTVoltage = 4.24;
setHellenDefaultVrThresholds(); setHellenDefaultVrThresholds();
engineConfiguration->vrThreshold[0].pin = GPIOD_14; engineConfiguration->vrThreshold[0].pin = Gpio::D14;
hellenWbo(); hellenWbo();
} }

View File

@ -33,34 +33,34 @@ pins:
#Outputs (via Test Points) #Outputs (via Test Points)
- pin: P19 - pin: P19
# LOW11 IO9 # LOW11 IO9
id: GPIOI_1 id: I1
class: outputs class: outputs
ts_name: P19_OUT_LOW11 ts_name: P19_OUT_LOW11
type: ls type: ls
- pin: P34 - pin: P34
# LOW8 IO6 # LOW8 IO6
id: GPIOH_15 id: H15
class: outputs class: outputs
ts_name: P34_OUT_LOW8 ts_name: P34_OUT_LOW8
- pin: P35 - pin: P35
# LOW12 IO10 # LOW12 IO10
id: GPIOI_0 id: I0
class: outputs class: outputs
ts_name: P35_OUT_LOW9 ts_name: P35_OUT_LOW9
type: ls type: ls
- pin: P33 - pin: P33
# SOLENOID_B2 PWM5 # SOLENOID_B2 PWM5
id: GPIOC_9 id: C9
class: outputs class: outputs
ts_name: P33_PWM5 ts_name: P33_PWM5
type: ls type: ls
- pin: P18 - pin: P18
# OUT_PP2 OUT_IO12 # OUT_PP2 OUT_IO12
id: GPIOA_8 id: A8
class: outputs class: outputs
ts_name: P18_OUT_PP2 ts_name: P18_OUT_PP2
type: ls type: ls
@ -88,7 +88,7 @@ pins:
function: NC function: NC
- pin: A6 - pin: A6
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: A6 - Fan Control ts_name: A6 - Fan Control
function: low side control function: low side control
@ -176,7 +176,7 @@ pins:
function: NC function: NC
- pin: C21 - pin: C21
id: GPIOH_14 id: H14
class: outputs class: outputs
ts_name: C21 - Evap Purge Control ts_name: C21 - Evap Purge Control
function: low side solenoid control function: low side solenoid control
@ -191,13 +191,13 @@ pins:
type: gnd type: gnd
- pin: C24 - pin: C24
id: [GPIOA_3, EFI_ADC_3] id: [A3, EFI_ADC_3]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: C24 - PPS1 ts_name: C24 - PPS1
function: PPS1 analog input function: PPS1 analog input
- pin: C25 - pin: C25
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: C25 - PPS2 ts_name: C25 - PPS2
function: PPS2 analog input function: PPS2 analog input
@ -214,7 +214,7 @@ pins:
function: NC function: NC
- pin: C29 - pin: C29
id: GPIOD_15 id: D15
class: outputs class: outputs
ts_name: C29 - Fuel Pump ts_name: C29 - Fuel Pump
function: low side relay control function: low side relay control
@ -251,7 +251,7 @@ pins:
function: K-line/Lin function: K-line/Lin
- pin: C40 - pin: C40
id: [GPIOF_10] id: [F10]
class: [switch_inputs] class: [switch_inputs]
ts_name: C40 - start button ts_name: C40 - start button
function: Start button function: Start button
@ -329,28 +329,28 @@ pins:
function: Test Point P14 function: Test Point P14
- pin: E1 - pin: E1
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: E1 - LS1 ts_name: E1 - LS1
function: Low-Side Switch 1 function: Low-Side Switch 1
type: inj type: inj
- pin: E2 - pin: E2
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: E2- LS2 ts_name: E2- LS2
function: Low-Side Switch 2 function: Low-Side Switch 2
type: inj type: inj
- pin: E3 - pin: E3
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: E3 - LS3 ts_name: E3 - LS3
function: Low-Side Switch 3 function: Low-Side Switch 3
type: inj type: inj
- pin: E4 - pin: E4
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: E4 - LS4/VVT ts_name: E4 - LS4/VVT
function: "Low-Side Switch 4/ VVT control" function: "Low-Side Switch 4/ VVT control"
@ -381,14 +381,14 @@ pins:
function: Test Point P42 function: Test Point P42
- pin: E13 - pin: E13
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: E13 - INJ 4 ts_name: E13 - INJ 4
function: injector output 4 function: injector output 4
type: inj type: inj
- pin: E14 - pin: E14
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: E14 - INJ 2 ts_name: E14 - INJ 2
function: injector output 2 function: injector output 2
@ -420,7 +420,7 @@ pins:
type: 5v type: 5v
- pin: E23 - pin: E23
id: [GPIOC_1, EFI_ADC_11] id: [C1, EFI_ADC_11]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E23 - MAP ts_name: E23 - MAP
function: analog input MAP function: analog input MAP
@ -432,7 +432,7 @@ pins:
- pin: E25 - pin: E25
# H144_LS_7 # H144_LS_7
id: GPIOF_13 id: F13
class: outputs class: outputs
ts_name: E25 - INJ 1 ts_name: E25 - INJ 1
function: injector output 1 function: injector output 1
@ -440,7 +440,7 @@ pins:
- pin: E26 - pin: E26
# H144_LS_8 # H144_LS_8
id: GPIOF_14 id: F14
class: outputs class: outputs
ts_name: E26 - INJ 3 ts_name: E26 - INJ 3
function: injector output 3 function: injector output 3
@ -454,7 +454,7 @@ pins:
type: gnd type: gnd
- pin: E29 - pin: E29
id: [GPIOC_2, EFI_ADC_12] id: [C2, EFI_ADC_12]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E29 - Coolant Temp ts_name: E29 - Coolant Temp
function: analog input CLT function: analog input CLT
@ -464,7 +464,7 @@ pins:
function: NC function: NC
- pin: E31 - pin: E31
id: [GPIOA_4, EFI_ADC_4] id: [A4, EFI_ADC_4]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E31 - TPS1 ts_name: E31 - TPS1
function: analog input TPS1 function: analog input TPS1
@ -479,7 +479,7 @@ pins:
type: 5v type: 5v
- pin: E34 - pin: E34
id: [GPIOB_0, EFI_ADC_8] id: [B0, EFI_ADC_8]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E34 - TPS2 ts_name: E34 - TPS2
function: analog input TPS2 function: analog input TPS2
@ -492,7 +492,7 @@ pins:
function: NC function: NC
- pin: E37 - pin: E37
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E37 - Crank Input ts_name: E37 - Crank Input
function: VR- function: VR-
@ -507,7 +507,7 @@ pins:
type: gnd type: gnd
- pin: E40 - pin: E40
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E40 - IN_CAM ts_name: E40 - IN_CAM
function: digital input CAM input (Hall) function: digital input CAM input (Hall)
@ -529,7 +529,7 @@ pins:
function: knock2 sensor signal function: knock2 sensor signal
- pin: E45 - pin: E45
id: [GPIOC_3, EFI_ADC_13] id: [C3, EFI_ADC_13]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E45 - IAT ts_name: E45 - IAT
function: analog input IAT function: analog input IAT
@ -540,7 +540,7 @@ pins:
type: 5v type: 5v
- pin: E47 - pin: E47
id: [GPIOC_0, EFI_ADC_10] id: [C0, EFI_ADC_10]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: E47 - MAF ts_name: E47 - MAF
function: analog input function: analog input
@ -562,7 +562,7 @@ pins:
function: NC function: NC
- pin: F4 - pin: F4
id: GPIOE_2 id: E2
class: outputs class: outputs
ts_name: F4 - IGN 5 ts_name: F4 - IGN 5
function: igniter function: igniter
@ -575,7 +575,7 @@ pins:
- pin: F6 - pin: F6
# OUT_IGN3 Q5 # OUT_IGN3 Q5
# used as Coil#2 on M104 # used as Coil#2 on M104
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: F6 - IGN 3 ts_name: F6 - IGN 3
function: igniter function: igniter
@ -590,7 +590,7 @@ pins:
type: gnd type: gnd
- pin: F9 - pin: F9
id: GPIOI_6 id: I6
class: outputs class: outputs
ts_name: F9 - IGN 7 ts_name: F9 - IGN 7
function: igniter function: igniter
@ -601,7 +601,7 @@ pins:
type: ign type: ign
- pin: F11 - pin: F11
id: GPIOI_7 id: I7
class: outputs class: outputs
ts_name: F11 - IGN 8 ts_name: F11 - IGN 8
function: igniter function: igniter
@ -615,7 +615,7 @@ pins:
# OUT_IGN4 Q3 # OUT_IGN4 Q3
# CLK230 # CLK230
# used as Coil#1 on M104 https://github.com/rusefi/rusefi/wiki/1997-e320 # used as Coil#1 on M104 https://github.com/rusefi/rusefi/wiki/1997-e320
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: F13 - IGN 4 ts_name: F13 - IGN 4
function: igniter function: igniter
@ -630,14 +630,14 @@ pins:
type: gnd type: gnd
- pin: F16 - pin: F16
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: F16 - IGN 2 ts_name: F16 - IGN 2
function: igniter function: igniter
type: ign type: ign
- pin: F17 - pin: F17
id: GPIOI_5 id: I5
class: outputs class: outputs
ts_name: F17 - IGN 6 ts_name: F17 - IGN 6
function: igniter function: igniter
@ -655,7 +655,7 @@ pins:
# OUT_IGN1 Q1 # OUT_IGN1 Q1
# CLK230 # CLK230
# Used as coil#3 on M104 # Used as coil#3 on M104
id: GPIOI_8 id: I8
class: outputs class: outputs
ts_name: F20 - IGN 1 ts_name: F20 - IGN 1
function: igniter function: igniter

View File

@ -23,21 +23,21 @@ static void setInjectorPins() {
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = GPIOC_13; engineConfiguration->ignitionPins[0] = Gpio::C13;
engineConfiguration->ignitionPins[1] = GPIOE_5; engineConfiguration->ignitionPins[1] = Gpio::E5;
engineConfiguration->ignitionPins[2] = GPIOE_4; engineConfiguration->ignitionPins[2] = Gpio::E4;
engineConfiguration->ignitionPins[3] = GPIOE_3; engineConfiguration->ignitionPins[3] = Gpio::E3;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -60,8 +60,8 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK; engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = H144_IN_CAM; engineConfiguration->camInputs[0] = H144_IN_CAM;
engineConfiguration->camInputs[1 * CAMS_PER_BANK] = H144_IN_D_AUX4; engineConfiguration->camInputs[1 * CAMS_PER_BANK] = H144_IN_D_AUX4;
@ -110,9 +110,9 @@ void setBoardConfigOverrides() {
if (hellenBoardId == 0) { if (hellenBoardId == 0) {
// first revision of did not have Hellen Board ID // first revision of did not have Hellen Board ID
// https://github.com/rusefi/hellen154hyundai/issues/55 // https://github.com/rusefi/hellen154hyundai/issues/55
engineConfiguration->etbIo[1].directionPin1 = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].directionPin1 = Gpio::Unassigned;
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
engineConfiguration->etbIo[1].controlPin = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].controlPin = Gpio::Unassigned;
if (isFirstInvocation) { if (isFirstInvocation) {
isFirstInvocation = false; isFirstInvocation = false;
@ -153,9 +153,9 @@ void setBoardDefaultConfiguration() {
engineConfiguration->canRxPin = H176_CAN_RX; engineConfiguration->canRxPin = H176_CAN_RX;
engineConfiguration->fuelPumpPin = H144_OUT_IO9; engineConfiguration->fuelPumpPin = H144_OUT_IO9;
// engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5 // engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
// engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 // engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIOG_14; // pin: 111a, OUT_IO3 engineConfiguration->mainRelayPin = Gpio::G14; // pin: 111a, OUT_IO3
engineConfiguration->malfunctionIndicatorPin = H144_OUT_PWM8; engineConfiguration->malfunctionIndicatorPin = H144_OUT_PWM8;
engineConfiguration->brakePedalPin = H144_IN_RES3; engineConfiguration->brakePedalPin = H144_IN_RES3;

View File

@ -3,19 +3,19 @@
pins: pins:
- pin: P66 - pin: P66
# LOW3 IO1 # LOW3 IO1
id: GPIOD_3 id: D3
class: outputs class: outputs
ts_name: Aux P66 ts_name: Aux P66
- pin: P67 - pin: P67
# LOW4 IO2 # LOW4 IO2
id: GPIOA_9 id: A9
class: outputs class: outputs
ts_name: Aux P67 ts_name: Aux P67
- pin: P68 - pin: P68
# LOW6 IO4 # LOW6 IO4
id: GPIOG_5 id: G5
class: outputs class: outputs
ts_name: Aux P68 ts_name: Aux P68
@ -66,7 +66,7 @@ pins:
- pin: K15 - pin: K15
# cam2 IN_AUX4 # cam2 IN_AUX4
id: [GPIOA_7] id: [A7]
function: Cam Sensor function: Cam Sensor
class: [event_inputs] class: [event_inputs]
ts_name: Cam - K15 ts_name: Cam - K15
@ -78,7 +78,7 @@ pins:
- pin: K17 - pin: K17
function: Crank Sensor function: Crank Sensor
# IN_CRANK AIN24 A24 # IN_CRANK AIN24 A24
id: [GPIOB_1] id: [B1]
class: [event_inputs] class: [event_inputs]
ts_name: Crank - K17 ts_name: Crank - K17
@ -93,28 +93,28 @@ pins:
ts_name: BK2 Wastegate Position - 22 ts_name: BK2 Wastegate Position - 22
- pin: K25 - pin: K25
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: INJ_1 k25 ts_name: INJ_1 k25
function: Injector 1 function: Injector 1
type: inj type: inj
- pin: K26 - pin: K26
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: INJ_2 k26 ts_name: INJ_2 k26
function: Injector 2 function: Injector 2
type: inj type: inj
- pin: K27 - pin: K27
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: INJ_3 k27 ts_name: INJ_3 k27
function: Injector 3 function: Injector 3
type: inj type: inj
- pin: K28 - pin: K28
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: INJ_4 k28 ts_name: INJ_4 k28
function: Injector 4 function: Injector 4
@ -167,7 +167,7 @@ pins:
- pin: K40 - pin: K40
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: K40 VSS ts_name: K40 VSS
function: Vehicle Speed Sensor function: Vehicle Speed Sensor
@ -181,7 +181,7 @@ pins:
- pin: K47 - pin: K47
# H144_LS_7 # H144_LS_7
id: GPIOF_13 id: F13
class: outputs class: outputs
ts_name: K48 BK1 Wastegate Solenoid ts_name: K48 BK1 Wastegate Solenoid
function: BK1 Wastegate Solenoid function: BK1 Wastegate Solenoid
@ -215,7 +215,7 @@ pins:
- pin: K62 - pin: K62
# cam1 IN_CAM # cam1 IN_CAM
id: [GPIOA_6] id: [A6]
function: Cam Sensor function: Cam Sensor
class: [event_inputs] class: [event_inputs]
ts_name: Cam - K62 ts_name: Cam - K62
@ -226,7 +226,7 @@ pins:
- pin: K64 - pin: K64
# H144_OUT_IO3 # H144_OUT_IO3
id: GPIOG_14 id: G14
class: outputs class: outputs
ts_name: Main Relay K64 ts_name: Main Relay K64
function: Main relay control function: Main relay control
@ -234,21 +234,21 @@ pins:
- pin: K65 - pin: K65
# H144_OUT_IO7 # H144_OUT_IO7
id: GPIOG_3 id: G3
class: outputs class: outputs
ts_name: Fan Relay Low ts_name: Fan Relay Low
function: Fan relay low function: Fan relay low
- pin: K65 - pin: K65
# H144_LS_5 # H144_LS_5
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: VVT1 ts_name: VVT1
function: VVT1 function: VVT1
- pin: K68 - pin: K68
# H144_LS_6 # H144_LS_6
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: VVT2 ts_name: VVT2
function: VVT2 function: VVT2
@ -256,7 +256,7 @@ pins:
- pin: K70 - pin: K70
# H144_OUT_IO9 # H144_OUT_IO9
id: GPIOG_13 id: G13
class: outputs class: outputs
ts_name: Fuel Pump K70 ts_name: Fuel Pump K70
function: Fuel Pump Relay function: Fuel Pump Relay
@ -299,14 +299,14 @@ pins:
- pin: K86 - pin: K86
# H144_OUT_PWM7 # H144_OUT_PWM7
id: GPIOD_15 id: D15
class: outputs class: outputs
ts_name: Tacho ts_name: Tacho
function: Tachometer function: Tachometer
- pin: K87 - pin: K87
# H144_OUT_IO10 # H144_OUT_IO10
id: GPIOG_12 id: G12
class: outputs class: outputs
ts_name: K87 AC Relay ts_name: K87 AC Relay
function: A/C Relay function: A/C Relay
@ -314,20 +314,20 @@ pins:
- pin: K88 - pin: K88
# H144_OUT_IO8 # H144_OUT_IO8
id: GPIOG_4 id: G4
class: outputs class: outputs
ts_name: Fan Relay HI ts_name: Fan Relay HI
function: Fan relay high function: Fan relay high
- pin: K92 - pin: K92
# H144_OUT_PWM8 # H144_OUT_PWM8
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: MIL ts_name: MIL
function: Check Engine Light function: Check Engine Light
- pin: A1 - pin: A1
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: Coil 4 ts_name: Coil 4
function: Coil 4 function: Coil 4
@ -340,7 +340,7 @@ pins:
function: Ground function: Ground
- pin: A16 - pin: A16
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: Coil 2 ts_name: Coil 2
function: Coil 2 function: Coil 2
@ -348,14 +348,14 @@ pins:
- pin: A29 - pin: A29
# H144_IN_RES3 # H144_IN_RES3
id: GPIOF_8 id: F8
class: switch_inputs class: switch_inputs
ts_name: A29 Brake Input ts_name: A29 Brake Input
function: Brake Switch function: Brake Switch
- pin: A31 - pin: A31
id: GPIOC_13 id: C13
class: outputs class: outputs
ts_name: Coil 1 ts_name: Coil 1
function: Coil 1 function: Coil 1
@ -363,7 +363,7 @@ pins:
- pin: A43 - pin: A43
# H144_IN_RES2 # H144_IN_RES2
id: GPIOF_10 id: F10
class: switch_inputs class: switch_inputs
ts_name: A43 Clutch Input ts_name: A43 Clutch Input
function: Clutch Input function: Clutch Input
@ -372,7 +372,7 @@ pins:
function: BK2 DC Wastegate Pos function: BK2 DC Wastegate Pos
- pin: A46 - pin: A46
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: Coil 3 ts_name: Coil 3
function: Coil 3 function: Coil 3
@ -380,7 +380,7 @@ pins:
- pin: A57 - pin: A57
# H144_IN_RES1 # H144_IN_RES1
id: GPIOF_9 id: F9
class: switch_inputs class: switch_inputs
ts_name: A57 AC Request ts_name: A57 AC Request
function: AC Request Switch function: AC Request Switch

View File

@ -9,7 +9,7 @@
// knock 1 - pin PF7 // knock 1 - pin PF7
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5 #define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
#define KNOCK_PIN_CH1 GPIOF_7 #define KNOCK_PIN_CH1 Gpio::F7
// Sample rate & time - depends on the exact MCU // Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 #define KNOCK_SAMPLE_TIME ADC_SAMPLE_84

View File

@ -33,8 +33,8 @@
#define BOARD_NAME "HellenNA6" #define BOARD_NAME "HellenNA6"
#define EFI_USB_AF 10U #define EFI_USB_AF 10U
#define EFI_USB_SERIAL_DM GPIOA_11 #define EFI_USB_SERIAL_DM Gpio::A11
#define EFI_USB_SERIAL_DP GPIOA_12 #define EFI_USB_SERIAL_DP Gpio::A12
// Ignore USB VBUS pin (we're never a host, only a device) // Ignore USB VBUS pin (we're never a host, only a device)
#define BOARD_OTG_NOVBUSSENS TRUE #define BOARD_OTG_NOVBUSSENS TRUE

View File

@ -16,37 +16,37 @@
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = H176_LS_1; engineConfiguration->injectionPins[0] = H176_LS_1;
engineConfiguration->injectionPins[1] = GPIOG_8; engineConfiguration->injectionPins[1] = Gpio::G8;
engineConfiguration->injectionPins[2] = GPIOD_11; engineConfiguration->injectionPins[2] = Gpio::D11;
engineConfiguration->injectionPins[3] = GPIOD_10; engineConfiguration->injectionPins[3] = Gpio::D10;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->clutchDownPin = GPIOC_4; // Clutch switch input engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = GPIOI_8; // 3F - IGN_1 (1&4) engineConfiguration->ignitionPins[0] = Gpio::I8; // 3F - IGN_1 (1&4)
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED ; // GPIOE_4 engineConfiguration->ignitionPins[1] = Gpio::Unassigned ; // Gpio::E4
engineConfiguration->ignitionPins[2] = GPIOE_5; // 3I - IGN_2 (2&3) engineConfiguration->ignitionPins[2] = Gpio::E5; // 3I - IGN_2 (2&3)
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; // GPIOE_3 engineConfiguration->ignitionPins[3] = Gpio::Unassigned; // Gpio::E3
//engineConfiguration->ignitionPins[4] = GPIOE_2; //engineConfiguration->ignitionPins[4] = Gpio::E2;
//engineConfiguration->ignitionPins[5] = GPIOI_5; //engineConfiguration->ignitionPins[5] = Gpio::I5;
//engineConfiguration->ignitionPins[6] = GPIOI_6; //engineConfiguration->ignitionPins[6] = Gpio::I6;
//engineConfiguration->ignitionPins[7] = GPIOI_7; //engineConfiguration->ignitionPins[7] = Gpio::I7;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -68,10 +68,10 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs, hall // trigger inputs, hall
engineConfiguration->triggerInputPins[0] = GPIOA_6; engineConfiguration->triggerInputPins[0] = Gpio::A6;
engineConfiguration->triggerInputPins[1] = GPIOB_1; engineConfiguration->triggerInputPins[1] = Gpio::B1;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; engineConfiguration->camInputs[0] = Gpio::Unassigned;
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4; engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE; engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
@ -126,13 +126,13 @@ void setBoardDefaultConfiguration() {
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
// these stm32 pins do not match hellen_meta, is that because hellenNA6 is not using latest MCU version? // these stm32 pins do not match hellen_meta, is that because hellenNA6 is not using latest MCU version?
engineConfiguration->acRelayPin = GPIOH_15; // 1J - AC Relay engineConfiguration->acRelayPin = Gpio::H15; // 1J - AC Relay
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9 engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5 engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3 engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
engineConfiguration->tachOutputPin = GPIOI_0; engineConfiguration->tachOutputPin = Gpio::I0;
engineConfiguration->malfunctionIndicatorPin = GPIOG_9; engineConfiguration->malfunctionIndicatorPin = Gpio::G9;
engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS; engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS;
@ -154,14 +154,14 @@ void setBoardDefaultConfiguration() {
void setSdCardConfigurationOverrides() { void setSdCardConfigurationOverrides() {
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->sdCardCsPin = GPIOA_15; engineConfiguration->sdCardCsPin = Gpio::A15;
// engineConfiguration->spi2mosiPin = GPIOB_15; // engineConfiguration->spi2mosiPin = Gpio::B15;
// engineConfiguration->spi2misoPin = GPIOB_14; // engineConfiguration->spi2misoPin = Gpio::B14;
// engineConfiguration->spi2sckPin = GPIOB_13; // engineConfiguration->spi2sckPin = Gpio::B13;
// engineConfiguration->sdCardCsPin = GPIOB_12; // engineConfiguration->sdCardCsPin = Gpio::B12;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
} }

View File

@ -24,20 +24,20 @@ pins:
type: can type: can
- pin: 1E - pin: 1E
id: GPIOG_9 id: G9
class: outputs class: outputs
ts_name: 1E - Check Engine Light ts_name: 1E - Check Engine Light
function: Check Engine Light function: Check Engine Light
type: ls type: ls
- pin: 1G - pin: 1G
id: GPIOI_8 id: I8
class: outputs class: outputs
ts_name: 1G - Ignition 1 & 4 ts_name: 1G - Ignition 1 & 4
type: ign type: ign
- pin: 1H - pin: 1H
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 1H - Ignition 2 & 3 ts_name: 1H - Ignition 2 & 3
type: ign type: ign
@ -47,14 +47,14 @@ pins:
type: gnd type: gnd
- pin: 1J - pin: 1J
id: GPIOH_15 id: H15
class: outputs class: outputs
ts_name: 1J - AC Relay ts_name: 1J - AC Relay
function: A/C Relay function: A/C Relay
type: ls type: ls
- pin: 1L - pin: 1L
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: Radiator Fan ts_name: Radiator Fan
function: Radiator Fan Relay function: Radiator Fan Relay
@ -62,7 +62,7 @@ pins:
- pin: 1M - pin: 1M
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: 1M - VSS ts_name: 1M - VSS
function: VSS IN function: VSS IN
@ -72,7 +72,7 @@ pins:
function: Sensor +5V function: Sensor +5V
- pin: 1Q - pin: 1Q
id: [GPIOC_5, EFI_ADC_15] id: [C5, EFI_ADC_15]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 1Q AC Switch ts_name: 1Q AC Switch
function: A/C switch input function: A/C switch input
@ -90,7 +90,7 @@ pins:
function: EGR Solenoid function: EGR Solenoid
- pin: 1V - pin: 1V
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 1V - Clutch Switch ts_name: 1V - Clutch Switch
function: Clutch switch input function: Clutch switch input
@ -121,14 +121,14 @@ pins:
function: WBO Vs function: WBO Vs
- pin: 2I - pin: 2I
id: GPIOF_14 id: F14
class: outputs class: outputs
ts_name: 2I - VVT ts_name: 2I - VVT
function: VVT Output function: VVT Output
type: ls type: ls
- pin: 2J - pin: 2J
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: 2J - Boost Control ts_name: 2J - Boost Control
function: Boost Control Solenoid function: Boost Control Solenoid
@ -137,19 +137,19 @@ pins:
function: GND function: GND
- pin: 2L - pin: 2L
id: GPIOF_3 id: F3
class: event_inputs class: event_inputs
ts_name: 2L - Flex Fuel ts_name: 2L - Flex Fuel
function: Flex Fuel Input function: Flex Fuel Input
- pin: 2M - pin: 2M
id: [GPIOC_1, EFI_ADC_11] id: [C1, EFI_ADC_11]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 2M - Pressure Sensor ts_name: 2M - Pressure Sensor
function: pressure input function: pressure input
- pin: 2N - pin: 2N
id: [GPIOA_1, EFI_ADC_1] id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 2N - Temperature Sensor ts_name: 2N - Temperature Sensor
function: temp input function: temp input
@ -181,7 +181,7 @@ pins:
color: white color: white
- pin: 3E - pin: 3E
id: GPIOB_1 id: B1
class: event_inputs class: event_inputs
ts_name: 3E - CRANK ts_name: 3E - CRANK
function: Crankshaft Sensor function: Crankshaft Sensor
@ -192,13 +192,13 @@ pins:
color: white color: white
- pin: 3G - pin: 3G
id: GPIOA_6 id: A6
class: event_inputs class: event_inputs
ts_name: 3G - CAM ts_name: 3G - CAM
function: Camshaft Sensor function: Camshaft Sensor
- pin: 3I - pin: 3I
id: GPIOI_0 id: I0
class: outputs class: outputs
ts_name: Tachometer ts_name: Tachometer
function: tachometer function: tachometer
@ -230,13 +230,13 @@ pins:
function: IAT sensor function: IAT sensor
- pin: 3S - pin: 3S
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: 3S - A/C Fan 94-95 ts_name: 3S - A/C Fan 94-95
function: A/C Fan function: A/C Fan
- pin: 3T - pin: 3T
id: GPIOG_2 id: G2
class: outputs class: outputs
ts_name: Fuel Pump Relay ts_name: Fuel Pump Relay
function: Fuel Pump Relay function: Fuel Pump Relay
@ -255,35 +255,35 @@ pins:
function: CLT sensor function: CLT sensor
- pin: 3U - pin: 3U
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: 3U - Injector 1 ts_name: 3U - Injector 1
function: Injector #1 function: Injector #1
type: inj type: inj
- pin: 3V - pin: 3V
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: 3V - Injector 2 ts_name: 3V - Injector 2
function: Injector #2 function: Injector #2
type: inj type: inj
- pin: 3W - pin: 3W
id: GPIOD_14 id: D14
class: outputs class: outputs
ts_name: 3W - IDLE ts_name: 3W - IDLE
function: IAC idle function: IAC idle
type: ls type: ls
- pin: 3Y - pin: 3Y
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: 3Y - Injector 3 ts_name: 3Y - Injector 3
function: Injector #3 function: Injector #3
type: inj type: inj
- pin: 3Z - pin: 3Z
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: 3Z - Injector 4 ts_name: 3Z - Injector 4
function: Injector #4 function: Injector #4

View File

@ -9,7 +9,7 @@
// knock 1 - pin PF7 // knock 1 - pin PF7
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5 #define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
#define KNOCK_PIN_CH1 GPIOF_7 #define KNOCK_PIN_CH1 Gpio::F7
// Sample rate & time - depends on the exact MCU // Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 #define KNOCK_SAMPLE_TIME ADC_SAMPLE_84

View File

@ -33,8 +33,8 @@
#define BOARD_NAME "Hellen72" #define BOARD_NAME "Hellen72"
#define EFI_USB_AF 10U #define EFI_USB_AF 10U
#define EFI_USB_SERIAL_DM GPIOA_11 #define EFI_USB_SERIAL_DM Gpio::A11
#define EFI_USB_SERIAL_DP GPIOA_12 #define EFI_USB_SERIAL_DP Gpio::A12
// Ignore USB VBUS pin (we're never a host, only a device) // Ignore USB VBUS pin (we're never a host, only a device)
#define BOARD_OTG_NOVBUSSENS TRUE #define BOARD_OTG_NOVBUSSENS TRUE

View File

@ -15,38 +15,38 @@
#include "hellen_meta.h" #include "hellen_meta.h"
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = GPIOG_7; engineConfiguration->injectionPins[0] = Gpio::G7;
engineConfiguration->injectionPins[1] = GPIOG_8; engineConfiguration->injectionPins[1] = Gpio::G8;
engineConfiguration->injectionPins[2] = GPIOD_11; engineConfiguration->injectionPins[2] = Gpio::D11;
engineConfiguration->injectionPins[3] = GPIOD_10; engineConfiguration->injectionPins[3] = Gpio::D10;
//engineConfiguration->injectionPins[4] = GPIOD_9; //engineConfiguration->injectionPins[4] = Gpio::D9;
//engineConfiguration->injectionPins[5] = GPIOF_12; //engineConfiguration->injectionPins[5] = Gpio::F12;
//engineConfiguration->injectionPins[6] = GPIOF_13; //engineConfiguration->injectionPins[6] = Gpio::F13;
//engineConfiguration->injectionPins[7] = GPIOF_14; //engineConfiguration->injectionPins[7] = Gpio::F14;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = GPIOI_8; // 3F - IGN_1 (1&4) engineConfiguration->ignitionPins[0] = Gpio::I8; // 3F - IGN_1 (1&4)
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED ; // GPIOE_4 engineConfiguration->ignitionPins[1] = Gpio::Unassigned ; // Gpio::E4
engineConfiguration->ignitionPins[2] = GPIOE_5; // 3I - IGN_2 (2&3) engineConfiguration->ignitionPins[2] = Gpio::E5; // 3I - IGN_2 (2&3)
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; // GPIOE_3 engineConfiguration->ignitionPins[3] = Gpio::Unassigned; // Gpio::E3
//engineConfiguration->ignitionPins[4] = GPIOE_2; //engineConfiguration->ignitionPins[4] = Gpio::E2;
//engineConfiguration->ignitionPins[5] = GPIOI_5; //engineConfiguration->ignitionPins[5] = Gpio::I5;
//engineConfiguration->ignitionPins[6] = GPIOI_6; //engineConfiguration->ignitionPins[6] = Gpio::I6;
//engineConfiguration->ignitionPins[7] = GPIOI_7; //engineConfiguration->ignitionPins[7] = Gpio::I7;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -68,11 +68,11 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
engineConfiguration->triggerInputPins[0] = GPIOB_1; engineConfiguration->triggerInputPins[0] = Gpio::B1;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = GPIOA_6; engineConfiguration->camInputs[0] = Gpio::A6;
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4; engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE; engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
@ -98,8 +98,8 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
@ -126,24 +126,24 @@ void setBoardDefaultConfiguration() {
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->acRelayPin = GPIOH_15; engineConfiguration->acRelayPin = Gpio::H15;
engineConfiguration->acSwitch = GPIOB_0; engineConfiguration->acSwitch = Gpio::B0;
engineConfiguration->acSwitchMode = PI_PULLUP; engineConfiguration->acSwitchMode = PI_PULLUP;
engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS; engineConfiguration->vehicleSpeedSensorInputPin = H144_IN_VSS;
engineConfiguration->clutchDownPin = H144_IN_RES3; engineConfiguration->clutchDownPin = H144_IN_RES3;
engineConfiguration->clutchDownPinInverted = true; engineConfiguration->clutchDownPinInverted = true;
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9 engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5 engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->fan2Pin = GPIOD_9; engineConfiguration->fan2Pin = Gpio::D9;
engineConfiguration->enableFan2WithAc = true; engineConfiguration->enableFan2WithAc = true;
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3 engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
engineConfiguration->vvtPins[0] = GPIOI_0; // 4R - VVT (O5) engineConfiguration->vvtPins[0] = Gpio::I0; // 4R - VVT (O5)
engineConfiguration->tachOutputPin = GPIOD_13; // 3O - TACH (PWM7) engineConfiguration->tachOutputPin = Gpio::D13; // 3O - TACH (PWM7)
engineConfiguration->alternatorControlPin = GPIOD_15; // 3M - ALTERN (PWM6) engineConfiguration->alternatorControlPin = Gpio::D15; // 3M - ALTERN (PWM6)
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
@ -166,14 +166,14 @@ void setBoardDefaultConfiguration() {
void setSdCardConfigurationOverrides() { void setSdCardConfigurationOverrides() {
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->sdCardCsPin = GPIOA_15; engineConfiguration->sdCardCsPin = Gpio::A15;
// engineConfiguration->spi2mosiPin = GPIOB_15; // engineConfiguration->spi2mosiPin = Gpio::B15;
// engineConfiguration->spi2misoPin = GPIOB_14; // engineConfiguration->spi2misoPin = Gpio::B14;
// engineConfiguration->spi2sckPin = GPIOB_13; // engineConfiguration->spi2sckPin = Gpio::B13;
// engineConfiguration->sdCardCsPin = GPIOB_12; // engineConfiguration->sdCardCsPin = Gpio::B12;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
} }

View File

@ -6,7 +6,7 @@
pins: pins:
- pin: 2A - pin: 2A
# INJ1 Q312 # INJ1 Q312
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: 2A - INJ_1 ts_name: 2A - INJ_1
function: Injector #1 function: Injector #1
@ -14,7 +14,7 @@ pins:
color: orange Y1 color: orange Y1
- pin: 2B - pin: 2B
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: 2B - ECF (PWM8) ts_name: 2B - ECF (PWM8)
function: Engine Radiator Fan function: Engine Radiator Fan
@ -22,7 +22,7 @@ pins:
type: ls type: ls
- pin: 2C - pin: 2C
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: 2C - AC Fan / INJ_5 ts_name: 2C - AC Fan / INJ_5
function: AC Radiator fan function: AC Radiator fan
@ -30,7 +30,7 @@ pins:
- pin: 2D - pin: 2D
#INJ2 Q305 #INJ2 Q305
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: 2D - INJ_2 ts_name: 2D - INJ_2
function: Injector #2 function: Injector #2
@ -38,14 +38,14 @@ pins:
color: blue Y1 color: blue Y1
- pin: 2E - pin: 2E
id: GPIOC_7 id: C7
class: outputs class: outputs
ts_name: 2E - COIL_A2 (PWM2) ts_name: 2E - COIL_A2 (PWM2)
function: EGR Valve #1 Coil function: EGR Valve #1 Coil
type: ls type: ls
- pin: 2F - pin: 2F
id: GPIOC_6 id: C6
class: outputs class: outputs
ts_name: 2E - COIL_A1 (PWM1) ts_name: 2E - COIL_A1 (PWM1)
function: EGR Valve #2 Coil function: EGR Valve #2 Coil
@ -53,7 +53,7 @@ pins:
- pin: 2G - pin: 2G
#INJ3 Q309 #INJ3 Q309
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: 2G - INJ_3 ts_name: 2G - INJ_3
function: Injector #3 function: Injector #3
@ -61,14 +61,14 @@ pins:
color: white Y1 color: white Y1
- pin: 2H - pin: 2H
id: GPIOC_9 id: C9
class: outputs class: outputs
ts_name: 2H - COIL_B2 (PWM4) ts_name: 2H - COIL_B2 (PWM4)
function: EGR Valve #3 Coil function: EGR Valve #3 Coil
type: ls type: ls
- pin: 2I - pin: 2I
id: GPIOC_8 id: C8
class: outputs class: outputs
ts_name: 2I - COIL_B1 (PWM3) ts_name: 2I - COIL_B1 (PWM3)
function: EGR Valve #4 Coil function: EGR Valve #4 Coil
@ -76,7 +76,7 @@ pins:
- pin: 2J - pin: 2J
#INJ4 Q310 #INJ4 Q310
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: 2J - INJ_4 ts_name: 2J - INJ_4
function: Injector #4 function: Injector #4
@ -84,14 +84,14 @@ pins:
color: green Y1 color: green Y1
- pin: 2K - pin: 2K
id: GPIOH_15 id: H15
class: outputs class: outputs
ts_name: 2K - AC (O4) ts_name: 2K - AC (O4)
function: A/C Relay function: A/C Relay
type: ls type: ls
- pin: 2M - pin: 2M
id: GPIOG_2 id: G2
class: outputs class: outputs
ts_name: 2M - FPUMP (O9) ts_name: 2M - FPUMP (O9)
function: Fuel Pump Relay function: Fuel Pump Relay
@ -99,14 +99,14 @@ pins:
color: red B4 color: red B4
- pin: 2N - pin: 2N
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: 2N - VTSC / INJ_6 ts_name: 2N - VTSC / INJ_6
function: VTCS Control function: VTCS Control
type: inj type: inj
- pin: 2O - pin: 2O
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: 2O - IGN_3 ts_name: 2O - IGN_3
type: ign type: ign
@ -116,7 +116,7 @@ pins:
color: red, short wire color: red, short wire
- pin: 2Q - pin: 2Q
id: GPIOD_14 id: D14
class: outputs class: outputs
ts_name: 2Q - IDLE (PWM5) ts_name: 2Q - IDLE (PWM5)
function: IAC (negative) idle, with diode function: IAC (negative) idle, with diode
@ -124,7 +124,7 @@ pins:
color: blue B4 color: blue B4
- pin: 2R - pin: 2R
id: GPIOG_4 id: G4
class: outputs class: outputs
ts_name: 2R - CE (O11) ts_name: 2R - CE (O11)
function: MIL Control function: MIL Control
@ -142,28 +142,28 @@ pins:
color: black W4, sliced for MAP color: black W4, sliced for MAP
- pin: 3C - pin: 3C
id: GPIOF_13 id: F13
class: outputs class: outputs
ts_name: 3C - Purge Solenoid / INJ_7 ts_name: 3C - Purge Solenoid / INJ_7
function: Purge Control Solenoid function: Purge Control Solenoid
type: inj type: inj
- pin: 3D - pin: 3D
id: GPIOF_14 id: F14
class: outputs class: outputs
ts_name: 3D - EGR Solenoid / INJ_8 ts_name: 3D - EGR Solenoid / INJ_8
function: EGR Boost sens. sol. function: EGR Boost sens. sol.
type: inj type: inj
- pin: 3E - pin: 3E
id: GPIOG_3 id: G3
class: outputs class: outputs
ts_name: 3E - CANIST (O10) ts_name: 3E - CANIST (O10)
function: CDCV (EVAP canister purge valve) Control function: CDCV (EVAP canister purge valve) Control
type: ls type: ls
- pin: 3F - pin: 3F
id: GPIOI_8 id: I8
class: outputs class: outputs
ts_name: 3F - IGN_1 (1&4) ts_name: 3F - IGN_1 (1&4)
function: Coil #1 function: Coil #1
@ -171,7 +171,7 @@ pins:
color: white B4 color: white B4
- pin: 3H - pin: 3H
id: GPIOI_2 id: I2
class: outputs class: outputs
ts_name: 3H - MAIN (O1) ts_name: 3H - MAIN (O1)
function: Main relay control function: Main relay control
@ -179,7 +179,7 @@ pins:
color: white or red, R5 color: white or red, R5
- pin: 3I - pin: 3I
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 3I - IGN_2 (2&3) ts_name: 3I - IGN_2 (2&3)
function: Coil #2 function: Coil #2
@ -187,7 +187,7 @@ pins:
color: orange B4 color: orange B4
- pin: 3J - pin: 3J
id: GPIOH_14 id: H14
class: outputs class: outputs
ts_name: 3J - O2H (O3) ts_name: 3J - O2H (O3)
function: Front O2 sens. heater GND function: Front O2 sens. heater GND
@ -197,13 +197,13 @@ pins:
function: NC function: NC
- pin: 3L - pin: 3L
id: [GPIOI_6, EFI_ADC_1] id: [I6, EFI_ADC_1]
class: [outputs, analog_inputs] class: [outputs, analog_inputs]
ts_name: 3L - IGN_7 / AFR ts_name: 3L - IGN_7 / AFR
type: ign type: ign
- pin: 3M - pin: 3M
id: GPIOD_15 id: D15
class: outputs class: outputs
ts_name: 3M - ALTERN (PWM6) ts_name: 3M - ALTERN (PWM6)
function: PWM signal to control alternator field voltage function: PWM signal to control alternator field voltage
@ -211,13 +211,13 @@ pins:
color: orange R5 color: orange R5
- pin: 3N - pin: 3N
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: 3N - IGN_4 ts_name: 3N - IGN_4
type: ign type: ign
- pin: 3O - pin: 3O
id: GPIOD_13 id: D13
class: outputs class: outputs
ts_name: 3O - TACH (PWM7) ts_name: 3O - TACH (PWM7)
function: Tach Out function: Tach Out
@ -225,7 +225,7 @@ pins:
color: green B4 color: green B4
- pin: 3P - pin: 3P
id: GPIOA_9 id: A9
class: outputs class: outputs
ts_name: 3P - O2H2 (O7) ts_name: 3P - O2H2 (O7)
function: Rear O2 sensor heater function: Rear O2 sensor heater
@ -239,21 +239,21 @@ pins:
- pin: 3T - pin: 3T
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: 3T - VSS (D5) ts_name: 3T - VSS (D5)
function: VSS in function: VSS in
color: blue W3 color: blue W3
- pin: 3U - pin: 3U
id: GPIOH_13 id: H13
class: outputs class: outputs
ts_name: 3U - AWARN (O2) ts_name: 3U - AWARN (O2)
function: Alternator Warning Light function: Alternator Warning Light
type: ls type: ls
- pin: 3V - pin: 3V
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 3V - CAM (A19) ts_name: 3V - CAM (A19)
function: Camshaft Sensor function: Camshaft Sensor
@ -266,14 +266,14 @@ pins:
function: NC function: NC
- pin: 3Y - pin: 3Y
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 3Y - CRANK (A24) ts_name: 3Y - CRANK (A24)
function: Crankshaft Sensor function: Crankshaft Sensor
color: white W3 color: white W3
- pin: 3Z - pin: 3Z
id: GPIOE_2 id: E2
class: outputs class: outputs
ts_name: 3Z - IGN_5 / GNDA ts_name: 3Z - IGN_5 / GNDA
type: ign type: ign
@ -284,13 +284,13 @@ pins:
color: black W4 color: black W4
- pin: 4B - pin: 4B
id: [GPIOF_9, ADC3_CHANNEL_7] id: [F9, ADC3_CHANNEL_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 4B - Brake/RES1 (A7) ts_name: 4B - Brake/RES1 (A7)
function: Brake Switch function: Brake Switch
- pin: 4C - pin: 4C
id: [GPIOF_10, EFI_ADC_3] id: [F10, EFI_ADC_3]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 4C - Steering/RES2 (A16) ts_name: 4C - Steering/RES2 (A16)
function: Power Steering Switch function: Power Steering Switch
@ -302,32 +302,32 @@ pins:
function: DTM switching (Diagnostic Terminal?) function: DTM switching (Diagnostic Terminal?)
- pin: 4F - pin: 4F
id: [GPIOB_0, EFI_ADC_8] id: [B0, EFI_ADC_8]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 4F - AC_PRES/AUX1 (A23) ts_name: 4F - AC_PRES/AUX1 (A23)
function: A/C Pressure In function: A/C Pressure In
- pin: 4H - pin: 4H
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 4H - Neutral/AUX2 (A21) ts_name: 4H - Neutral/AUX2 (A21)
function: Neutral Switch function: Neutral Switch
- pin: 4I - pin: 4I
# H144_IN_RES3 # H144_IN_RES3
id: GPIOF_8 id: F8
class: switch_inputs class: switch_inputs
ts_name: 4I - Clutch (A8) ts_name: 4I - Clutch (A8)
function: Clutch Switch function: Clutch Switch
- pin: 4J - pin: 4J
id: [GPIOA_7, EFI_ADC_7] id: [A7, EFI_ADC_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 4J - VTCS/AUX4 (A20) ts_name: 4J - VTCS/AUX4 (A20)
function: VTCS ca. switch function: VTCS ca. switch
- pin: 4K - pin: 4K
id: GPIOI_5 id: I5
class: outputs class: outputs
ts_name: 4K - IGN_6 / +5V_MAP ts_name: 4K - IGN_6 / +5V_MAP
type: ign type: ign
@ -369,7 +369,7 @@ pins:
function: NC function: NC
- pin: 4R - pin: 4R
id: GPIOI_0 id: I0
class: outputs class: outputs
ts_name: 4R - VVT (O5) ts_name: 4R - VVT (O5)
function: VVT Oil Control Valve neg. function: VVT Oil Control Valve neg.
@ -398,7 +398,7 @@ pins:
function: Alternator output voltage function: Alternator output voltage
- pin: 4U - pin: 4U
id: [GPIOI_7, EFI_ADC_11] id: [I7, EFI_ADC_11]
class: [outputs, analog_inputs] class: [outputs, analog_inputs]
ts_name: 4U - MAP2/Ign8 (A10) ts_name: 4U - MAP2/Ign8 (A10)
function: NC, extra main relay for diode function: NC, extra main relay for diode

View File

@ -9,7 +9,7 @@
// knock 1 - pin PF7 // knock 1 - pin PF7
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5 #define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
#define KNOCK_PIN_CH1 GPIOF_7 #define KNOCK_PIN_CH1 Gpio::F7
// Sample rate & time - depends on the exact MCU // Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 #define KNOCK_SAMPLE_TIME ADC_SAMPLE_84

View File

@ -33,8 +33,8 @@
#define BOARD_NAME "Hellen81" #define BOARD_NAME "Hellen81"
#define EFI_USB_AF 10U #define EFI_USB_AF 10U
#define EFI_USB_SERIAL_DM GPIOA_11 #define EFI_USB_SERIAL_DM Gpio::A11
#define EFI_USB_SERIAL_DP GPIOA_12 #define EFI_USB_SERIAL_DP Gpio::A12
// Ignore USB VBUS pin (we're never a host, only a device) // Ignore USB VBUS pin (we're never a host, only a device)
#define BOARD_OTG_NOVBUSSENS TRUE #define BOARD_OTG_NOVBUSSENS TRUE

View File

@ -14,33 +14,33 @@
#include "hellen_meta.h" #include "hellen_meta.h"
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = GPIOG_7; engineConfiguration->injectionPins[0] = Gpio::G7;
engineConfiguration->injectionPins[1] = GPIOG_8; engineConfiguration->injectionPins[1] = Gpio::G8;
engineConfiguration->injectionPins[2] = GPIOD_11; engineConfiguration->injectionPins[2] = Gpio::D11;
engineConfiguration->injectionPins[3] = GPIOD_10; engineConfiguration->injectionPins[3] = Gpio::D10;
//engineConfiguration->injectionPins[4] = GPIOD_9; //engineConfiguration->injectionPins[4] = Gpio::D9;
//engineConfiguration->injectionPins[5] = GPIOF_12; //engineConfiguration->injectionPins[5] = Gpio::F12;
//engineConfiguration->injectionPins[6] = GPIOF_13; //engineConfiguration->injectionPins[6] = Gpio::F13;
//engineConfiguration->injectionPins[7] = GPIOF_14; //engineConfiguration->injectionPins[7] = Gpio::F14;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = GPIOI_8; engineConfiguration->ignitionPins[0] = Gpio::I8;
engineConfiguration->ignitionPins[1] = GPIOE_5; engineConfiguration->ignitionPins[1] = Gpio::E5;
engineConfiguration->ignitionPins[2] = GPIOE_4; engineConfiguration->ignitionPins[2] = Gpio::E4;
engineConfiguration->ignitionPins[3] = GPIOE_3; engineConfiguration->ignitionPins[3] = Gpio::E3;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -50,14 +50,14 @@ static void setLedPins() {
#ifdef EFI_COMMUNICATION_PIN #ifdef EFI_COMMUNICATION_PIN
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN; engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
#else #else
engineConfiguration->communicationLedPin = GPIOH_10; engineConfiguration->communicationLedPin = Gpio::H10;
#endif /* EFI_COMMUNICATION_PIN */ #endif /* EFI_COMMUNICATION_PIN */
//!!!!!!!!!!! //!!!!!!!!!!!
engineConfiguration->runningLedPin = GPIO_UNASSIGNED; engineConfiguration->runningLedPin = Gpio::Unassigned;
//engineConfiguration->runningLedPin = GPIOH_9; // green //engineConfiguration->runningLedPin = Gpio::H9; // green
engineConfiguration->warningLedPin = GPIOH_11; // yellow engineConfiguration->warningLedPin = Gpio::H11; // yellow
} }
static void setupVbatt() { static void setupVbatt() {
@ -76,11 +76,11 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
engineConfiguration->triggerInputPins[0] = GPIOB_1; engineConfiguration->triggerInputPins[0] = Gpio::B1;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = GPIOA_6; engineConfiguration->camInputs[0] = Gpio::A6;
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4; engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE; engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
@ -106,8 +106,8 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
@ -132,20 +132,20 @@ void setBoardDefaultConfiguration() {
engineConfiguration->isSdCardEnabled = true; engineConfiguration->isSdCardEnabled = true;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9 engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3 engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
engineConfiguration->tachOutputPin = GPIOD_14; // OUT_PWM6 engineConfiguration->tachOutputPin = Gpio::D14; // OUT_PWM6
engineConfiguration->useStepperIdle = true; engineConfiguration->useStepperIdle = true;
engineConfiguration->useHbridgesToDriveIdleStepper = true; engineConfiguration->useHbridgesToDriveIdleStepper = true;
engineConfiguration->stepperDcIo[0].directionPin1 = GPIOC_6; // COIL_A1 = OUT_PWM2 engineConfiguration->stepperDcIo[0].directionPin1 = Gpio::C6; // COIL_A1 = OUT_PWM2
engineConfiguration->stepperDcIo[0].directionPin2 = GPIOC_7; // COIL_A2 = OUT_PWM3 engineConfiguration->stepperDcIo[0].directionPin2 = Gpio::C7; // COIL_A2 = OUT_PWM3
engineConfiguration->stepperDcIo[1].directionPin1 = GPIOC_8; // COIL_B1 = OUT_PWM4 engineConfiguration->stepperDcIo[1].directionPin1 = Gpio::C8; // COIL_B1 = OUT_PWM4
engineConfiguration->stepperDcIo[1].directionPin2 = GPIOC_9; // COIL_B2 = OUT_PWM5 engineConfiguration->stepperDcIo[1].directionPin2 = Gpio::C9; // COIL_B2 = OUT_PWM5
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();
@ -167,19 +167,19 @@ void setSdCardConfigurationOverrides() {
#if 1 #if 1
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_2;
engineConfiguration->spi2mosiPin = GPIOB_15; engineConfiguration->spi2mosiPin = Gpio::B15;
engineConfiguration->spi2misoPin = GPIOB_14; engineConfiguration->spi2misoPin = Gpio::B14;
engineConfiguration->spi2sckPin = GPIOB_13; engineConfiguration->spi2sckPin = Gpio::B13;
engineConfiguration->sdCardCsPin = GPIOB_12; engineConfiguration->sdCardCsPin = Gpio::B12;
engineConfiguration->is_enabled_spi_2 = true; engineConfiguration->is_enabled_spi_2 = true;
#else #else
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->sdCardCsPin = GPIOA_15; engineConfiguration->sdCardCsPin = Gpio::A15;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
#endif #endif

View File

@ -4,7 +4,7 @@
pins: pins:
- pin: 1 - pin: 1
function: Ignition 2 Output function: Ignition 2 Output
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 1 - IGN_2 ts_name: 1 - IGN_2
type: ign type: ign
@ -12,7 +12,7 @@ pins:
- pin: 2 - pin: 2
function: Ignition 3 (2+3) Output function: Ignition 3 (2+3) Output
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: 2 - IGN_3 ts_name: 2 - IGN_3
type: ign type: ign
@ -25,7 +25,7 @@ pins:
- pin: 4 - pin: 4
function: Ignition 4 Output function: Ignition 4 Output
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: 4 - IGN_4 ts_name: 4 - IGN_4
type: ign type: ign
@ -33,7 +33,7 @@ pins:
- pin: 5 - pin: 5
function: Ignition 1 (1+4) Output function: Ignition 1 (1+4) Output
id: GPIOI_8 id: I8
class: outputs class: outputs
ts_name: 5 - IGN_1 ts_name: 5 - IGN_1
type: ign type: ign
@ -41,7 +41,7 @@ pins:
- pin: 6 - pin: 6
function: Injector 2 Output function: Injector 2 Output
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: 6 - INJ_2 ts_name: 6 - INJ_2
type: inj type: inj
@ -49,7 +49,7 @@ pins:
- pin: 7 - pin: 7
function: Injector 3 Output function: Injector 3 Output
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: 7 - INJ_3 ts_name: 7 - INJ_3
type: inj type: inj
@ -57,28 +57,28 @@ pins:
- pin: 8 - pin: 8
function: Engine Speed (Tachometer) Signal Output (push-pull) function: Engine Speed (Tachometer) Signal Output (push-pull)
id: GPIOD_14 id: D14
class: outputs class: outputs
ts_name: 8 - OUT_TACH ts_name: 8 - OUT_TACH
color: green color: green
- pin: 9 - pin: 9
function: Fuel Level / CLT Analog Input function: Fuel Level / CLT Analog Input
id: GPIOF_5 id: F5
class: analog_inputs class: analog_inputs
ts_name: 9 - IN_SENS3 ts_name: 9 - IN_SENS3
color: white color: white
- pin: 10 - pin: 10
function: Fuel consumption Output (push-pull) / CLT? function: Fuel consumption Output (push-pull) / CLT?
id: GPIOD_15 id: D15
class: outputs class: outputs
ts_name: 10 - OUT_FUEL ts_name: 10 - OUT_FUEL
color: green color: green
- pin: 11 - pin: 11
function: Reserved High-side Output (high) function: Reserved High-side Output (high)
id: GPIOH_13 id: H13
class: outputs class: outputs
ts_name: 11 - OUT_HIGH ts_name: 11 - OUT_HIGH
type: gp_high type: gp_high
@ -98,7 +98,7 @@ pins:
- pin: 14 - pin: 14
function: Main Relay Output function: Main Relay Output
id: GPIOI_2 id: I2
class: outputs class: outputs
ts_name: 14 - OUT_MAIN ts_name: 14 - OUT_MAIN
type: ls type: ls
@ -106,7 +106,7 @@ pins:
- pin: 15 - pin: 15
function: Crankshaft Sensor (+) Input function: Crankshaft Sensor (+) Input
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 15 - IN_CRANK (A24) ts_name: 15 - IN_CRANK (A24)
color: white color: white
@ -140,7 +140,7 @@ pins:
- pin: 21 - pin: 21
function: Ignition 8 Output function: Ignition 8 Output
id: GPIOE_6 id: E6
class: outputs class: outputs
ts_name: 21 - IGN_8 ts_name: 21 - IGN_8
type: ign type: ign
@ -148,7 +148,7 @@ pins:
- pin: 22 - pin: 22
function: Ignition 7 Output function: Ignition 7 Output
id: GPIOB_9 id: B9
class: outputs class: outputs
ts_name: 22 - IGN_7 ts_name: 22 - IGN_7
type: ign type: ign
@ -156,7 +156,7 @@ pins:
- pin: 23 - pin: 23
function: Ignition 6 Output function: Ignition 6 Output
id: GPIOB_8 id: B8
class: outputs class: outputs
ts_name: 23 - IGN_6 ts_name: 23 - IGN_6
type: ign type: ign
@ -164,7 +164,7 @@ pins:
- pin: 24 - pin: 24
function: Ignition 5 Output function: Ignition 5 Output
id: GPIOE_2 id: E2
class: outputs class: outputs
ts_name: 24 - IGN_5 ts_name: 24 - IGN_5
type: ign type: ign
@ -172,7 +172,7 @@ pins:
- pin: 25 - pin: 25
function: Injector 6 Output function: Injector 6 Output
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: 25 - INJ_6 ts_name: 25 - INJ_6
type: inj type: inj
@ -184,7 +184,7 @@ pins:
- pin: 27 - pin: 27
function: Injector 1 Output function: Injector 1 Output
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: 27 - INJ_1 ts_name: 27 - INJ_1
type: inj type: inj
@ -192,7 +192,7 @@ pins:
- pin: 28 - pin: 28
function: Oxygen Sensor 2 Heating Output (low) function: Oxygen Sensor 2 Heating Output (low)
id: GPIOA_9 id: A9
class: outputs class: outputs
ts_name: 28 - OUT_O2H2 ts_name: 28 - OUT_O2H2
type: ls type: ls
@ -204,7 +204,7 @@ pins:
- pin: 30 - pin: 30
function: Injector 5 Output function: Injector 5 Output
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: 30 - INJ_5 ts_name: 30 - INJ_5
type: inj type: inj
@ -212,7 +212,7 @@ pins:
- pin: 31 - pin: 31
function: CheckEngine Lamp Output (low) function: CheckEngine Lamp Output (low)
id: GPIOG_4 id: G4
class: outputs class: outputs
ts_name: 31 - OUT_CE ts_name: 31 - OUT_CE
type: ls type: ls
@ -293,7 +293,7 @@ pins:
- pin: 46 - pin: 46
function: Canister Purge Valve Output (low) function: Canister Purge Valve Output (low)
id: GPIOG_3 id: G3
class: outputs class: outputs
ts_name: 46 - OUT_CANIST ts_name: 46 - OUT_CANIST
type: ls type: ls
@ -301,7 +301,7 @@ pins:
- pin: 47 - pin: 47
function: Injector 4 Output function: Injector 4 Output
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: 47 - INJ_4 ts_name: 47 - INJ_4
type: inj type: inj
@ -309,7 +309,7 @@ pins:
- pin: 48 - pin: 48
function: O2 LSF Heating Output (low) function: O2 LSF Heating Output (low)
id: GPIOH_14 id: H14
class: outputs class: outputs
ts_name: 48 - OUT_O2H ts_name: 48 - OUT_O2H
type: ls type: ls
@ -317,7 +317,7 @@ pins:
- pin: 49 - pin: 49
function: Canister heater Output (low) function: Canister heater Output (low)
id: GPIOI_1 id: I1
class: outputs class: outputs
ts_name: 49 - OUT_HEATER ts_name: 49 - OUT_HEATER
type: ls type: ls
@ -325,7 +325,7 @@ pins:
- pin: 50 - pin: 50
function: Starter Relay Output (low) / HOTLamp / Idle2(Mikas) function: Starter Relay Output (low) / HOTLamp / Idle2(Mikas)
id: GPIOI_0 id: I0
class: outputs class: outputs
ts_name: 50 - OUT_STARTER ts_name: 50 - OUT_STARTER
type: ls type: ls
@ -366,14 +366,14 @@ pins:
- pin: 59 - pin: 59
function: Vehicle Speed Sensor (VSS) digital input function: Vehicle Speed Sensor (VSS) digital input
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: 59 - IN_VSS ts_name: 59 - IN_VSS
color: white color: white
- pin: 60 - pin: 60
function: Reserved Push-Pull Output (push-pull) function: Reserved Push-Pull Output (push-pull)
id: GPIOD_13 id: D13
class: outputs class: outputs
ts_name: 60 - OUT_IO ts_name: 60 - OUT_IO
color: green color: green
@ -392,35 +392,35 @@ pins:
- pin: 64 - pin: 64
function: Solenoid B2 output (push-pull) / Stepper A (or D) function: Solenoid B2 output (push-pull) / Stepper A (or D)
id: GPIOC_9 id: C9
class: outputs class: outputs
ts_name: 64 - OUT_COIL_B2 ts_name: 64 - OUT_COIL_B2
color: green color: green
- pin: 65 - pin: 65
function: Solenoid B1 output (push-pull) / Stepper D (or C) function: Solenoid B1 output (push-pull) / Stepper D (or C)
id: GPIOC_8 id: C8
class: outputs class: outputs
ts_name: 65 - OUT_COIL_B1 ts_name: 65 - OUT_COIL_B1
color: green color: green
- pin: 66 - pin: 66
function: Solenoid A2 output (push-pull) / Stepper C (or B) function: Solenoid A2 output (push-pull) / Stepper C (or B)
id: GPIOC_7 id: C7
class: outputs class: outputs
ts_name: 66 - OUT_COIL_A2 ts_name: 66 - OUT_COIL_A2
color: green color: green
- pin: 67 - pin: 67
function: Solenoid A1 output (push-pull) / Stepper B (or A) function: Solenoid A1 output (push-pull) / Stepper B (or A)
id: GPIOC_6 id: C6
class: outputs class: outputs
ts_name: 67 - OUT_COIL_A1 ts_name: 67 - OUT_COIL_A1
color: green color: green
- pin: 68 - pin: 68
function: Electric Cooling Fan (ECF) Relay Output (low) function: Electric Cooling Fan (ECF) Relay Output (low)
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: 68 - OUT_ECF ts_name: 68 - OUT_ECF
type: ls type: ls
@ -428,7 +428,7 @@ pins:
- pin: 69 - pin: 69
function: A/C Relay Output (low) function: A/C Relay Output (low)
id: GPIOH_15 id: H15
class: outputs class: outputs
ts_name: 69 - OUT_AC ts_name: 69 - OUT_AC
type: ls type: ls
@ -436,7 +436,7 @@ pins:
- pin: 70 - pin: 70
function: Fuel Pump Relay Output (low) function: Fuel Pump Relay Output (low)
id: GPIOG_2 id: G2
class: outputs class: outputs
ts_name: 70 - OUT_PUMP ts_name: 70 - OUT_PUMP
type: ls type: ls
@ -447,7 +447,7 @@ pins:
- pin: 72 - pin: 72
function: Injector 7 Output function: Injector 7 Output
id: GPIOF_13 id: F13
class: outputs class: outputs
ts_name: 72 - INJ_7 ts_name: 72 - INJ_7
type: inj type: inj
@ -455,7 +455,7 @@ pins:
- pin: 73 - pin: 73
function: Injector 8 Output function: Injector 8 Output
id: GPIOF_14 id: F14
class: outputs class: outputs
ts_name: 73 - INJ_8 ts_name: 73 - INJ_8
type: inj type: inj
@ -463,28 +463,28 @@ pins:
- pin: 74 - pin: 74
function: Inertia switch (crash detect) Input function: Inertia switch (crash detect) Input
id: [GPIOB_0, EFI_ADC_8] id: [B0, EFI_ADC_8]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 74 - IN_AUX1 ts_name: 74 - IN_AUX1
color: white color: white
- pin: 75 - pin: 75
function: A/C Switch Input function: A/C Switch Input
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 75 - IN_AUX2 ts_name: 75 - IN_AUX2
color: white color: white
- pin: 76 - pin: 76
function: Power Steering Input function: Power Steering Input
id: [GPIOC_5, EFI_ADC_15] id: [C5, EFI_ADC_15]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 76 - IN_AUX3 ts_name: 76 - IN_AUX3
color: white color: white
- pin: 77 - pin: 77
function: Clutch switch Input function: Clutch switch Input
id: [GPIOA_7, EFI_ADC_7] id: [A7, EFI_ADC_7]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 77 - IN_AUX4 ts_name: 77 - IN_AUX4
color: white color: white
@ -498,7 +498,7 @@ pins:
- pin: 79 - pin: 79
function: Cam/Phase Sensor Input function: Cam/Phase Sensor Input
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 79 - IN_CAM ts_name: 79 - IN_CAM
color: white color: white

View File

@ -24,23 +24,23 @@ static void setInjectorPins() {
// Disable remainder // Disable remainder
for (int i = 6; i < MAX_CYLINDER_COUNT;i++) { for (int i = 6; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = GPIOC_13; engineConfiguration->ignitionPins[0] = Gpio::C13;
engineConfiguration->ignitionPins[1] = GPIOE_5; engineConfiguration->ignitionPins[1] = Gpio::E5;
engineConfiguration->ignitionPins[2] = GPIOE_4; engineConfiguration->ignitionPins[2] = Gpio::E4;
engineConfiguration->ignitionPins[3] = GPIOE_3; engineConfiguration->ignitionPins[3] = Gpio::E3;
engineConfiguration->ignitionPins[4] = GPIOE_2; engineConfiguration->ignitionPins[4] = Gpio::E2;
engineConfiguration->ignitionPins[5] = GPIOB_8; engineConfiguration->ignitionPins[5] = Gpio::B8;
// disable remainder // disable remainder
for (int i = 6; i < MAX_CYLINDER_COUNT; i++) { for (int i = 6; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -63,8 +63,8 @@ static void setupVbatt() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
engineConfiguration->triggerInputPins[0] = H144_IN_CRANK; engineConfiguration->triggerInputPins[0] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = H144_IN_CAM; engineConfiguration->camInputs[0] = H144_IN_CAM;
@ -121,21 +121,21 @@ void setBoardDefaultConfiguration() {
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->canNbcType = CAN_BUS_NISSAN_VQ; engineConfiguration->canNbcType = CAN_BUS_NISSAN_VQ;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->fuelPumpPin = GPIOD_12; // OUT_IO9 // 113 Fuel Pump Relay engineConfiguration->fuelPumpPin = Gpio::D12; // OUT_IO9 // 113 Fuel Pump Relay
engineConfiguration->idle.solenoidPin = H144_OUT_PWM5; engineConfiguration->idle.solenoidPin = H144_OUT_PWM5;
// engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 // engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIOG_14; // pin: 111a, OUT_IO3 engineConfiguration->mainRelayPin = Gpio::G14; // pin: 111a, OUT_IO3
engineConfiguration->tachOutputPin = H144_OUT_PWM7; engineConfiguration->tachOutputPin = H144_OUT_PWM7;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();
engineConfiguration->etbIo[0].directionPin1 = GPIOD_15; // out_pwm7 engineConfiguration->etbIo[0].directionPin1 = Gpio::D15; // out_pwm7
engineConfiguration->etbIo[0].directionPin2 = GPIOD_14; // out_pwm6 engineConfiguration->etbIo[0].directionPin2 = Gpio::D14; // out_pwm6
engineConfiguration->etbIo[0].controlPin = GPIOD_13; // ETB_EN out_pwm1 engineConfiguration->etbIo[0].controlPin = Gpio::D13; // ETB_EN out_pwm1
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
// Some sensible defaults for other options // Some sensible defaults for other options
@ -155,7 +155,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS; engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL; engineConfiguration->injectionMode = IM_SIMULTANEOUS;//IM_BATCH;// IM_SEQUENTIAL;
engineConfiguration->luaOutputPins[0] = GPIOG_5; // 104 ETB Relay engineConfiguration->luaOutputPins[0] = Gpio::G5; // 104 ETB Relay
engineConfiguration->throttlePedalUpVoltage = 0.75; engineConfiguration->throttlePedalUpVoltage = 0.75;
engineConfiguration->throttlePedalWOTVoltage = 4.45; engineConfiguration->throttlePedalWOTVoltage = 4.45;
@ -178,14 +178,14 @@ void setBoardDefaultConfiguration() {
void setSdCardConfigurationOverrides() { void setSdCardConfigurationOverrides() {
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->sdCardCsPin = GPIOA_15; engineConfiguration->sdCardCsPin = Gpio::A15;
// engineConfiguration->spi2mosiPin = GPIOB_15; // engineConfiguration->spi2mosiPin = Gpio::B15;
// engineConfiguration->spi2misoPin = GPIOB_14; // engineConfiguration->spi2misoPin = Gpio::B14;
// engineConfiguration->spi2sckPin = GPIOB_13; // engineConfiguration->spi2sckPin = Gpio::B13;
// engineConfiguration->sdCardCsPin = GPIOB_12; // engineConfiguration->sdCardCsPin = Gpio::B12;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
} }

View File

@ -2,40 +2,40 @@
pins: pins:
- pin: 1 - pin: 1
id: GPIOG_14 id: G14
class: outputs class: outputs
function: Fuel Pump Relay Output (low) function: Fuel Pump Relay Output (low)
ts_name: 1 - OUT_PUMP ts_name: 1 - OUT_PUMP
- pin: 2 - pin: 2
# H144_OUT_PWM8 # H144_OUT_PWM8
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: 2 - IdleC ts_name: 2 - IdleC
- pin: 3 - pin: 3
id: GPIOD_9 id: D9
function: Injector 5 Output function: Injector 5 Output
class: outputs class: outputs
ts_name: 3 - INJ_5 ts_name: 3 - INJ_5
type: inj type: inj
- pin: 4 - pin: 4
id: GPIOF_12 id: F12
function: Injector 6 Output function: Injector 6 Output
class: outputs class: outputs
ts_name: 4 - INJ_6 ts_name: 4 - INJ_6
type: inj type: inj
- pin: 5 - pin: 5
id: GPIOD_10 id: D10
function: Injector 4 Output function: Injector 4 Output
class: outputs class: outputs
ts_name: 5 - INJ_4 ts_name: 5 - INJ_4
type: inj type: inj
- pin: 7 - pin: 7
id: GPIOF_13 id: F13
function: Injector 7/VVT Output function: Injector 7/VVT Output
class: outputs class: outputs
ts_name: 7 - INJ_7/VVT ts_name: 7 - INJ_7/VVT
@ -45,40 +45,40 @@ pins:
ts_name: CEL ts_name: CEL
- pin: 16 - pin: 16
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 16 - CRANK ts_name: 16 - CRANK
function: Crankshaft Sensor function: Crankshaft Sensor
- pin: 17 - pin: 17
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 17 - CAM ts_name: 17 - CAM
function: Camshaft Sensor function: Camshaft Sensor
- pin: 23 - pin: 23
id: GPIOE_3 id: E3
class: outputs class: outputs
ts_name: 23 - Coil 4 ts_name: 23 - Coil 4
function: Coil 4 function: Coil 4
type: ign type: ign
- pin: 24 - pin: 24
id: GPIOB_8 id: B8
class: outputs class: outputs
ts_name: 24 - Coil 6 ts_name: 24 - Coil 6
function: Coil 6 function: Coil 6
type: ign type: ign
- pin: 25 - pin: 25
id: GPIOE_2 id: E2
class: outputs class: outputs
ts_name: 25 - Coil 5 ts_name: 25 - Coil 5
function: Coil 5 function: Coil 5
type: ign type: ign
- pin: 27 - pin: 27
id: GPIOD_3 id: D3
class: outputs class: outputs
ts_name: 27 - MAIN ts_name: 27 - MAIN
function: Main relay control function: Main relay control
@ -86,33 +86,33 @@ pins:
- pin: 29 - pin: 29
# H144_OUT_PWM5 # H144_OUT_PWM5
id: GPIOC_9 id: C9
class: outputs class: outputs
ts_name: 29 - Idle ts_name: 29 - Idle
- pin: 31 - pin: 31
id: GPIOD_11 id: D11
function: Injector 3 Output function: Injector 3 Output
class: outputs class: outputs
ts_name: 31 - INJ_3 ts_name: 31 - INJ_3
type: inj type: inj
- pin: 32 - pin: 32
id: GPIOG_8 id: G8
function: Injector 2 Output function: Injector 2 Output
class: outputs class: outputs
ts_name: 32 - INJ_2 ts_name: 32 - INJ_2
type: inj type: inj
- pin: 33 - pin: 33
id: GPIOG_7 id: G7
function: Injector 1 Output function: Injector 1 Output
class: outputs class: outputs
ts_name: 33 - INJ_1 ts_name: 33 - INJ_1
type: inj type: inj
- pin: 35 - pin: 35
id: GPIOF_14 id: F14
function: Injector 8 Output function: Injector 8 Output
class: outputs class: outputs
ts_name: 35 - INJ_8 ts_name: 35 - INJ_8
@ -126,12 +126,12 @@ pins:
- pin: 47 - pin: 47
# H144_OUT_PWM7 # H144_OUT_PWM7
id: GPIOD_15 id: D15
class: outputs class: outputs
ts_name: 47 - Tach ts_name: 47 - Tach
- pin: 50 - pin: 50
id: GPIOC_13 id: C13
class: outputs class: outputs
ts_name: 50 - Coil 1 ts_name: 50 - Coil 1
function: Coil 1 function: Coil 1
@ -139,14 +139,14 @@ pins:
- pin: 51 - pin: 51
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 51 - Coil 2 ts_name: 51 - Coil 2
function: Coil 2 function: Coil 2
type: ign type: ign
- pin: 52 - pin: 52
id: GPIOE_4 id: E4
class: outputs class: outputs
ts_name: 52 - Coil 3 ts_name: 52 - Coil 3
function: Coil 3 function: Coil 3

View File

@ -22,12 +22,12 @@ static void setInjectorPins() {
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->clutchDownPin = GPIOC_4; // Clutch switch input engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO8; engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO8;
@ -35,13 +35,13 @@ static void setInjectorPins() {
static void setIgnitionPins() { static void setIgnitionPins() {
engineConfiguration->ignitionPins[0] = H144_IGN_1; engineConfiguration->ignitionPins[0] = H144_IGN_1;
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
engineConfiguration->ignitionPins[2] = H144_IGN_2; engineConfiguration->ignitionPins[2] = H144_IGN_2;
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -65,8 +65,8 @@ static void setupDefaultSensorInputs() {
// trigger inputs, hall // trigger inputs, hall
engineConfiguration->triggerInputPins[0] = H144_IN_CAM; engineConfiguration->triggerInputPins[0] = H144_IN_CAM;
engineConfiguration->triggerInputPins[1] = H144_IN_CRANK; engineConfiguration->triggerInputPins[1] = H144_IN_CRANK;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; engineConfiguration->camInputs[0] = Gpio::Unassigned;
engineConfiguration->tps1_1AdcChannel = EFI_ADC_4; engineConfiguration->tps1_1AdcChannel = EFI_ADC_4;
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE; engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
@ -92,13 +92,13 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 4700; engineConfiguration->clt.config.bias_resistor = 4700;
engineConfiguration->iat.config.bias_resistor = 4700; engineConfiguration->iat.config.bias_resistor = 4700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
engineConfiguration->etbIo[0].directionPin1 = GPIOC_7; // PWM 3 engineConfiguration->etbIo[0].directionPin1 = Gpio::C7; // PWM 3
engineConfiguration->etbIo[0].directionPin2 = GPIOC_8; // PWM 4 engineConfiguration->etbIo[0].directionPin2 = Gpio::C8; // PWM 4
engineConfiguration->etbIo[0].controlPin = GPIOC_6; // PWM 2 engineConfiguration->etbIo[0].controlPin = Gpio::C6; // PWM 2
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
@ -128,10 +128,10 @@ void setBoardDefaultConfiguration() {
engineConfiguration->boostControlPin = H144_LS_6; engineConfiguration->boostControlPin = H144_LS_6;
engineConfiguration->acSwitch = H144_IN_D_AUX3; engineConfiguration->acSwitch = H144_IN_D_AUX3;
engineConfiguration->acRelayPin = H144_OUT_IO6; engineConfiguration->acRelayPin = H144_OUT_IO6;
engineConfiguration->fuelPumpPin = GPIOG_2; // OUT_IO9 engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
engineConfiguration->idle.solenoidPin = GPIOD_14; // OUT_PWM5 engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
engineConfiguration->fanPin = GPIOD_12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = GPIOI_2; // OUT_LOW3 engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
engineConfiguration->tachOutputPin = H144_OUT_PWM1; engineConfiguration->tachOutputPin = H144_OUT_PWM1;
engineConfiguration->alternatorControlPin = H144_OUT_PWM7; engineConfiguration->alternatorControlPin = H144_OUT_PWM7;
engineConfiguration->fan2Pin = H144_OUT_IO2; engineConfiguration->fan2Pin = H144_OUT_IO2;
@ -149,7 +149,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->clutchDownPin = H144_IN_D_2; engineConfiguration->clutchDownPin = H144_IN_D_2;
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = GPIOG_4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
} }
/** /**

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
cd .. cd ..
bash ../common_make.sh hellen/hellen-nb1 ARCH_STM32F4 bash ../common_make.sh hellen/hellenNA8_96 ARCH_STM32F4

View File

@ -5,14 +5,14 @@
pins: pins:
- pin: 1A - pin: 1A
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: 1A - ECF ts_name: 1A - ECF
function: Engine Radiator Fan function: Engine Radiator Fan
type: ls type: ls
- pin: 1B - pin: 1B
id: GPIOA_9 id: A9
class: outputs class: outputs
ts_name: 1B - AC Fan Relay ts_name: 1B - AC Fan Relay
function: AC Fan Relay function: AC Fan Relay
@ -22,14 +22,14 @@ pins:
type: can type: can
- pin: 1E - pin: 1E
id: GPIOG_4 id: G4
class: outputs class: outputs
ts_name: 1E - Check Engine Light ts_name: 1E - Check Engine Light
function: Check Engine Light function: Check Engine Light
type: ls type: ls
- pin: 1G - pin: 1G
id: GPIOG_11 id: G11
class: outputs class: outputs
ts_name: 1G - AC Relay ts_name: 1G - AC Relay
function: A/C Relay function: A/C Relay
@ -40,20 +40,20 @@ pins:
type: ls type: ls
- pin: 1K - pin: 1K
id: [GPIOC_5, EFI_ADC_15] id: [C5, EFI_ADC_15]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 1K - AC Switch ts_name: 1K - AC Switch
function: A/C Pressure In function: A/C Pressure In
- pin: 1L - pin: 1L
id: GPIOE_13 id: E13
class: switch_inputs class: switch_inputs
ts_name: 1L - Clutch ts_name: 1L - Clutch
function: Clutch Switch function: Clutch Switch
- pin: 1M - pin: 1M
# H144_IN_VSS # H144_IN_VSS
id: GPIOF_11 id: F11
class: event_inputs class: event_inputs
ts_name: 1M - VSS ts_name: 1M - VSS
function: VSS in function: VSS in
@ -62,26 +62,26 @@ pins:
function: GND function: GND
- pin: 1Q - pin: 1Q
id: [GPIOF_9, ADC3_CHANNEL_7] id: [F9, ADC3_CHANNEL_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 1Q - Brake/RES1 ts_name: 1Q - Brake/RES1
function: Brake Switch function: Brake Switch
- pin: 1S - pin: 1S
id: GPIOF_7 id: F7
class: analog_inputs class: analog_inputs
ts_name: 2M - KNOCK ts_name: 2M - KNOCK
function: Knock sens. in function: Knock sens. in
- pin: 1U - pin: 1U
id: GPIOG_2 id: G2
class: outputs class: outputs
ts_name: 1U - Fuel Pump ts_name: 1U - Fuel Pump
function: Fuel Pump Relay function: Fuel Pump Relay
type: ls type: ls
- pin: 2A - pin: 2A
id: [GPIOB_0, EFI_ADC_8] id: [B0, EFI_ADC_8]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 2A - Pressure Input ts_name: 2A - Pressure Input
function: FTP input function: FTP input
@ -99,7 +99,7 @@ pins:
function: Front O2 Sensor Signal function: Front O2 Sensor Signal
- pin: 2D - pin: 2D
id: GPIOF_3 id: F3
class: switch_inputs class: switch_inputs
ts_name: 2D - O2S2 ts_name: 2D - O2S2
function: Rear O2 Sensor Signal function: Rear O2 Sensor Signal
@ -150,13 +150,13 @@ pins:
ts_name: intMAP ts_name: intMAP
- pin: 3F - pin: 3F
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 3F - CRANK ts_name: 3F - CRANK
function: Crankshaft Sensor function: Crankshaft Sensor
- pin: 3G - pin: 3G
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [event_inputs, analog_inputs] class: [event_inputs, analog_inputs]
ts_name: 3G - CAM ts_name: 3G - CAM
function: Camshaft Sensor function: Camshaft Sensor
@ -165,69 +165,69 @@ pins:
function: +12V function: +12V
- pin: 3L - pin: 3L
id: GPIOD_13 id: D13
class: outputs class: outputs
ts_name: 3L - TACH ts_name: 3L - TACH
function: Tach Out function: Tach Out
type: ls type: ls
- pin: 3N - pin: 3N
id: GPIOC_13 id: C13
class: outputs class: outputs
ts_name: 3N - IGN_1 (1&4) ts_name: 3N - IGN_1 (1&4)
function: Coil #1 function: Coil #1
type: ign type: ign
- pin: 3Q - pin: 3Q
id: GPIOD_14 id: D14
class: outputs class: outputs
ts_name: 3Q - IDLE ts_name: 3Q - IDLE
function: IAC (negative), with diode function: IAC (negative), with diode
type: ls type: ls
- pin: 3R - pin: 3R
id: GPIOE_5 id: E5
class: outputs class: outputs
ts_name: 3R - IGN_2 (2&3) ts_name: 3R - IGN_2 (2&3)
function: Coil #2 function: Coil #2
type: ign type: ign
- pin: 3S - pin: 3S
id: [GPIOA_7, EFI_ADC_7] id: [A7, EFI_ADC_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 3S - EGR BOOST IN ts_name: 3S - EGR BOOST IN
function: EGR BOOST function: EGR BOOST
- pin: 3U - pin: 3U
id: GPIOG_7 id: G7
class: outputs class: outputs
ts_name: 3U - INJ_1 ts_name: 3U - INJ_1
function: Injector #1 function: Injector #1
type: inj type: inj
- pin: 3V - pin: 3V
id: GPIOG_8 id: G8
class: outputs class: outputs
ts_name: 3V - INJ_2 ts_name: 3V - INJ_2
function: Injector #2 function: Injector #2
type: inj type: inj
- pin: 3W - pin: 3W
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: 3W - INJ_3 ts_name: 3W - INJ_3
function: Injector #3 function: Injector #3
type: inj type: inj
- pin: 3X - pin: 3X
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: 3X - INJ_4 ts_name: 3X - INJ_4
function: Injector #4 function: Injector #4
type: inj type: inj
- pin: 3Z - pin: 3Z
id: GPIOG_13 id: G13
class: outputs class: outputs
ts_name: 3Z - O2H2 ts_name: 3Z - O2H2
function: Rear O2 sensor heater function: Rear O2 sensor heater
@ -237,26 +237,26 @@ pins:
function: GND function: GND
- pin: 4B - pin: 4B
id: GPIOE_12 id: E12
class: event_inputs class: event_inputs
ts_name: 4B - DIGITAL/FLEX ts_name: 4B - DIGITAL/FLEX
function: DIGITAL function: DIGITAL
- pin: 4C - pin: 4C
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: 4C - IN TEMP/PPS2 ts_name: 4C - IN TEMP/PPS2
function: TEMP OR PPS2 function: TEMP OR PPS2
- pin: 4D - pin: 4D
id: GPIOF_12 id: F12
class: outputs class: outputs
ts_name: 4D - BOOST OUT ts_name: 4D - BOOST OUT
function: BOOST OUT function: BOOST OUT
type: inj type: inj
- pin: 4E - pin: 4E
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: 4E - VVT ts_name: 4E - VVT
function: VVT Oil Control Valve neg. function: VVT Oil Control Valve neg.
@ -284,27 +284,27 @@ pins:
function: WBO function: WBO
- pin: int_pps1 - pin: int_pps1
id: [GPIOA_3, EFI_ADC_3] id: [A3, EFI_ADC_3]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: PPS1 ts_name: PPS1
- pin: int_tps2 - pin: int_tps2
id: [GPIOA_1, EFI_ADC_1] id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: TPS1 ts_name: TPS1
- pin: int_etb+ - pin: int_etb+
id: GPIOC_7 id: C7
class: outputs class: outputs
ts_name: ETB + ts_name: ETB +
- pin: int_etb- - pin: int_etb-
id: GPIOC_8 id: C8
class: outputs class: outputs
ts_name: ETB - ts_name: ETB -
- pin: int_etb_EN - pin: int_etb_EN
id: GPIOC_6 id: C6
class: outputs class: outputs
ts_name: ETB EN ts_name: ETB EN

View File

@ -22,16 +22,16 @@
* *
* The math proof: * The math proof:
* - Charging formula #1: * - Charging formula #1:
* Vt = Vññ * (1 - exp(-Tc1 / RC)) * Vt = V<EFBFBD><EFBFBD> * (1 - exp(-Tc1 / RC))
* - Discharging formula: * - Discharging formula:
* Vl = Vt * exp(-Td / RC) * Vl = Vt * exp(-Td / RC)
* - Charging formula #2: * - Charging formula #2:
* Vl = Vññ * (1 - exp(-Tl / (RC))) * Vl = V<EFBFBD><EFBFBD> * (1 - exp(-Tl / (RC)))
* - Where Tl is a charging time from 0 to Vl: * - Where Tl is a charging time from 0 to Vl:
* Tl = Tc1 - Tc2 * Tl = Tc1 - Tc2
* - Solve the equations: * - Solve the equations:
* Vl = Vññ * (1 - exp(-Tl / RC)) = Vt * exp(-Td / RC) * Vl = V<EFBFBD><EFBFBD> * (1 - exp(-Tl / RC)) = Vt * exp(-Td / RC)
* Vññ * (1 - exp(-Tl / RC)) = Vññ * (1 - exp(-Tc1 / RC)) * exp(-Td / RC) * V<EFBFBD><EFBFBD> * (1 - exp(-Tl / RC)) = V<EFBFBD><EFBFBD> * (1 - exp(-Tc1 / RC)) * exp(-Td / RC)
* (1 - exp(-Tl / RC)) = (1 - exp(-Tc1 / RC)) * exp(-Td / RC) * (1 - exp(-Tl / RC)) = (1 - exp(-Tc1 / RC)) * exp(-Td / RC)
* - Simplify the equation: * - Simplify the equation:
* X = exp(-1/(RC)) * X = exp(-1/(RC))
@ -312,9 +312,9 @@ int detectHellenBoardId() {
efiPrintf("Starting Hellen Board ID detection..."); efiPrintf("Starting Hellen Board ID detection...");
efitick_t beginNt = getTimeNowNt(); efitick_t beginNt = getTimeNowNt();
// Hellen boards use GPIOF_0 and GPIOF_1. // Hellen boards use Gpio::F0 and Gpio::F1.
const int numPins = 2; const int numPins = 2;
brain_pin_e rPins[numPins] = { GPIOF_0, GPIOF_1 }; Gpio rPins[numPins] = { Gpio::F0, Gpio::F1 };
// We start from the estimated capacitance, but the real one can be +-10% // We start from the estimated capacitance, but the real one can be +-10%
float C = HELLEN_BOARD_ID_CAPACITOR; float C = HELLEN_BOARD_ID_CAPACITOR;

View File

@ -26,10 +26,10 @@ void setHellen176LedPins() {
#ifdef EFI_COMMUNICATION_PIN #ifdef EFI_COMMUNICATION_PIN
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN; engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
#else #else
engineConfiguration->communicationLedPin = GPIOH_10; engineConfiguration->communicationLedPin = Gpio::H10;
#endif /* EFI_COMMUNICATION_PIN */ #endif /* EFI_COMMUNICATION_PIN */
engineConfiguration->runningLedPin = GPIOH_9; // green engineConfiguration->runningLedPin = Gpio::H9; // green
engineConfiguration->warningLedPin = GPIOH_11; // yellow engineConfiguration->warningLedPin = Gpio::H11; // yellow
} }
// this should be called before setHellenXXXLedPins() // this should be called before setHellenXXXLedPins()

View File

@ -9,7 +9,7 @@
// knock 1 - pin PF7 // knock 1 - pin PF7
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN5 #define KNOCK_ADC_CH1 ADC_CHANNEL_IN5
#define KNOCK_PIN_CH1 GPIOF_7 #define KNOCK_PIN_CH1 Gpio::F7
// Sample rate & time - depends on the exact MCU // Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 #define KNOCK_SAMPLE_TIME ADC_SAMPLE_84

View File

@ -17,72 +17,72 @@ int detectHellenBoardId();
void detectHellenBoardType(); void detectHellenBoardType();
// stm32 UART8 // stm32 UART8
#define H144_UART1_RX GPIOE_0 #define H144_UART1_RX Gpio::E0
#define H144_UART1_TX GPIOE_1 #define H144_UART1_TX Gpio::E1
// stm32 UART2 // stm32 UART2
#define H144_UART2_RX GPIOD_6 #define H144_UART2_RX Gpio::D6
#define H144_UART2_TX GPIOD_5 #define H144_UART2_TX Gpio::D5
#define H144_LED1_RED GPIOG_0 #define H144_LED1_RED Gpio::G0
#define H144_LED2 GPIOG_1 #define H144_LED2 Gpio::G1
#define H144_LED3 GPIOE_7 #define H144_LED3 Gpio::E7
#define H144_LED4 GPIOE_8 #define H144_LED4 Gpio::E8
#define H176_LED1_RED GPIOH_8 #define H176_LED1_RED Gpio::H8
#define H144_LS_1 GPIOG_7 #define H144_LS_1 Gpio::G7
#define H144_LS_2 GPIOG_8 #define H144_LS_2 Gpio::G8
#define H144_LS_3 GPIOD_11 #define H144_LS_3 Gpio::D11
#define H144_LS_4 GPIOD_10 #define H144_LS_4 Gpio::D10
#define H144_LS_5 GPIOD_9 #define H144_LS_5 Gpio::D9
#define H144_LS_6 GPIOF_12 #define H144_LS_6 Gpio::F12
#define H144_LS_7 GPIOF_13 #define H144_LS_7 Gpio::F13
#define H144_LS_8 GPIOF_14 #define H144_LS_8 Gpio::F14
#define H144_IGN_1 GPIOC_13 #define H144_IGN_1 Gpio::C13
#define H144_IGN_2 GPIOE_5 #define H144_IGN_2 Gpio::E5
#define H144_IGN_3 GPIOE_4 #define H144_IGN_3 Gpio::E4
#define H144_IGN_4 GPIOE_3 #define H144_IGN_4 Gpio::E3
#define H144_IGN_5 GPIOE_2 #define H144_IGN_5 Gpio::E2
#define H144_IGN_6 GPIOB_8 #define H144_IGN_6 Gpio::B8
#define H144_OUT_PWM1 GPIOD_13 #define H144_OUT_PWM1 Gpio::D13
#define H144_OUT_PWM2 GPIOC_6 #define H144_OUT_PWM2 Gpio::C6
#define H144_OUT_PWM3 GPIOC_7 #define H144_OUT_PWM3 Gpio::C7
#define H144_OUT_PWM4 GPIOC_8 #define H144_OUT_PWM4 Gpio::C8
#define H144_OUT_PWM5 GPIOC_9 #define H144_OUT_PWM5 Gpio::C9
#define H144_OUT_PWM6 GPIOD_14 #define H144_OUT_PWM6 Gpio::D14
#define H144_OUT_PWM7 GPIOD_15 #define H144_OUT_PWM7 Gpio::D15
#define H144_OUT_PWM8 GPIOD_12 #define H144_OUT_PWM8 Gpio::D12
// also IO1/IO5 on rev 0.6 // also IO1/IO5 on rev 0.6
#define H144_GP1 GPIOD_4 #define H144_GP1 Gpio::D4
// also IO2/IO5 on rev 0.6 // also IO2/IO5 on rev 0.6
#define H144_GP2 GPIOD_7 #define H144_GP2 Gpio::D7
#define H144_OUT_IO1 GPIOD_3 #define H144_OUT_IO1 Gpio::D3
#define H144_OUT_IO2 GPIOA_9 #define H144_OUT_IO2 Gpio::A9
#define H144_OUT_IO3 GPIOG_14 #define H144_OUT_IO3 Gpio::G14
#define H144_OUT_IO4 GPIOG_5 #define H144_OUT_IO4 Gpio::G5
#define H144_OUT_IO5 GPIOD_2 #define H144_OUT_IO5 Gpio::D2
#define H144_OUT_IO6 GPIOG_11 #define H144_OUT_IO6 Gpio::G11
#define H144_OUT_IO7 GPIOG_3 #define H144_OUT_IO7 Gpio::G3
#define H144_OUT_IO8 GPIOG_4 #define H144_OUT_IO8 Gpio::G4
#define H144_OUT_IO9 GPIOG_13 #define H144_OUT_IO9 Gpio::G13
#define H144_OUT_IO10 GPIOG_12 #define H144_OUT_IO10 Gpio::G12
#define H144_OUT_IO11 GPIOG_2 #define H144_OUT_IO11 Gpio::G2
#define H144_OUT_IO12 GPIOA_8 #define H144_OUT_IO12 Gpio::A8
#define H144_OUT_IO13 GPIOG_6 #define H144_OUT_IO13 Gpio::G6
// A24 // A24
#define H144_IN_CRANK GPIOB_1 #define H144_IN_CRANK Gpio::B1
// A19 // A19
#define H144_IN_CAM GPIOA_6 #define H144_IN_CAM Gpio::A6
// DIN5 // DIN5
#define H144_IN_VSS GPIOF_11 #define H144_IN_VSS Gpio::F11
// IN_CLT AIN11 PC2 // IN_CLT AIN11 PC2
#define H144_IN_CLT EFI_ADC_12 #define H144_IN_CLT EFI_ADC_12
@ -104,13 +104,13 @@ void detectHellenBoardType();
#define H144_IN_MAP3 EFI_ADC_2 #define H144_IN_MAP3 EFI_ADC_2
// AIN7 // AIN7
#define H144_IN_RES1 GPIOF_9 #define H144_IN_RES1 Gpio::F9
// AIN16 // AIN16
#define H144_IN_RES2 GPIOF_10 #define H144_IN_RES2 Gpio::F10
// AIN8 // AIN8
#define H144_IN_RES3 GPIOF_8 #define H144_IN_RES3 Gpio::F8
#define H144_IN_AUX1 EFI_ADC_8 #define H144_IN_AUX1 EFI_ADC_8
@ -123,55 +123,55 @@ void detectHellenBoardType();
#define H144_IN_AUX4 EFI_ADC_7 #define H144_IN_AUX4 EFI_ADC_7
// A1 AIN1 no code to use ADC3 as analog // A1 AIN1 no code to use ADC3 as analog
#define H144_IN_SENS1 GPIOF_3 #define H144_IN_SENS1 Gpio::F3
// A2 AIN2 no code to use ADC3 as analog // A2 AIN2 no code to use ADC3 as analog
#define H144_IN_SENS2 GPIOF_4 #define H144_IN_SENS2 Gpio::F4
// A3 AIN3 no code to use ADC3 as analog // A3 AIN3 no code to use ADC3 as analog
#define H144_IN_SENS3 GPIOF_5 #define H144_IN_SENS3 Gpio::F5
// A4 AIN4 no code to use ADC3 as analog // A4 AIN4 no code to use ADC3 as analog
#define H144_IN_SENS4 GPIOF_6 #define H144_IN_SENS4 Gpio::F6
// IN_O2S AIN13 A13 PA0 // IN_O2S AIN13 A13 PA0
#define H144_IN_O2S EFI_ADC_0 #define H144_IN_O2S EFI_ADC_0
// IN_O2S2 AIN12 PA1 // IN_O2S2 AIN12 PA1
#define H144_IN_O2S2 EFI_ADC_1 #define H144_IN_O2S2 EFI_ADC_1
#define H144_IN_D_1 GPIOE_12 #define H144_IN_D_1 Gpio::E12
#define H144_IN_D_2 GPIOE_13 #define H144_IN_D_2 Gpio::E13
#define H144_IN_D_3 GPIOE_14 #define H144_IN_D_3 Gpio::E14
#define H144_IN_D_4 GPIOE_15 #define H144_IN_D_4 Gpio::E15
// A22 // A22
#define H144_IN_D_AUX3 GPIOC_5 #define H144_IN_D_AUX3 Gpio::C5
// A20 AIN20 // A20 AIN20
#define H144_IN_D_AUX4 GPIOA_7 #define H144_IN_D_AUX4 Gpio::A7
#define H176_LS_1 GPIOG_7 #define H176_LS_1 Gpio::G7
#define H176_LS_2 GPIOG_8 #define H176_LS_2 Gpio::G8
#define H176_LS_3 GPIOD_11 #define H176_LS_3 Gpio::D11
#define H176_LS_4 GPIOD_10 #define H176_LS_4 Gpio::D10
#define H176_LS_5 GPIOD_9 #define H176_LS_5 Gpio::D9
#define H176_LS_6 GPIOF_12 #define H176_LS_6 Gpio::F12
#define H176_LS_7 GPIOF_13 #define H176_LS_7 Gpio::F13
#define H176_LS_8 GPIOF_14 #define H176_LS_8 Gpio::F14
#define H176_OUT_PWM1 GPIOD_13 #define H176_OUT_PWM1 Gpio::D13
#define H176_OUT_PWM2 GPIOC_6 #define H176_OUT_PWM2 Gpio::C6
#define H176_OUT_PWM3 GPIOC_7 #define H176_OUT_PWM3 Gpio::C7
#define H176_OUT_IO6 GPIOH_15 #define H176_OUT_IO6 Gpio::H15
#define H176_OUT_IO9 GPIOI_1 #define H176_OUT_IO9 Gpio::I1
#define H176_OUT_IO10 GPIOI_0 #define H176_OUT_IO10 Gpio::I0
// same pins 144 and 176 // same pins 144 and 176
#define H176_CAN_RX GPIOD_0 #define H176_CAN_RX Gpio::D0
#define H176_CAN_TX GPIOD_1 #define H176_CAN_TX Gpio::D1
#define H176_IN_A16 GPIOF_10 #define H176_IN_A16 Gpio::F10
// looks like same pins 144 and 176 // looks like same pins 144 and 176
#define H_SPI2_MOSI GPIOB_15 #define H_SPI2_MOSI Gpio::B15
#define H_SPI2_MISO GPIOB_14 #define H_SPI2_MISO Gpio::B14
#define H_SPI2_SCK GPIOB_13 #define H_SPI2_SCK Gpio::B13
#define H_SPI2_CS GPIOB_12 #define H_SPI2_CS Gpio::B12

View File

@ -63,19 +63,19 @@ void setBoardOverrides() {
engineConfiguration->clt.adcChannel = EFI_ADC_14; engineConfiguration->clt.adcChannel = EFI_ADC_14;
engineConfiguration->triggerInputPins[0] = GPIOE_7; engineConfiguration->triggerInputPins[0] = Gpio::E7;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->tle6240spiDevice = SPI_DEVICE_1; engineConfiguration->tle6240spiDevice = SPI_DEVICE_1;
engineConfiguration->tle6240_cs = GPIOB_0; engineConfiguration->tle6240_cs = Gpio::B0;
// todo: // todo:
int i; int i;
for (i = 0; i < MAX_CYLINDER_COUNT; i++) for (i = 0; i < MAX_CYLINDER_COUNT; i++)
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
for (i = 0; i < MAX_CYLINDER_COUNT; i++) for (i = 0; i < MAX_CYLINDER_COUNT; i++)
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
engineConfiguration->adcVcc = 5.0f; engineConfiguration->adcVcc = 5.0f;
engineConfiguration->analogInputDividerCoefficient = 1; engineConfiguration->analogInputDividerCoefficient = 1;
@ -88,10 +88,10 @@ void setBoardOverrides() {
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
engineConfiguration->useSerialPort = true; engineConfiguration->useSerialPort = true;
engineConfiguration->binarySerialTxPin = GPIOC_7; engineConfiguration->binarySerialTxPin = Gpio::C7;
engineConfiguration->binarySerialRxPin = GPIOC_6; engineConfiguration->binarySerialRxPin = Gpio::C6;
// engineConfiguration->consoleSerialTxPin = GPIOA_10; // engineConfiguration->consoleSerialTxPin = Gpio::A10;
// engineConfiguration->consoleSerialRxPin = GPIOA_11; // engineConfiguration->consoleSerialRxPin = Gpio::A11;
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED; engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED; engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
} }

View File

@ -4,7 +4,7 @@
! all these #defines are in priority over the "default" values in rusefi_config.txt ! all these #defines are in priority over the "default" values in rusefi_config.txt
! see firmware/config/boards/kinetis/rusefi_hw_enums.h ! see firmware/config/boards/kinetis/rusefi_hw_enums.h
#define brain_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16" #define Gpio_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PA16", "PA17", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PB16", "PB17", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "PE16", "PE17", "TLE6240_1", "TLE6240_2", "TLE6240_3", "TLE6240_4", "TLE6240_5", "TLE6240_6", "TLE6240_7", "TLE6240_8", "TLE6240_9", "TLE6240_10", "TLE6240_11", "TLE6240_12", "TLE6240_13", "TLE6240_14", "TLE6240_15", "TLE6240_16"
! Based on Kinetis KE1xF pinout (64-pin package) ! Based on Kinetis KE1xF pinout (64-pin package)
#define brain_input_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A" #define brain_input_pin_e_enum "NONE", "INVALID", "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "N/A", "N/A", "PA10", "PA11", "PA12", "PA13", "N/A", "N/A", "N/A", "N/A", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "N/A", "N/A", "N/A", "N/A", "PB12", "PB13", "N/A", "N/A", "N/A", "N/A", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "N/A", "N/A", "N/A", "N/A", "PC14", "PC15", "PC16", "PC17", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "PD15", "PD16", "N/A", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A"

View File

@ -241,11 +241,6 @@
#define EFI_SPI3_AF 3 #define EFI_SPI3_AF 3
#define EFI_I2C_SCL_BRAIN_PIN GPIOB_6
#define EFI_I2C_SDA_BRAIN_PIN GPIOB_7
#define EFI_I2C_AF 4
/** /**
* Patched version of ChibiOS/RT support extra details in the system error messages * Patched version of ChibiOS/RT support extra details in the system error messages
*/ */
@ -266,8 +261,8 @@
#define TS_PRIMARY_PORT UARTD2 #define TS_PRIMARY_PORT UARTD2
#undef TS_SECONDARY_PORT #undef TS_SECONDARY_PORT
#define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_10 #define EFI_CONSOLE_TX_BRAIN_PIN Gpio::A10
#define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_11 #define EFI_CONSOLE_RX_BRAIN_PIN Gpio::A11
#define EFI_CONSOLE_AF 3 #define EFI_CONSOLE_AF 3
#define TS_SERIAL_AF 2 #define TS_SERIAL_AF 2
@ -283,9 +278,9 @@
//#define EFI_TRIGGER_DEBUG_BLINK TRUE //#define EFI_TRIGGER_DEBUG_BLINK TRUE
//#define EFI_TRIGGER_COMP_ADAPTIVE_HYSTERESIS TRUE //#define EFI_TRIGGER_COMP_ADAPTIVE_HYSTERESIS TRUE
#define LED_WARNING_BRAIN_PIN GPIOD_13 #define LED_WARNING_BRAIN_PIN Gpio::D13
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOD_14 #define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::D14
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT #define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT
#define EFI_WARNING_LED FALSE #define EFI_WARNING_LED FALSE

View File

@ -8,8 +8,6 @@
#pragma once #pragma once
enum class TestCppStyleEnum : uint8_t { };
// todo: migrate/unify with pin_output_mode_e? rename? something is messy here // todo: migrate/unify with pin_output_mode_e? rename? something is messy here
// this enum is currently only used for SPI pins // this enum is currently only used for SPI pins
typedef enum __attribute__ ((__packed__)) { typedef enum __attribute__ ((__packed__)) {
@ -23,104 +21,104 @@ typedef enum __attribute__ ((__packed__)) {
/** /**
* Hardware pin. This enum is platform-specific. * Hardware pin. This enum is platform-specific.
*/ */
typedef enum __attribute__ ((__packed__)) { enum class Gpio : uint8_t {
GPIO_UNASSIGNED = 0, Unassigned = 0,
GPIO_INVALID = 1, Invalid = 1,
GPIOA_0 = 2, A0 = 2,
GPIOA_1 = 3, A1 = 3,
GPIOA_2 = 4, A2 = 4,
GPIOA_3 = 5, A3 = 5,
GPIOA_4 = 6, A4 = 6,
GPIOA_5 = 7, A5 = 7,
GPIOA_6 = 8, A6 = 8,
GPIOA_7 = 9, A7 = 9,
GPIOA_8 = 10, A8 = 10,
GPIOA_9 = 11, A9 = 11,
GPIOA_10 = 12, A10 = 12,
GPIOA_11 = 13, A11 = 13,
GPIOA_12 = 14, A12 = 14,
GPIOA_13 = 15, A13 = 15,
GPIOA_14 = 16, A14 = 16,
GPIOA_15 = 17, A15 = 17,
GPIOA_16 = 18, A16 = 18,
GPIOA_17 = 19, A17 = 19,
GPIOB_0 = 20, B0 = 20,
GPIOB_1 = 21, B1 = 21,
GPIOB_2 = 22, B2 = 22,
GPIOB_3 = 23, B3 = 23,
GPIOB_4 = 24, B4 = 24,
GPIOB_5 = 25, B5 = 25,
GPIOB_6 = 26, B6 = 26,
GPIOB_7 = 27, B7 = 27,
GPIOB_8 = 28, B8 = 28,
GPIOB_9 = 29, B9 = 29,
GPIOB_10 = 30, B10 = 30,
GPIOB_11 = 31, B11 = 31,
GPIOB_12 = 32, B12 = 32,
GPIOB_13 = 33, B13 = 33,
GPIOB_14 = 34, B14 = 34,
GPIOB_15 = 35, B15 = 35,
GPIOB_16 = 36, B16 = 36,
GPIOB_17 = 37, B17 = 37,
GPIOC_0 = 38, C0 = 38,
GPIOC_1 = 39, C1 = 39,
GPIOC_2 = 40, C2 = 40,
GPIOC_3 = 41, C3 = 41,
GPIOC_4 = 42, C4 = 42,
GPIOC_5 = 43, C5 = 43,
GPIOC_6 = 44, C6 = 44,
GPIOC_7 = 45, C7 = 45,
GPIOC_8 = 46, C8 = 46,
GPIOC_9 = 47, C9 = 47,
GPIOC_10 = 48, C10 = 48,
GPIOC_11 = 49, C11 = 49,
GPIOC_12 = 50, C12 = 50,
GPIOC_13 = 51, C13 = 51,
GPIOC_14 = 52, C14 = 52,
GPIOC_15 = 53, C15 = 53,
GPIOC_16 = 54, C16 = 54,
GPIOC_17 = 55, C17 = 55,
GPIOD_0 = 56, D0 = 56,
GPIOD_1 = 57, D1 = 57,
GPIOD_2 = 58, D2 = 58,
GPIOD_3 = 59, D3 = 59,
GPIOD_4 = 60, D4 = 60,
GPIOD_5 = 61, D5 = 61,
GPIOD_6 = 62, D6 = 62,
GPIOD_7 = 63, D7 = 63,
GPIOD_8 = 64, D8 = 64,
GPIOD_9 = 65, D9 = 65,
GPIOD_10 = 66, D10 = 66,
GPIOD_11 = 67, D11 = 67,
GPIOD_12 = 68, D12 = 68,
GPIOD_13 = 69, D13 = 69,
GPIOD_14 = 70, D14 = 70,
GPIOD_15 = 71, D15 = 71,
GPIOD_16 = 72, D16 = 72,
GPIOD_17 = 73, D17 = 73,
GPIOE_0 = 74, E0 = 74,
GPIOE_1 = 75, E1 = 75,
GPIOE_2 = 76, E2 = 76,
GPIOE_3 = 77, E3 = 77,
GPIOE_4 = 78, E4 = 78,
GPIOE_5 = 79, E5 = 79,
GPIOE_6 = 80, E6 = 80,
GPIOE_7 = 81, E7 = 81,
GPIOE_8 = 82, E8 = 82,
GPIOE_9 = 83, E9 = 83,
GPIOE_10 = 84, E10 = 84,
GPIOE_11 = 85, E11 = 85,
GPIOE_12 = 86, E12 = 86,
GPIOE_13 = 87, E13 = 87,
GPIOE_14 = 88, E14 = 88,
GPIOE_15 = 89, E15 = 89,
GPIOE_16 = 90, E16 = 90,
GPIOE_17 = 91, E17 = 91,
// TLE6240 pins go right after on chips // TLE6240 pins go right after on chips
TLE6240_PIN_1 = 130, TLE6240_PIN_1 = 130,
@ -140,13 +138,13 @@ typedef enum __attribute__ ((__packed__)) {
TLE6240_PIN_15 = 144, TLE6240_PIN_15 = 144,
TLE6240_PIN_16 = 145, TLE6240_PIN_16 = 145,
} brain_pin_e; };
/* Plase keep updating these defines */ /* Plase keep updating these defines */
#define BRAIN_PIN_ONCHIP_LAST GPIOE_17 #define BRAIN_PIN_ONCHIP_LAST Gpio::E17
#define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - GPIOA_0 + 1) #define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - Gpio::A0 + 1)
#define BRAIN_PIN_LAST TLE6240_PIN_16 #define BRAIN_PIN_LAST Gpio::TLE6240_PIN_16
#define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - GPIOA_0 + 1) #define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - Gpio::A0 + 1)
typedef enum __attribute__ ((__packed__)) { typedef enum __attribute__ ((__packed__)) {
EFI_ADC_NONE = 0, EFI_ADC_NONE = 0,

View File

@ -5,10 +5,10 @@ set PROJECT_BOARD=microrusefi
set PROJECT_CPU=ARCH_STM32F7 set PROJECT_CPU=ARCH_STM32F7
set VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_F set VAR_DEF_ENGINE_TYPE = -DDEFAULT_ENGINE_TYPE=BMW_M73_F
set LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14 set LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14
set EXTRA_PARAMS=-DDUMMY ^ set EXTRA_PARAMS=-DDUMMY ^
-DEFI_COMMUNICATION_PIN=GPIOB_7 -DEFI_COMMUNICATION_PIN=Gpio::B7
call config/boards/common_make.bat call config/boards/common_make.bat

View File

@ -13,13 +13,13 @@ else
endif endif
ifeq ($(LED_CRITICAL_ERROR_BRAIN_PIN),) ifeq ($(LED_CRITICAL_ERROR_BRAIN_PIN),)
LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3 LED_CRITICAL_ERROR_BRAIN_PIN = -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
endif endif
# *TEMPORARY* breaking TTL thus breaking Bluetooth for microRusEFI in order to enable SPI3 for SD card # *TEMPORARY* breaking TTL thus breaking Bluetooth for microRusEFI in order to enable SPI3 for SD card
# *TODO* need to give people the horrible choice between Bluetooth via TTL or SD card via SPI :( horrible choice # *TODO* need to give people the horrible choice between Bluetooth via TTL or SD card via SPI :( horrible choice
EFI_CONSOLE_TTL_PINS = -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOB_10 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOB_11 EFI_CONSOLE_TTL_PINS = -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::B10 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::B11
DDEFS += -DEFI_CAN_SERIAL=TRUE DDEFS += -DEFI_CAN_SERIAL=TRUE

View File

@ -22,14 +22,14 @@
#include "mre_meta.h" #include "mre_meta.h"
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = TLE8888_PIN_1; engineConfiguration->injectionPins[0] = Gpio::TLE8888_PIN_1;
engineConfiguration->injectionPins[1] = TLE8888_PIN_2; engineConfiguration->injectionPins[1] = Gpio::TLE8888_PIN_2;
engineConfiguration->injectionPins[2] = TLE8888_PIN_3; engineConfiguration->injectionPins[2] = Gpio::TLE8888_PIN_3;
engineConfiguration->injectionPins[3] = TLE8888_PIN_4; engineConfiguration->injectionPins[3] = Gpio::TLE8888_PIN_4;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
@ -37,14 +37,14 @@ static void setInjectorPins() {
static void setIgnitionPins() { static void setIgnitionPins() {
// todo: I wonder if these are not right in light of the network rename and the +12 VP issue? // todo: I wonder if these are not right in light of the network rename and the +12 VP issue?
engineConfiguration->ignitionPins[0] = GPIOD_4; engineConfiguration->ignitionPins[0] = Gpio::D4;
engineConfiguration->ignitionPins[1] = GPIOD_3; engineConfiguration->ignitionPins[1] = Gpio::D3;
engineConfiguration->ignitionPins[2] = GPIOD_2; engineConfiguration->ignitionPins[2] = Gpio::D2;
engineConfiguration->ignitionPins[3] = GPIOD_1; engineConfiguration->ignitionPins[3] = Gpio::D1;
// disable remainder // disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
@ -54,10 +54,10 @@ static void setLedPins() {
#ifdef EFI_COMMUNICATION_PIN #ifdef EFI_COMMUNICATION_PIN
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN; engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
#else #else
engineConfiguration->communicationLedPin = GPIOE_2; // d23 = blue engineConfiguration->communicationLedPin = Gpio::E2; // d23 = blue
#endif /* EFI_COMMUNICATION_PIN */ #endif /* EFI_COMMUNICATION_PIN */
engineConfiguration->runningLedPin = GPIOE_4; // d22 = green engineConfiguration->runningLedPin = Gpio::E4; // d22 = green
engineConfiguration->warningLedPin = GPIOE_1; // d27 = orange or yellow engineConfiguration->warningLedPin = Gpio::E1; // d27 = orange or yellow
} }
static void setupVbatt() { static void setupVbatt() {
@ -86,12 +86,12 @@ static void setupTle8888() {
engineConfiguration->is_enabled_spi_1 = true; engineConfiguration->is_enabled_spi_1 = true;
// Wire up spi1 // Wire up spi1
engineConfiguration->spi1mosiPin = GPIOB_5; engineConfiguration->spi1mosiPin = Gpio::B5;
engineConfiguration->spi1misoPin = GPIOB_4; engineConfiguration->spi1misoPin = Gpio::B4;
engineConfiguration->spi1sckPin = GPIOB_3; engineConfiguration->spi1sckPin = Gpio::B3;
// Chip select // Chip select
engineConfiguration->tle8888_cs = GPIOD_5; engineConfiguration->tle8888_cs = Gpio::D5;
// SPI device // SPI device
engineConfiguration->tle8888spiDevice = SPI_DEVICE_1; engineConfiguration->tle8888spiDevice = SPI_DEVICE_1;
@ -105,13 +105,13 @@ static void setupEtb() {
// DIS - disables motor (enable low) // DIS - disables motor (enable low)
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = GPIOC_7; engineConfiguration->etbIo[0].controlPin = Gpio::C7;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = GPIOA_8; engineConfiguration->etbIo[0].directionPin1 = Gpio::A8;
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = GPIOC_8; engineConfiguration->etbIo[0].disablePin = Gpio::C8;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
// we only have pwm/dir, no dira/dirb // we only have pwm/dir, no dira/dirb
engineConfiguration->etb_use_two_wires = false; engineConfiguration->etb_use_two_wires = false;
@ -120,11 +120,11 @@ static void setupEtb() {
static void setupDefaultSensorInputs() { static void setupDefaultSensorInputs() {
// trigger inputs // trigger inputs
// tle8888 VR conditioner // tle8888 VR conditioner
engineConfiguration->triggerInputPins[0] = GPIOC_6; engineConfiguration->triggerInputPins[0] = Gpio::C6;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
// Direct hall-only cam input // Direct hall-only cam input
engineConfiguration->camInputs[0] = GPIOA_5; engineConfiguration->camInputs[0] = Gpio::A5;
// open question if it's great to have TPS in default TPS - the down-side is for // open question if it's great to have TPS in default TPS - the down-side is for
// vehicles without TPS or for first start without TPS one would have to turn in off // vehicles without TPS or for first start without TPS one would have to turn in off
@ -160,16 +160,16 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 2700; engineConfiguration->clt.config.bias_resistor = 2700;
engineConfiguration->iat.config.bias_resistor = 2700; engineConfiguration->iat.config.bias_resistor = 2700;
engineConfiguration->canTxPin = GPIOB_6; engineConfiguration->canTxPin = Gpio::B6;
engineConfiguration->canRxPin = GPIOB_12; engineConfiguration->canRxPin = Gpio::B12;
// SPI for SD card // SPI for SD card
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
@ -192,24 +192,24 @@ void setSerialConfigurationOverrides() {
void setBoardDefaultConfiguration() { void setBoardDefaultConfiguration() {
setInjectorPins(); setInjectorPins();
setIgnitionPins(); setIgnitionPins();
engineConfiguration->sdCardCsPin = GPIOB_9; engineConfiguration->sdCardCsPin = Gpio::B9;
// MRE has a special main relay control low side pin // MRE has a special main relay control low side pin
// rusEfi firmware is totally not involved with main relay control on microRusEfi board // rusEfi firmware is totally not involved with main relay control on microRusEfi board
// todo: maybe even set EFI_MAIN_RELAY_CONTROL to FALSE for MRE configuration // todo: maybe even set EFI_MAIN_RELAY_CONTROL to FALSE for MRE configuration
// TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_IN11 / TLE8888_OUT21 // TLE8888 half bridges (pushpull, lowside, or high-low) TLE8888_IN11 / TLE8888_OUT21
// TLE8888_PIN_21: "35 - GP Out 1" // Gpio::TLE8888_PIN_21: "35 - GP Out 1"
engineConfiguration->fuelPumpPin = TLE8888_PIN_21; engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_21;
// engineConfiguration->isSdCardEnabled = true; // engineConfiguration->isSdCardEnabled = true;
// TLE8888 high current low side: VVT2 IN9 / OUT5 // TLE8888 high current low side: VVT2 IN9 / OUT5
// GPIOE_10: "3 - Lowside 2" // Gpio::E10: "3 - Lowside 2"
engineConfiguration->idle.solenoidPin = TLE8888_PIN_5; engineConfiguration->idle.solenoidPin = Gpio::TLE8888_PIN_5;
// TLE8888_PIN_22: "34 - GP Out 2" // Gpio::TLE8888_PIN_22: "34 - GP Out 2"
engineConfiguration->fanPin = TLE8888_PIN_22; engineConfiguration->fanPin = Gpio::TLE8888_PIN_22;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();

View File

@ -1,24 +1,24 @@
pins: pins:
- pin: 3 - pin: 3
id: GPIOB_8 id: B8
class: outputs class: outputs
function: I2C1_SCL or CAN1_RX function: I2C1_SCL or CAN1_RX
ts_name: AUX J2 PB8 ts_name: AUX J2 PB8
- pin: 6 - pin: 6
id: GPIOB_9 id: B9
class: outputs class: outputs
function: I2C1_SDA or CAN1_TX function: I2C1_SDA or CAN1_TX
ts_name: AUX J2 PB9 ts_name: AUX J2 PB9
- pin: 10 - pin: 10
id: GPIOC_12 id: C12
class: outputs class: outputs
function: SPI3_MOSI or USART3_CK or UART5_TX function: SPI3_MOSI or USART3_CK or UART5_TX
ts_name: AUX J2 PC12 ts_name: AUX J2 PC12
- pin: 7 - pin: 7
id: GPIOA_15 id: A15
class: outputs class: outputs
function: SPI3_NSS (Chip Select) function: SPI3_NSS (Chip Select)
ts_name: AUX J2 PA15 ts_name: AUX J2 PA15

View File

@ -57,7 +57,7 @@ pins:
# TC4427 ignition outputs (5v) # TC4427 ignition outputs (5v)
- pin: 9 - pin: 9
id: GPIOD_4 id: D4
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 1 function: Ignition 1
@ -65,7 +65,7 @@ pins:
type: ign type: ign
- pin: 10 - pin: 10
id: GPIOD_3 id: D3
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 2 function: Ignition 2
@ -73,7 +73,7 @@ pins:
type: ign type: ign
- pin: 11 - pin: 11
id: GPIOD_2 id: D2
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 3 function: Ignition 3
@ -81,7 +81,7 @@ pins:
type: ign type: ign
- pin: 12 - pin: 12
id: GPIOD_1 id: D1
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 4 function: Ignition 4
@ -89,7 +89,7 @@ pins:
type: ign type: ign
- pin: 13 - pin: 13
id: GPIOD_6 id: D6
class: outputs class: outputs
color: yellow color: yellow
function: Alternator (see JP2 jumper note) function: Alternator (see JP2 jumper note)
@ -98,7 +98,7 @@ pins:
# TC4427 general purpose output (selectable 5v/12v) # TC4427 general purpose output (selectable 5v/12v)
- pin: 14 - pin: 14
id: GPIOD_7 id: D7
class: outputs class: outputs
color: yellow color: yellow
function: (see JP2 jumper note) function: (see JP2 jumper note)
@ -121,7 +121,7 @@ pins:
color: red right color: red right
- pin: 18 - pin: 18
id: [GPIOA_0, EFI_ADC_0] id: [A0, EFI_ADC_0]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: red color: red
function: CLT sensor function: CLT sensor
@ -129,7 +129,7 @@ pins:
type: at type: at
- pin: 19 - pin: 19
id: [GPIOC_2, EFI_ADC_12] id: [C2, EFI_ADC_12]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: red color: red
function: Starting from version 0.5.0 this pin can be used as 5V input for USB connection through main connector (No need to open case to access micro-USB connector) function: Starting from version 0.5.0 this pin can be used as 5V input for USB connection through main connector (No need to open case to access micro-USB connector)
@ -137,7 +137,7 @@ pins:
type: av type: av
- pin: 20 - pin: 20
id: [GPIOC_3, EFI_ADC_13] id: [C3, EFI_ADC_13]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: red left color: red left
function: Throttle position sensor (TPS) function: Throttle position sensor (TPS)
@ -150,14 +150,14 @@ pins:
color: dark green color: dark green
- pin: 22 - pin: 22
id: [GPIOA_3, GPIOA_3, EFI_ADC_3] id: [A3, A3, EFI_ADC_3]
class: [event_inputs, switch_inputs, analog_inputs] class: [event_inputs, switch_inputs, analog_inputs]
color: dark green color: dark green
ts_name: 22 - AN temp 4 ts_name: 22 - AN temp 4
type: at type: at
- pin: 23 - pin: 23
id: [GPIOA_1, EFI_ADC_1] id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: dark green color: dark green
function: IAT sensor function: IAT sensor
@ -165,7 +165,7 @@ pins:
type: at type: at
- pin: 24 - pin: 24
id: [GPIOA_2, GPIOA_2, EFI_ADC_2] id: [A2, A2, EFI_ADC_2]
class: [event_inputs, switch_inputs, analog_inputs] class: [event_inputs, switch_inputs, analog_inputs]
color: dark green color: dark green
ts_name: 24 - AN temp 3 ts_name: 24 - AN temp 3
@ -173,21 +173,21 @@ pins:
# RC filter input for hall # RC filter input for hall
- pin: 25 - pin: 25
id: [GPIOA_5, GPIOA_5] id: [A5, A5]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
color: light blue right color: light blue right
ts_name: 25 - Hall Cam ts_name: 25 - Hall Cam
type: hall type: hall
- pin: 26 - pin: 26
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: light blue color: light blue
ts_name: 26 - AN volt 2 ts_name: 26 - AN volt 2
type: av type: av
- pin: 27 - pin: 27
id: [GPIOC_0, EFI_ADC_10] id: [C0, EFI_ADC_10]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: light blue color: light blue
function: MAP sensor function: MAP sensor
@ -195,22 +195,22 @@ pins:
type: av type: av
- pin: 28 - pin: 28
id: [GPIOA_4, GPIOA_4, EFI_ADC_4] id: [A4, A4, EFI_ADC_4]
class: [outputs, switch_inputs, analog_inputs] class: [outputs, switch_inputs, analog_inputs]
color: light blue left color: light blue left
function: AN volt 10, for aux see R85 function: AN volt 10, for aux see R85
ts_name: 28 - AN volt 10, Aux Reuse ts_name: 28 - AN volt 10, Aux Reuse
type: av type: av
- id: GPIOE_0 - id: E0
class: outputs class: outputs
ts_name: AUX J6 ts_name: AUX J6
- id: GPIOB_11 - id: B11
class: outputs class: outputs
ts_name: AUX J12 ts_name: AUX J12
- id: GPIOB_10 - id: B10
class: outputs class: outputs
ts_name: AUX J13 ts_name: AUX J13
@ -220,14 +220,14 @@ pins:
color: pink right color: pink right
- pin: 30 - pin: 30
id: [GPIOC_5, EFI_ADC_15] id: [C5, EFI_ADC_15]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: pink color: pink
ts_name: 30 - AN volt 7 ts_name: 30 - AN volt 7
type: av type: av
- pin: 31 - pin: 31
id: [GPIOA_7, EFI_ADC_7] id: [A7, EFI_ADC_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: pink color: pink
function: Throttle Pedal Position Sensor (PPS) function: Throttle Pedal Position Sensor (PPS)
@ -235,7 +235,7 @@ pins:
type: av type: av
- pin: 32 - pin: 32
id: [GPIOC_4, GPIOC_4, EFI_ADC_14] id: [C4, C4, EFI_ADC_14]
class: [outputs, switch_inputs, analog_inputs] class: [outputs, switch_inputs, analog_inputs]
color: pink color: pink
function: External wideband O2 sensor WBO AFR EGO, for aux see R86 function: External wideband O2 sensor WBO AFR EGO, for aux see R86
@ -270,7 +270,7 @@ pins:
type: [gp_low, gp_pp] type: [gp_low, gp_pp]
- pin: 36 - pin: 36
id: [GPIOB_0, GPIOB_0, EFI_ADC_8] id: [B0, B0, EFI_ADC_8]
class: [outputs, switch_inputs, analog_inputs] class: [outputs, switch_inputs, analog_inputs]
color: orange left color: orange left
function: AN volt 8, for aux see R84 function: AN volt 8, for aux see R84
@ -299,7 +299,7 @@ pins:
color: grey color: grey
- pin: 40 - pin: 40
id: [GPIOB_1, GPIOB_1, EFI_ADC_9] id: [B1, B1, EFI_ADC_9]
class: [outputs, switch_inputs, analog_inputs] class: [outputs, switch_inputs, analog_inputs]
color: grey color: grey
function: AN volt 9, for aux see R30 function: AN volt 9, for aux see R30
@ -337,7 +337,7 @@ pins:
color: brown left color: brown left
- pin: 45 - pin: 45
id: GPIOC_6 id: C6
class: event_inputs class: event_inputs
color: light green right color: light green right
function: Crank VR+/hall function: Crank VR+/hall

View File

@ -1,19 +1,19 @@
pins: pins:
- pin: J10 - pin: J10
id: GPIOE_6 id: E6
class: outputs class: outputs
function: TIM9_CH2 function: TIM9_CH2
ts_name: AUX J10 PE6 ts_name: AUX J10 PE6
- pin: J11 - pin: J11
id: GPIOE_5 id: E5
class: outputs class: outputs
function: TIM9_CH1 function: TIM9_CH1
ts_name: AUX J11 PE5 ts_name: AUX J11 PE5
- pin: J18 - pin: J18
id: GPIOB_7 id: B7
class: outputs class: outputs
ts_name: AUX J18 PB7 ts_name: AUX J18 PB7

View File

@ -9,7 +9,7 @@
// knock 1 - pin PA3 // knock 1 - pin PA3
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN3 #define KNOCK_ADC_CH1 ADC_CHANNEL_IN3
#define KNOCK_PIN_CH1 GPIOA_3 #define KNOCK_PIN_CH1 Gpio::A3
// Sample rate & time - depends on the exact MCU // Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 #define KNOCK_SAMPLE_TIME ADC_SAMPLE_84

View File

@ -8,7 +8,7 @@
#pragma once #pragma once
// OpenDrain: 4.5A // OpenDrain: 4.5A
#define MRE_LS_1 TLE8888_PIN_6 #define MRE_LS_1 Gpio::TLE8888_PIN_6
// clt = "18 - AN temp 1" // clt = "18 - AN temp 1"
// R27 pull-up // R27 pull-up

View File

@ -15,10 +15,10 @@
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
engineConfiguration->useSerialPort = true; engineConfiguration->useSerialPort = true;
engineConfiguration->binarySerialTxPin = GPIOD_8; engineConfiguration->binarySerialTxPin = Gpio::D8;
engineConfiguration->binarySerialRxPin = GPIOD_9; engineConfiguration->binarySerialRxPin = Gpio::D9;
// engineConfiguration->consoleSerialTxPin = GPIOD_8; // engineConfiguration->consoleSerialTxPin = Gpio::D8;
// engineConfiguration->consoleSerialRxPin = GPIOD_9; // engineConfiguration->consoleSerialRxPin = Gpio::D9;
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED; engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED; engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
} }
@ -33,8 +33,8 @@ void setSdCardConfigurationOverrides() {
void setBoardDefaultConfiguration() { void setBoardDefaultConfiguration() {
setSerialConfigurationOverrides(); setSerialConfigurationOverrides();
engineConfiguration->runningLedPin = GPIOB_0; //green LED engineConfiguration->runningLedPin = Gpio::B0; //green LED
engineConfiguration->warningLedPin = GPIO_UNASSIGNED; engineConfiguration->warningLedPin = Gpio::Unassigned;
#if 0 #if 0
engineConfiguration->vbattAdcChannel = EFI_ADC_13; engineConfiguration->vbattAdcChannel = EFI_ADC_13;
engineConfiguration->adcVcc = ADC_VCC; engineConfiguration->adcVcc = ADC_VCC;
@ -44,13 +44,13 @@ void setBoardDefaultConfiguration() {
// not used // not used
for (int i = 0; i < DIGIPOT_COUNT ; i++) { for (int i = 0; i < DIGIPOT_COUNT ; i++) {
engineConfiguration->digitalPotentiometerChipSelect[i] = GPIO_UNASSIGNED; engineConfiguration->digitalPotentiometerChipSelect[i] = Gpio::Unassigned;
} }
engineConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
engineConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerSimulatorPins[2] = Gpio::Unassigned;
engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
engineConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED; engineConfiguration->vehicleSpeedSensorInputPin = Gpio::Unassigned;
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
engineConfiguration->is_enabled_spi_1 = false; engineConfiguration->is_enabled_spi_1 = false;

View File

@ -6,10 +6,10 @@ SCRIPT_NAME="compile_nucleo_f767.sh"
echo "Entering $SCRIPT_NAME" echo "Entering $SCRIPT_NAME"
export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \ export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \ -DEFI_INJECTOR_PIN3=Gpio::Unassigned \
-DFIRMWARE_ID=\\\"nucleo767\\\" \ -DFIRMWARE_ID=\\\"nucleo767\\\" \
-DEFI_COMMUNICATION_PIN=GPIOB_7 \ -DEFI_COMMUNICATION_PIN=Gpio::B7 \
-DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14 \ -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14 \
-DEFI_ENABLE_ASSERTS=FALSE \ -DEFI_ENABLE_ASSERTS=FALSE \
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE" -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"
export DEBUG_LEVEL_OPT="-O2" export DEBUG_LEVEL_OPT="-O2"

View File

@ -3,10 +3,10 @@
# STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscilattor # STM32F767 version of the firmware for F767ZI chip NOT on Nucleo board, with a real oscilattor
export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \ export EXTRA_PARAMS="-DDUMMY -DSTM32F767xx \
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \ -DEFI_INJECTOR_PIN3=Gpio::Unassigned \
-DFIRMWARE_ID=\\\"board767\\\" \ -DFIRMWARE_ID=\\\"board767\\\" \
-DEFI_COMMUNICATION_PIN=GPIOB_7 \ -DEFI_COMMUNICATION_PIN=Gpio::B7 \
-DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14 \ -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14 \
-DEFI_ENABLE_ASSERTS=FALSE \ -DEFI_ENABLE_ASSERTS=FALSE \
-DEFI_USE_OSC=TRUE \ -DEFI_USE_OSC=TRUE \
-DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE" -DCH_DBG_ENABLE_CHECKS=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE"

View File

@ -2,8 +2,8 @@
DDEFS = -DTS_NO_PRIMARY=0 \ DDEFS = -DTS_NO_PRIMARY=0 \
-DTS_PRIMARY_PORT=SD3 \ -DTS_PRIMARY_PORT=SD3 \
-DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_8 \ -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D8 \
-DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_9 \ -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D9 \
# Shared variables # Shared variables

View File

@ -6,10 +6,10 @@ SCRIPT_NAME="compile_nucleo_h743.sh"
echo "Entering $SCRIPT_NAME" echo "Entering $SCRIPT_NAME"
export EXTRA_PARAMS="-DDUMMY \ export EXTRA_PARAMS="-DDUMMY \
-DEFI_INJECTOR_PIN3=GPIO_UNASSIGNED \ -DEFI_INJECTOR_PIN3=Gpio::Unassigned \
-DFIRMWARE_ID=\\\"nucleoH743\\\" \ -DFIRMWARE_ID=\\\"nucleoH743\\\" \
-DEFI_COMMUNICATION_PIN=GPIOB_7 \ -DEFI_COMMUNICATION_PIN=Gpio::B7 \
-DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOB_14" -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::B14"
export DEBUG_LEVEL_OPT="-O2" export DEBUG_LEVEL_OPT="-O2"
bash ../common_make.sh nucleo_h743 ARCH_STM32H7 bash ../common_make.sh nucleo_h743 ARCH_STM32H7

View File

@ -58,15 +58,15 @@ static void setPrometheusDefaults() {
void setPinConfigurationOverrides() { void setPinConfigurationOverrides() {
#if 0 #if 0
engineConfiguration->injectionPins[0] = is469 ? GPIOD_9 : GPIOB_14; // #1 engineConfiguration->injectionPins[0] = is469 ? Gpio::D9 : Gpio::B14; // #1
engineConfiguration->injectionPins[1] = is469 ? GPIOD_15 : GPIOC_7; // #2 engineConfiguration->injectionPins[1] = is469 ? Gpio::D15 : Gpio::C7; // #2
engineConfiguration->injectionPins[2] = is469 ? GPIOD_10 : GPIOB_15; // #3 engineConfiguration->injectionPins[2] = is469 ? Gpio::D10 : Gpio::B15; // #3
engineConfiguration->injectionPins[3] = is469 ? GPIOD_14 : GPIOC_6; // #4 engineConfiguration->injectionPins[3] = is469 ? Gpio::D14 : Gpio::C6; // #4
engineConfiguration->ignitionPins[0] = GPIOA_10; engineConfiguration->ignitionPins[0] = Gpio::A10;
engineConfiguration->ignitionPins[1] = GPIOA_9; engineConfiguration->ignitionPins[1] = Gpio::A9;
engineConfiguration->ignitionPins[2] = GPIOA_8; engineConfiguration->ignitionPins[2] = Gpio::A8;
engineConfiguration->ignitionPins[3] = GPIOA_11; engineConfiguration->ignitionPins[3] = Gpio::A11;
engineConfiguration->ignitionPinMode = OM_INVERTED; engineConfiguration->ignitionPinMode = OM_INVERTED;
enginePins.startInjectionPins(); enginePins.startInjectionPins();
@ -99,10 +99,10 @@ void setPinConfigurationOverrides() {
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
engineConfiguration->useSerialPort = true; engineConfiguration->useSerialPort = true;
engineConfiguration->binarySerialTxPin = GPIOA_0; engineConfiguration->binarySerialTxPin = Gpio::A0;
engineConfiguration->binarySerialRxPin = GPIOA_1; engineConfiguration->binarySerialRxPin = Gpio::A1;
// engineConfiguration->consoleSerialTxPin = GPIOA_0; // engineConfiguration->consoleSerialTxPin = Gpio::A0;
// engineConfiguration->consoleSerialRxPin = GPIOA_1; // engineConfiguration->consoleSerialRxPin = Gpio::A1;
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED; engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED; engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
} }
@ -110,7 +110,7 @@ void setSerialConfigurationOverrides() {
void setSdCardConfigurationOverrides() { void setSdCardConfigurationOverrides() {
engineConfiguration->is_enabled_spi_1 = true; engineConfiguration->is_enabled_spi_1 = true;
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1;
engineConfiguration->sdCardCsPin = GPIOA_2; engineConfiguration->sdCardCsPin = Gpio::A2;
engineConfiguration->isSdCardEnabled = true; engineConfiguration->isSdCardEnabled = true;
} }
@ -137,15 +137,15 @@ void setBoardDefaultConfiguration() {
engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE; engineConfiguration->baroSensor.hwChannel = EFI_ADC_NONE;
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE; engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
engineConfiguration->injectionPins[0] = is469 ? GPIOD_9 : GPIOB_14; // #1 engineConfiguration->injectionPins[0] = is469 ? Gpio::D9 : Gpio::B14; // #1
engineConfiguration->injectionPins[1] = is469 ? GPIOD_15 : GPIOC_7; // #2 engineConfiguration->injectionPins[1] = is469 ? Gpio::D15 : Gpio::C7; // #2
engineConfiguration->injectionPins[2] = is469 ? GPIOD_10 : GPIOB_15; // #3 engineConfiguration->injectionPins[2] = is469 ? Gpio::D10 : Gpio::B15; // #3
engineConfiguration->injectionPins[3] = is469 ? GPIOD_14 : GPIOC_6; // #4 engineConfiguration->injectionPins[3] = is469 ? Gpio::D14 : Gpio::C6; // #4
engineConfiguration->ignitionPins[0] = GPIOA_10; engineConfiguration->ignitionPins[0] = Gpio::A10;
engineConfiguration->ignitionPins[1] = GPIOA_9; engineConfiguration->ignitionPins[1] = Gpio::A9;
engineConfiguration->ignitionPins[2] = GPIOA_8; engineConfiguration->ignitionPins[2] = Gpio::A8;
engineConfiguration->ignitionPins[3] = GPIOA_11; engineConfiguration->ignitionPins[3] = Gpio::A11;
engineConfiguration->ignitionPinMode = OM_INVERTED; engineConfiguration->ignitionPinMode = OM_INVERTED;
engineConfiguration->vbattDividerCoeff = ((float) (2 + 10)) / 2; engineConfiguration->vbattDividerCoeff = ((float) (2 + 10)) / 2;
@ -153,53 +153,53 @@ void setBoardDefaultConfiguration() {
engineConfiguration->iat.config.bias_resistor = 2700; engineConfiguration->iat.config.bias_resistor = 2700;
engineConfiguration->useStepperIdle = true; engineConfiguration->useStepperIdle = true;
engineConfiguration->idle.stepperDirectionPin = is469 ? GPIOB_14 : GPIOB_12; engineConfiguration->idle.stepperDirectionPin = is469 ? Gpio::B14 : Gpio::B12;
engineConfiguration->idle.stepperStepPin = is469 ? GPIOB_15 : GPIOB_13; engineConfiguration->idle.stepperStepPin = is469 ? Gpio::B15 : Gpio::B13;
engineConfiguration->stepperEnablePin = GPIO_UNASSIGNED; engineConfiguration->stepperEnablePin = Gpio::Unassigned;
engineConfiguration->stepperEnablePinMode = OM_DEFAULT; engineConfiguration->stepperEnablePinMode = OM_DEFAULT;
engineConfiguration->communicationLedPin = GPIO_UNASSIGNED;// GPIOA_13; // yellow LED engineConfiguration->communicationLedPin = Gpio::Unassigned;// Gpio::A13; // yellow LED
engineConfiguration->runningLedPin = GPIOA_13; //GPIOA_13; // yellow LED engineConfiguration->runningLedPin = Gpio::A13; //Gpio::A13; // yellow LED
engineConfiguration->warningLedPin = GPIO_UNASSIGNED; engineConfiguration->warningLedPin = Gpio::Unassigned;
engineConfiguration->triggerInputPins[0] = GPIOA_5; engineConfiguration->triggerInputPins[0] = Gpio::A5;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->camInputs[0] = is469 ? GPIOE_9 : GPIOA_6; engineConfiguration->camInputs[0] = is469 ? Gpio::E9 : Gpio::A6;
engineConfiguration->tachOutputPin = GPIOC_8; engineConfiguration->tachOutputPin = Gpio::C8;
engineConfiguration->tachOutputPinMode = OM_DEFAULT; engineConfiguration->tachOutputPinMode = OM_DEFAULT;
engineConfiguration->fuelPumpPin = is469 ? GPIOD_6 : GPIOB_7; engineConfiguration->fuelPumpPin = is469 ? Gpio::D6 : Gpio::B7;
engineConfiguration->fuelPumpPinMode = OM_DEFAULT; engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
engineConfiguration->mainRelayPin = is469 ? GPIOB_11 : GPIOB_2; engineConfiguration->mainRelayPin = is469 ? Gpio::B11 : Gpio::B2;
engineConfiguration->mainRelayPinMode = OM_DEFAULT; engineConfiguration->mainRelayPinMode = OM_DEFAULT;
engineConfiguration->fanPin = GPIOC_9; engineConfiguration->fanPin = Gpio::C9;
engineConfiguration->fanPinMode = OM_DEFAULT; engineConfiguration->fanPinMode = OM_DEFAULT;
engineConfiguration->malfunctionIndicatorPin = GPIOC_1; engineConfiguration->malfunctionIndicatorPin = Gpio::C1;
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT; engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
// debug pad // debug pad
engineConfiguration->triggerSimulatorPins[0] = GPIOD_8; engineConfiguration->triggerSimulatorPins[0] = Gpio::D8;
engineConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT;
// not used // not used
engineConfiguration->displayMode = DM_NONE; engineConfiguration->displayMode = DM_NONE;
engineConfiguration->HD44780_rs = GPIO_UNASSIGNED; engineConfiguration->HD44780_rs = Gpio::Unassigned;
engineConfiguration->HD44780_e = GPIO_UNASSIGNED; engineConfiguration->HD44780_e = Gpio::Unassigned;
engineConfiguration->HD44780_db4 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db4 = Gpio::Unassigned;
engineConfiguration->HD44780_db5 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db5 = Gpio::Unassigned;
engineConfiguration->HD44780_db6 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db6 = Gpio::Unassigned;
engineConfiguration->HD44780_db7 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db7 = Gpio::Unassigned;
for (int i = 0; i < DIGIPOT_COUNT ; i++) { for (int i = 0; i < DIGIPOT_COUNT ; i++) {
engineConfiguration->digitalPotentiometerChipSelect[i] = GPIO_UNASSIGNED; engineConfiguration->digitalPotentiometerChipSelect[i] = Gpio::Unassigned;
} }
engineConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
engineConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerSimulatorPins[2] = Gpio::Unassigned;
engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
engineConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED; engineConfiguration->vehicleSpeedSensorInputPin = Gpio::Unassigned;
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
@ -207,24 +207,24 @@ void setBoardDefaultConfiguration() {
engineConfiguration->is_enabled_spi_2 = false; engineConfiguration->is_enabled_spi_2 = false;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
engineConfiguration->spi1mosiPin = GPIOB_5; engineConfiguration->spi1mosiPin = Gpio::B5;
engineConfiguration->spi1MosiMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL engineConfiguration->spi1MosiMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL
engineConfiguration->spi1misoPin = GPIOB_4; engineConfiguration->spi1misoPin = Gpio::B4;
engineConfiguration->spi1MisoMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL engineConfiguration->spi1MisoMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL
engineConfiguration->spi1sckPin = GPIOB_3; engineConfiguration->spi1sckPin = Gpio::B3;
engineConfiguration->spi1SckMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL engineConfiguration->spi1SckMode = PO_DEFAULT; // PAL_STM32_OTYPE_PUSHPULL
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3MosiMode = PO_OPENDRAIN; // 4 engineConfiguration->spi3MosiMode = PO_OPENDRAIN; // 4
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3MisoMode = PO_PULLUP; // 32 engineConfiguration->spi3MisoMode = PO_PULLUP; // 32
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->spi3SckMode = PO_OPENDRAIN; // 4 engineConfiguration->spi3SckMode = PO_OPENDRAIN; // 4
engineConfiguration->hip9011SpiDevice = SPI_DEVICE_3; engineConfiguration->hip9011SpiDevice = SPI_DEVICE_3;
engineConfiguration->hip9011CsPin = is469 ? GPIOD_1 : GPIOD_2; engineConfiguration->hip9011CsPin = is469 ? Gpio::D1 : Gpio::D2;
engineConfiguration->hip9011CsPinMode = OM_OPENDRAIN; engineConfiguration->hip9011CsPinMode = OM_OPENDRAIN;
engineConfiguration->hip9011IntHoldPin = GPIOC_14; engineConfiguration->hip9011IntHoldPin = Gpio::C14;
engineConfiguration->hip9011IntHoldPinMode = OM_OPENDRAIN; engineConfiguration->hip9011IntHoldPinMode = OM_OPENDRAIN;
engineConfiguration->hipOutputChannel = EFI_ADC_10; // PC0 engineConfiguration->hipOutputChannel = EFI_ADC_10; // PC0
engineConfiguration->isHip9011Enabled = true; engineConfiguration->isHip9011Enabled = true;
@ -232,15 +232,15 @@ void setBoardDefaultConfiguration() {
engineConfiguration->cj125SpiDevice = SPI_DEVICE_3; engineConfiguration->cj125SpiDevice = SPI_DEVICE_3;
engineConfiguration->cj125ua = is469 ? EFI_ADC_9 : EFI_ADC_8; engineConfiguration->cj125ua = is469 ? EFI_ADC_9 : EFI_ADC_8;
engineConfiguration->cj125ur = EFI_ADC_12; engineConfiguration->cj125ur = EFI_ADC_12;
engineConfiguration->cj125CsPin = GPIOA_15; engineConfiguration->cj125CsPin = Gpio::A15;
engineConfiguration->cj125CsPinMode = OM_OPENDRAIN; engineConfiguration->cj125CsPinMode = OM_OPENDRAIN;
engineConfiguration->wboHeaterPin = GPIOC_13; engineConfiguration->wboHeaterPin = Gpio::C13;
engineConfiguration->o2heaterPin = GPIOC_13; engineConfiguration->o2heaterPin = Gpio::C13;
//engineConfiguration->isCJ125Enabled = true; //engineConfiguration->isCJ125Enabled = true;
engineConfiguration->isCJ125Enabled = false; engineConfiguration->isCJ125Enabled = false;
engineConfiguration->canTxPin = GPIOB_9; engineConfiguration->canTxPin = Gpio::B9;
engineConfiguration->canRxPin = GPIOB_8; engineConfiguration->canRxPin = Gpio::B8;
//!!!!!!!!!!!!!!! //!!!!!!!!!!!!!!!
#if 1 #if 1

View File

@ -66,10 +66,10 @@
#undef EFI_CONSOLE_TX_BRAIN_PIN #undef EFI_CONSOLE_TX_BRAIN_PIN
#define EFI_CONSOLE_TX_BRAIN_PIN GPIOA_0 #define EFI_CONSOLE_TX_BRAIN_PIN Gpio::A0
#undef EFI_CONSOLE_RX_BRAIN_PIN #undef EFI_CONSOLE_RX_BRAIN_PIN
#define EFI_CONSOLE_RX_BRAIN_PIN GPIOA_1 #define EFI_CONSOLE_RX_BRAIN_PIN Gpio::A1
#undef EFI_CONSOLE_AF #undef EFI_CONSOLE_AF
#define EFI_CONSOLE_AF 8 #define EFI_CONSOLE_AF 8
@ -78,7 +78,7 @@
#define TS_SERIAL_AF 8 #define TS_SERIAL_AF 8
#undef LED_CRITICAL_ERROR_BRAIN_PIN #undef LED_CRITICAL_ERROR_BRAIN_PIN
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOA_13 #define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::A13
#undef LED_ERROR_BRAIN_PIN_MODE #undef LED_ERROR_BRAIN_PIN_MODE
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT #define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT

View File

@ -28,7 +28,7 @@ static NO_CACHE adcsample_t samples[8];
// we use this as a hook to run near the rest of ADC init... // we use this as a hook to run near the rest of ADC init...
void setAdcChannelOverrides() { void setAdcChannelOverrides() {
efiSetPadMode("adc input", GPIOF_3, PAL_MODE_INPUT_ANALOG); efiSetPadMode("adc input", Gpio::F3, PAL_MODE_INPUT_ANALOG);
adcStart(&ADCD3, nullptr); adcStart(&ADCD3, nullptr);
} }

View File

@ -9,7 +9,7 @@ ifeq ($(PROJECT_CPU),ARCH_STM32F4)
endif endif
DDEFS += -DEFI_USE_OSC=TRUE DDEFS += -DEFI_USE_OSC=TRUE
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3 DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3
DDEFS += -DFIRMWARE_ID=\"proteus\" DDEFS += -DFIRMWARE_ID=\"proteus\"
DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE DDEFS += -DEFI_MAIN_RELAY_CONTROL=TRUE
@ -33,7 +33,7 @@ ifeq ($(PROJECT_CPU),ARCH_STM32F4)
# Hardware serial port on UART 2 -> PD5/PD6 # Hardware serial port on UART 2 -> PD5/PD6
DDEFS += -DSTM32_UART_USE_USART2=TRUE DDEFS += -DSTM32_UART_USE_USART2=TRUE
DDEFS += -DTS_PRIMARY_PORT=UARTD2 DDEFS += -DTS_PRIMARY_PORT=UARTD2
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=GPIOD_5 -DEFI_CONSOLE_RX_BRAIN_PIN=GPIOD_6 DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::D5 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::D6
endif endif
# We are running on Proteus hardware! # We are running on Proteus hardware!

View File

@ -54,9 +54,9 @@ void setSdCardConfigurationOverrides() {
static void setLedPins() { static void setLedPins() {
// PE3 is error LED, configured in board.mk // PE3 is error LED, configured in board.mk
engineConfiguration->communicationLedPin = GPIOE_4; engineConfiguration->communicationLedPin = Gpio::E4;
engineConfiguration->runningLedPin = GPIOE_5; engineConfiguration->runningLedPin = Gpio::E5;
engineConfiguration->warningLedPin = GPIOE_6; engineConfiguration->warningLedPin = Gpio::E6;
} }
static void setupVbatt() { static void setupVbatt() {
@ -81,23 +81,23 @@ static void setupEtb() {
// Throttle #1 // Throttle #1
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = GPIOD_12; engineConfiguration->etbIo[0].controlPin = Gpio::D12;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = GPIOD_10; engineConfiguration->etbIo[0].directionPin1 = Gpio::D10;
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = GPIOD_11; engineConfiguration->etbIo[0].disablePin = Gpio::D11;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
// Throttle #2 // Throttle #2
// PWM pin // PWM pin
engineConfiguration->etbIo[1].controlPin = GPIOD_13; engineConfiguration->etbIo[1].controlPin = Gpio::D13;
// DIR pin // DIR pin
engineConfiguration->etbIo[1].directionPin1 = GPIOD_9; engineConfiguration->etbIo[1].directionPin1 = Gpio::D9;
// Disable pin // Disable pin
engineConfiguration->etbIo[1].disablePin = GPIOD_8; engineConfiguration->etbIo[1].disablePin = Gpio::D8;
// Unused // Unused
engineConfiguration->etbIo[1].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
// we only have pwm/dir, no dira/dirb // we only have pwm/dir, no dira/dirb
engineConfiguration->etb_use_two_wires = false; engineConfiguration->etb_use_two_wires = false;
@ -112,11 +112,11 @@ static void setupDefaultSensorInputs() {
#else #else
// Digital channel 1 as default - others not set // Digital channel 1 as default - others not set
engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_1; engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_1;
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; engineConfiguration->camInputs[0] = Gpio::Unassigned;
#endif #endif
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
engineConfiguration->triggerInputPins[2] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[2] = Gpio::Unassigned;
engineConfiguration->clt.adcChannel = PROTEUS_IN_CLT; engineConfiguration->clt.adcChannel = PROTEUS_IN_CLT;
@ -131,12 +131,12 @@ static void setupDefaultSensorInputs() {
static void setupSdCard() { static void setupSdCard() {
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
engineConfiguration->sdCardCsPin = GPIOD_2; engineConfiguration->sdCardCsPin = Gpio::D2;
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
} }
void setBoardConfigOverrides() { void setBoardConfigOverrides() {
@ -147,16 +147,16 @@ void setBoardConfigOverrides() {
engineConfiguration->clt.config.bias_resistor = 2700; engineConfiguration->clt.config.bias_resistor = 2700;
engineConfiguration->iat.config.bias_resistor = 2700; engineConfiguration->iat.config.bias_resistor = 2700;
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
#if defined(STM32F4) || defined(STM32F7) #if defined(STM32F4) || defined(STM32F7)
engineConfiguration->can2RxPin = GPIOB_12; engineConfiguration->can2RxPin = Gpio::B12;
engineConfiguration->can2TxPin = GPIOB_13; engineConfiguration->can2TxPin = Gpio::B13;
#endif #endif
engineConfiguration->lps25BaroSensorScl = GPIOB_10; engineConfiguration->lps25BaroSensorScl = Gpio::B10;
engineConfiguration->lps25BaroSensorSda = GPIOB_11; engineConfiguration->lps25BaroSensorSda = Gpio::B11;
} }
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
@ -202,8 +202,8 @@ void setBoardDefaultConfiguration() {
// If we're running as hardware CI, borrow a few extra pins for that // If we're running as hardware CI, borrow a few extra pins for that
#ifdef HARDWARE_CI #ifdef HARDWARE_CI
engineConfiguration->triggerSimulatorPins[0] = GPIOG_3; engineConfiguration->triggerSimulatorPins[0] = Gpio::G3;
engineConfiguration->triggerSimulatorPins[1] = GPIOG_2; engineConfiguration->triggerSimulatorPins[1] = Gpio::G2;
#endif #endif
} }

View File

@ -1,20 +1,20 @@
pins: pins:
- pin: 1 - pin: 1
id: [GPIOE_11, GPIOE_11] id: [E11, E11]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Digital trigger/switch input for instance Hall type CAM function: Digital trigger/switch input for instance Hall type CAM
ts_name: Digital 2 ts_name: Digital 2
type: din type: din
- pin: 2 - pin: 2
id: [GPIOE_12, GPIOE_12] id: [E12, E12]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Digital trigger/switch input for instance VSS function: Digital trigger/switch input for instance VSS
ts_name: Digital 3 ts_name: Digital 3
type: din type: din
- pin: 3 - pin: 3
id: [GPIOE_14, GPIOE_14] id: [E14, E14]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Digital trigger/switch input for instance Start Button function: Digital trigger/switch input for instance Start Button
ts_name: Digital 4 ts_name: Digital 4
@ -24,7 +24,7 @@ pins:
function: "Variable Reluctance #2 positive" function: "Variable Reluctance #2 positive"
type: vr type: vr
- id: GPIOE_8 - id: E8
class: event_inputs class: event_inputs
ts_name: VR 2 ts_name: VR 2
@ -32,7 +32,7 @@ pins:
function: "Variable Reluctance #1 positive" function: "Variable Reluctance #1 positive"
type: vr type: vr
- id: GPIOE_7 - id: E7
class: event_inputs class: event_inputs
ts_name: VR 1 ts_name: VR 1
@ -49,21 +49,21 @@ pins:
type: etb type: etb
- pin: 9 - pin: 9
id: [GPIOE_13, GPIOE_13] id: [E13, E13]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Digital trigger/switch input function: Digital trigger/switch input
ts_name: Digital 5 ts_name: Digital 5
type: din type: din
- pin: 10 - pin: 10
id: [GPIOC_6, GPIOC_6] id: [C6, C6]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Digital trigger/switch input function: Digital trigger/switch input
ts_name: Digital 1 ts_name: Digital 1
type: din type: din
- pin: 11 - pin: 11
id: [GPIOE_15, GPIOE_15] id: [E15, E15]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
function: Digital trigger/switch input function: Digital trigger/switch input
ts_name: Digital 6 ts_name: Digital 6
@ -119,32 +119,32 @@ pins:
type: 12v type: 12v
- pin: PD8 - pin: PD8
id: GPIOD_8 id: D8
class: outputs class: outputs
ts_name: STM32 PD8 ts_name: STM32 PD8
- pin: PD9 - pin: PD9
id: GPIOD_9 id: D9
class: outputs class: outputs
ts_name: STM32 PD9 ts_name: STM32 PD9
- pin: PD10 - pin: PD10
id: GPIOD_10 id: D10
class: outputs class: outputs
ts_name: STM32 PD10 ts_name: STM32 PD10
- pin: PD11 - pin: PD11
id: GPIOD_11 id: D11
class: outputs class: outputs
ts_name: STM32 PD11 ts_name: STM32 PD11
- pin: PD12 - pin: PD12
id: GPIOD_12 id: D12
class: outputs class: outputs
ts_name: STM32 PD12 ts_name: STM32 PD12
- pin: PD13 - pin: PD13
id: GPIOD_13 id: D13
class: outputs class: outputs
ts_name: STM32 PD13 ts_name: STM32 PD13

View File

@ -1,111 +1,111 @@
pins: pins:
- pin: 1 - pin: 1
id: GPIOA_8 id: A8
function: output function: output
class: outputs class: outputs
ts_name: Highside 2 ts_name: Highside 2
type: hs type: hs
- pin: 2 - pin: 2
id: GPIOA_9 id: A9
function: output function: output
class: outputs class: outputs
ts_name: Highside 1 ts_name: Highside 1
type: hs type: hs
- pin: 3 - pin: 3
id: GPIOD_7 id: D7
function: "Injector #1" function: "Injector #1"
class: outputs class: outputs
ts_name: Lowside 1 ts_name: Lowside 1
type: ls type: ls
- pin: 4 - pin: 4
id: GPIOG_10 id: G10
function: "Injector #3" function: "Injector #3"
class: outputs class: outputs
ts_name: Lowside 3 ts_name: Lowside 3
type: ls type: ls
- pin: 5 - pin: 5
id: GPIOG_12 id: G12
function: "Injector #5" function: "Injector #5"
class: outputs class: outputs
ts_name: Lowside 5 ts_name: Lowside 5
type: ls type: ls
- pin: 6 - pin: 6
id: GPIOG_13 id: G13
function: "Injector #6" function: "Injector #6"
class: outputs class: outputs
ts_name: Lowside 6 ts_name: Lowside 6
type: ls type: ls
- pin: 7 - pin: 7
id: GPIOG_14 id: G14
function: "Injector #7" function: "Injector #7"
class: outputs class: outputs
ts_name: Lowside 7 ts_name: Lowside 7
type: ls type: ls
- pin: 8 - pin: 8
id: GPIOB_5 id: B5
function: "Injector #9" function: "Injector #9"
class: outputs class: outputs
ts_name: Lowside 9 ts_name: Lowside 9
type: ls type: ls
- pin: 9 - pin: 9
id: GPIOB_7 id: B7
function: "Injector #11" function: "Injector #11"
class: outputs class: outputs
ts_name: Lowside 11 ts_name: Lowside 11
type: ls type: ls
- pin: 10 - pin: 10
id: GPIOB_9 id: B9
function: main relay function: main relay
class: outputs class: outputs
ts_name: Lowside 13 ts_name: Lowside 13
type: ls type: ls
- pin: 11 - pin: 11
id: GPIOE_0 id: E0
function: Lowside output function: Lowside output
class: outputs class: outputs
ts_name: Lowside 14 ts_name: Lowside 14
type: ls type: ls
- pin: 12 - pin: 12
id: GPIOE_1 id: E1
function: radiator fan relay function: radiator fan relay
class: outputs class: outputs
ts_name: Lowside 15 ts_name: Lowside 15
type: ls type: ls
- pin: 13 - pin: 13
id: GPIOD_15 id: D15
function: output function: output
class: outputs class: outputs
ts_name: Highside 3 ts_name: Highside 3
type: hs type: hs
- pin: 14 - pin: 14
id: GPIOD_14 id: D14
function: output function: output
class: outputs class: outputs
ts_name: Highside 4 ts_name: Highside 4
type: hs type: hs
- pin: 15 - pin: 15
id: GPIOG_9 id: G9
function: "Injector #2" function: "Injector #2"
class: outputs class: outputs
ts_name: Lowside 2 ts_name: Lowside 2
type: ls type: ls
- pin: 16 - pin: 16
id: GPIOG_11 id: G11
function: "Injector #4" function: "Injector #4"
class: outputs class: outputs
ts_name: Lowside 4 ts_name: Lowside 4
@ -120,35 +120,35 @@ pins:
type: gnd type: gnd
- pin: 19 - pin: 19
id: GPIOB_4 id: B4
function: "Injector #8" function: "Injector #8"
class: outputs class: outputs
ts_name: Lowside 8 ts_name: Lowside 8
type: ls type: ls
- pin: 20 - pin: 20
id: GPIOB_6 id: B6
function: "Injector #10" function: "Injector #10"
class: outputs class: outputs
ts_name: Lowside 10 ts_name: Lowside 10
type: ls type: ls
- pin: 21 - pin: 21
id: GPIOB_8 id: B8
function: "Injector #12" function: "Injector #12"
class: outputs class: outputs
ts_name: Lowside 12 ts_name: Lowside 12
type: ls type: ls
- pin: 22 - pin: 22
id: GPIOC_9 id: C9
function: Ignition cylinder 3 function: Ignition cylinder 3
class: outputs class: outputs
ts_name: Ign 3 ts_name: Ign 3
type: hl type: hl
- pin: 23 - pin: 23
id: GPIOE_2 id: E2
function: Fuel Pump function: Fuel Pump
class: outputs class: outputs
ts_name: Lowside 16 ts_name: Lowside 16
@ -159,77 +159,77 @@ pins:
type: gnd type: gnd
- pin: 25 - pin: 25
id: GPIOG_2 id: G2
function: Ignition cylinder 12 function: Ignition cylinder 12
class: outputs class: outputs
ts_name: Ign 12 ts_name: Ign 12
type: hl type: hl
- pin: 26 - pin: 26
id: GPIOG_3 id: G3
function: Ignition cylinder 11 function: Ignition cylinder 11
class: outputs class: outputs
ts_name: Ign 11 ts_name: Ign 11
type: hl type: hl
- pin: 27 - pin: 27
id: GPIOG_4 id: G4
function: Ignition cylinder 10 function: Ignition cylinder 10
class: outputs class: outputs
ts_name: Ign 10 ts_name: Ign 10
type: hl type: hl
- pin: 28 - pin: 28
id: GPIOG_5 id: G5
function: Ignition cylinder 9 function: Ignition cylinder 9
class: outputs class: outputs
ts_name: Ign 9 ts_name: Ign 9
type: hl type: hl
- pin: 29 - pin: 29
id: GPIOG_6 id: G6
function: Ignition cylinder 8 function: Ignition cylinder 8
class: outputs class: outputs
ts_name: Ign 8 ts_name: Ign 8
type: hl type: hl
- pin: 30 - pin: 30
id: GPIOG_7 id: G7
function: Ignition cylinder 7 function: Ignition cylinder 7
class: outputs class: outputs
ts_name: Ign 7 ts_name: Ign 7
type: hl type: hl
- pin: 31 - pin: 31
id: GPIOG_8 id: G8
function: Ignition cylinder 6 function: Ignition cylinder 6
class: outputs class: outputs
ts_name: Ign 6 ts_name: Ign 6
type: hl type: hl
- pin: 32 - pin: 32
id: GPIOC_7 id: C7
function: Ignition cylinder 5 function: Ignition cylinder 5
class: outputs class: outputs
ts_name: Ign 5 ts_name: Ign 5
type: hl type: hl
- pin: 33 - pin: 33
id: GPIOC_8 id: C8
function: Ignition cylinder 4 function: Ignition cylinder 4
class: outputs class: outputs
ts_name: Ign 4 ts_name: Ign 4
type: hl type: hl
- pin: 34 - pin: 34
id: GPIOD_3 id: D3
function: Ignition cylinder 2 function: Ignition cylinder 2
class: outputs class: outputs
ts_name: Ign 2 ts_name: Ign 2
type: hl type: hl
- pin: 35 - pin: 35
id: GPIOD_4 id: D4
function: Ignition cylinder 1 function: Ignition cylinder 1
class: outputs class: outputs
ts_name: Ign 1 ts_name: Ign 1

View File

@ -48,56 +48,56 @@ pins:
type: 12v type: 12v
- pin: 13 - pin: 13
id: [GPIOC_0, EFI_ADC_10] id: [C0, EFI_ADC_10]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 1 ts_name: Analog Volt 1
function: "Analog Voltage Input #1 MAP" function: "Analog Voltage Input #1 MAP"
type: av type: av
- pin: 14 - pin: 14
id: [GPIOC_2, EFI_ADC_12] id: [C2, EFI_ADC_12]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 3 ts_name: Analog Volt 3
function: "Analog Voltage Input #3" function: "Analog Voltage Input #3"
type: av type: av
- pin: 15 - pin: 15
id: [GPIOA_0, EFI_ADC_0] id: [A0, EFI_ADC_0]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 5 ts_name: Analog Volt 5
function: "Analog Voltage Input #5" function: "Analog Voltage Input #5"
type: av type: av
- pin: 16 - pin: 16
id: [GPIOA_2, EFI_ADC_2] id: [A2, EFI_ADC_2]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 7 ts_name: Analog Volt 7
function: "Analog Voltage Input #7" function: "Analog Voltage Input #7"
type: av type: av
- pin: 17 - pin: 17
id: [GPIOA_4, EFI_ADC_4] id: [A4, EFI_ADC_4]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 9 ts_name: Analog Volt 9
function: "Analog Voltage Input #9" function: "Analog Voltage Input #9"
type: av type: av
- pin: 18 - pin: 18
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 11 ts_name: Analog Volt 11
function: "Analog Voltage Input #11" function: "Analog Voltage Input #11"
type: av type: av
- pin: 19 - pin: 19
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Temp 1 ts_name: Analog Temp 1
function: "Analog Thermistor Input #1" function: "Analog Thermistor Input #1"
type: at type: at
- pin: 20 - pin: 20
id: [GPIOB_0, EFI_ADC_8] id: [B0, EFI_ADC_8]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Temp 3 ts_name: Analog Temp 3
function: "Analog Thermistor Input #3 (CLT)" function: "Analog Thermistor Input #3 (CLT)"
@ -116,35 +116,35 @@ pins:
type: sgnd type: sgnd
- pin: 24 - pin: 24
id: [GPIOC_1, EFI_ADC_11] id: [C1, EFI_ADC_11]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 2 ts_name: Analog Volt 2
function: "Analog Voltage Input #2 TPS" function: "Analog Voltage Input #2 TPS"
type: av type: av
- pin: 25 - pin: 25
id: [GPIOC_3, EFI_ADC_13] id: [C3, EFI_ADC_13]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 4 ts_name: Analog Volt 4
function: "Analog Voltage Input #4" function: "Analog Voltage Input #4"
type: av type: av
- pin: 26 - pin: 26
id: [GPIOA_1, EFI_ADC_1] id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 6 ts_name: Analog Volt 6
function: "Analog Voltage Input #6" function: "Analog Voltage Input #6"
type: av type: av
- pin: 27 - pin: 27
id: [GPIOA_3, EFI_ADC_3] id: [A3, EFI_ADC_3]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 8 ts_name: Analog Volt 8
function: "Analog Voltage Input #8" function: "Analog Voltage Input #8"
type: av type: av
- pin: 28 - pin: 28
id: [GPIOA_5, EFI_ADC_5] id: [A5, EFI_ADC_5]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Volt 10 ts_name: Analog Volt 10
function: "Analog Voltage Input #10" function: "Analog Voltage Input #10"
@ -155,14 +155,14 @@ pins:
type: sgnd type: sgnd
- pin: 30 - pin: 30
id: [GPIOC_5, EFI_ADC_15] id: [C5, EFI_ADC_15]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Temp 2 ts_name: Analog Temp 2
function: Intake air temperature IAT function: Intake air temperature IAT
type: at type: at
- pin: 31 - pin: 31
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
ts_name: Analog Temp 4 ts_name: Analog Temp 4
function: "Analog Thermistor Input #4" function: "Analog Thermistor Input #4"

View File

@ -9,12 +9,12 @@
// knock 1 - pin PF4 // knock 1 - pin PF4
#define KNOCK_ADC_CH1 ADC_CHANNEL_IN14 #define KNOCK_ADC_CH1 ADC_CHANNEL_IN14
#define KNOCK_PIN_CH1 GPIOF_4 #define KNOCK_PIN_CH1 Gpio::F4
// knock 2 - pin PF5 // knock 2 - pin PF5
#define KNOCK_HAS_CH2 true #define KNOCK_HAS_CH2 true
#define KNOCK_ADC_CH2 ADC_CHANNEL_IN15 #define KNOCK_ADC_CH2 ADC_CHANNEL_IN15
#define KNOCK_PIN_CH2 GPIOF_5 #define KNOCK_PIN_CH2 Gpio::F5
// Sample rate & time - depends on the exact MCU // Sample rate & time - depends on the exact MCU
#define KNOCK_SAMPLE_TIME ADC_SAMPLE_84 #define KNOCK_SAMPLE_TIME ADC_SAMPLE_84

View File

@ -7,68 +7,68 @@
#pragma once #pragma once
#define PROTEUS_LS_1 GPIOD_7 #define PROTEUS_LS_1 Gpio::D7
// pin 15/black35 // pin 15/black35
#define PROTEUS_LS_2 GPIOG_9 #define PROTEUS_LS_2 Gpio::G9
// pin 4/black35 // pin 4/black35
#define PROTEUS_LS_3 GPIOG_10 #define PROTEUS_LS_3 Gpio::G10
// pin 16/black35 // pin 16/black35
#define PROTEUS_LS_4 GPIOG_11 #define PROTEUS_LS_4 Gpio::G11
// pin 5/black35 // pin 5/black35
#define PROTEUS_LS_5 GPIOG_12 #define PROTEUS_LS_5 Gpio::G12
// pin 6/black35 // pin 6/black35
#define PROTEUS_LS_6 GPIOG_13 #define PROTEUS_LS_6 Gpio::G13
// pin 7/black35 // pin 7/black35
#define PROTEUS_LS_7 GPIOG_14 #define PROTEUS_LS_7 Gpio::G14
#define PROTEUS_LS_8 GPIOB_4 #define PROTEUS_LS_8 Gpio::B4
#define PROTEUS_LS_9 GPIOB_5 #define PROTEUS_LS_9 Gpio::B5
// pin 20/black35 // pin 20/black35
#define PROTEUS_LS_10 GPIOB_6 #define PROTEUS_LS_10 Gpio::B6
#define PROTEUS_LS_11 GPIOB_7 #define PROTEUS_LS_11 Gpio::B7
#define PROTEUS_LS_12 GPIOB_8 #define PROTEUS_LS_12 Gpio::B8
// pin 10/black35 // pin 10/black35
#define PROTEUS_LS_13 GPIOB_9 #define PROTEUS_LS_13 Gpio::B9
#define PROTEUS_LS_14 GPIOE_0 #define PROTEUS_LS_14 Gpio::E0
// pin 12/black35 // pin 12/black35
#define PROTEUS_LS_15 GPIOE_1 #define PROTEUS_LS_15 Gpio::E1
// pin 23/black35 // pin 23/black35
#define PROTEUS_LS_16 GPIOE_2 #define PROTEUS_LS_16 Gpio::E2
// pin 2/black35 // pin 2/black35
#define PROTEUS_HS_1 GPIOA_9 #define PROTEUS_HS_1 Gpio::A9
// pin 1/black35 // pin 1/black35
#define PROTEUS_HS_2 GPIOA_8 #define PROTEUS_HS_2 Gpio::A8
#define PROTEUS_HS_3 GPIOD_15 #define PROTEUS_HS_3 Gpio::D15
#define PROTEUS_HS_4 GPIOD_14 #define PROTEUS_HS_4 Gpio::D14
// pin 35/black35 // pin 35/black35
#define PROTEUS_IGN_1 GPIOD_4 #define PROTEUS_IGN_1 Gpio::D4
// pin 34/black35 // pin 34/black35
#define PROTEUS_IGN_2 GPIOD_3 #define PROTEUS_IGN_2 Gpio::D3
// pin 22/black35 // pin 22/black35
#define PROTEUS_IGN_3 GPIOC_9 #define PROTEUS_IGN_3 Gpio::C9
#define PROTEUS_IGN_4 GPIOC_8 #define PROTEUS_IGN_4 Gpio::C8
#define PROTEUS_IGN_5 GPIOC_7 #define PROTEUS_IGN_5 Gpio::C7
#define PROTEUS_IGN_6 GPIOG_8 #define PROTEUS_IGN_6 Gpio::G8
#define PROTEUS_IGN_7 GPIOG_7 #define PROTEUS_IGN_7 Gpio::G7
#define PROTEUS_IGN_8 GPIOG_6 #define PROTEUS_IGN_8 Gpio::G6
#define PROTEUS_IGN_9 GPIOG_5 #define PROTEUS_IGN_9 Gpio::G5
#define PROTEUS_IGN_10 GPIOG_4 #define PROTEUS_IGN_10 Gpio::G4
#define PROTEUS_IGN_11 GPIOG_3 #define PROTEUS_IGN_11 Gpio::G3
#define PROTEUS_IGN_12 GPIOG_2 #define PROTEUS_IGN_12 Gpio::G2
// Analog Temp 1 = PC4 // Analog Temp 1 = PC4
#define PROTEUS_IN_ANALOG_TEMP_1 EFI_ADC_14 #define PROTEUS_IN_ANALOG_TEMP_1 EFI_ADC_14
@ -119,12 +119,12 @@
// PA6 // PA6
#define PROTEUS_IN_ANALOG_VOLT_11 EFI_ADC_6 #define PROTEUS_IN_ANALOG_VOLT_11 EFI_ADC_6
#define PROTEUS_VR_1 GPIOE_7 #define PROTEUS_VR_1 Gpio::E7
#define PROTEUS_VR_2 GPIOE_8 #define PROTEUS_VR_2 Gpio::E8
#define PROTEUS_DIGITAL_1 GPIOC_6 #define PROTEUS_DIGITAL_1 Gpio::C6
#define PROTEUS_DIGITAL_2 GPIOE_11 #define PROTEUS_DIGITAL_2 Gpio::E11
#define PROTEUS_DIGITAL_3 GPIOE_12 #define PROTEUS_DIGITAL_3 Gpio::E12
#define PROTEUS_DIGITAL_4 GPIOE_14 #define PROTEUS_DIGITAL_4 Gpio::E14
#define PROTEUS_DIGITAL_5 GPIOE_13 #define PROTEUS_DIGITAL_5 Gpio::E13
#define PROTEUS_DIGITAL_6 GPIOE_15 #define PROTEUS_DIGITAL_6 Gpio::E15

View File

@ -10,4 +10,4 @@ endif
DDEFS += -DDEFAULT_ENGINE_TYPE=DEFAULT_FRANKENSO DDEFS += -DDEFAULT_ENGINE_TYPE=DEFAULT_FRANKENSO
# Add them all together # Add them all together
DDEFS += -DEFI_USE_OSC=TRUE -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOE_3 -DFIRMWARE_ID=\"skeleton\" DDEFS += -DEFI_USE_OSC=TRUE -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::E3 -DFIRMWARE_ID=\"skeleton\"

View File

@ -36,12 +36,12 @@
static void setupTle8888() { static void setupTle8888() {
// Enable the SPI channel and set up the SPI pins // Enable the SPI channel and set up the SPI pins
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
engineConfiguration->spi3mosiPin = GPIOB_5; engineConfiguration->spi3mosiPin = Gpio::B5;
engineConfiguration->spi3misoPin = GPIOB_4; engineConfiguration->spi3misoPin = Gpio::B4;
engineConfiguration->spi3sckPin = GPIOB_3; engineConfiguration->spi3sckPin = Gpio::B3;
// SPI chip select is often independent of the SPI pin limitations // SPI chip select is often independent of the SPI pin limitations
engineConfiguration->tle8888_cs = GPIOD_5; engineConfiguration->tle8888_cs = Gpio::D5;
// Set SPI device // Set SPI device
engineConfiguration->tle8888spiDevice = SPI_DEVICE_3; engineConfiguration->tle8888spiDevice = SPI_DEVICE_3;
@ -59,9 +59,9 @@ static void setupTle9201Etb() {
// This chip has PWM/DIR, not dira/dirb // This chip has PWM/DIR, not dira/dirb
engineConfiguration->etb_use_two_wires = false; engineConfiguration->etb_use_two_wires = false;
// PWM and DIR pins // PWM and DIR pins
engineConfiguration->etbIo[0].controlPin = GPIOC_7; engineConfiguration->etbIo[0].controlPin = Gpio::C7;
engineConfiguration->etbIo[0].directionPin1 = GPIOA_8; engineConfiguration->etbIo[0].directionPin1 = Gpio::A8;
engineConfiguration->etbIo[0].directionPin2 = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
} }
// Configure key sensors inputs. // Configure key sensors inputs.
@ -72,10 +72,10 @@ static void setupDefaultSensorInputs() {
// Engine rotation position sensors // Engine rotation position sensors
// Trigger is our primary timing signal, and usually comes from the crank. // Trigger is our primary timing signal, and usually comes from the crank.
// trigger inputs up TRIGGER_SUPPORTED_CHANNELS (2) // trigger inputs up TRIGGER_SUPPORTED_CHANNELS (2)
engineConfiguration->triggerInputPins[0] = GPIOC_6; engineConfiguration->triggerInputPins[0] = Gpio::C6;
engineConfiguration->triggerInputPins[1] = GPIO_UNASSIGNED; engineConfiguration->triggerInputPins[1] = Gpio::Unassigned;
// A secondary Cam signal up to CAM_INPUTS_COUNT (4) // A secondary Cam signal up to CAM_INPUTS_COUNT (4)
engineConfiguration->camInputs[0] = GPIOA_5; engineConfiguration->camInputs[0] = Gpio::A5;
// Throttle Body Position Sensors, second channel is a check/fail-safe // Throttle Body Position Sensors, second channel is a check/fail-safe
// tps = "20 - AN volt 5" // tps = "20 - AN volt 5"
@ -84,7 +84,7 @@ static void setupDefaultSensorInputs() {
// Throttle pedal inputs // Throttle pedal inputs
// Idle/Up/Closed (no pressure on pedal) pin // Idle/Up/Closed (no pressure on pedal) pin
engineConfiguration->throttlePedalUpPin = GPIO_UNASSIGNED; engineConfiguration->throttlePedalUpPin = Gpio::Unassigned;
// If the ETB has analog feedback we can use it for closed loop control. // If the ETB has analog feedback we can use it for closed loop control.
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_2; engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_2;
@ -128,32 +128,32 @@ void setBoardDefaultConfiguration() {
// Set indicator LED pins. // Set indicator LED pins.
// This is often redundant with efifeatures.h or the run-time config // This is often redundant with efifeatures.h or the run-time config
engineConfiguration->triggerErrorPin = GPIOE_1; engineConfiguration->triggerErrorPin = Gpio::E1;
engineConfiguration->communicationLedPin = GPIOE_2; engineConfiguration->communicationLedPin = Gpio::E2;
engineConfiguration->runningLedPin = GPIOE_4; engineConfiguration->runningLedPin = Gpio::E4;
engineConfiguration->warningLedPin = GPIOE_5; engineConfiguration->warningLedPin = Gpio::E5;
engineConfiguration->errorLedPin = GPIOE_7; engineConfiguration->errorLedPin = Gpio::E7;
// Set injector pins and the pin output mode // Set injector pins and the pin output mode
engineConfiguration->injectionPinMode = OM_DEFAULT; engineConfiguration->injectionPinMode = OM_DEFAULT;
engineConfiguration->injectionPins[0] = GPIOE_14; engineConfiguration->injectionPins[0] = Gpio::E14;
engineConfiguration->injectionPins[1] = GPIOE_13; engineConfiguration->injectionPins[1] = Gpio::E13;
engineConfiguration->injectionPins[2] = GPIOE_12; engineConfiguration->injectionPins[2] = Gpio::E12;
engineConfiguration->injectionPins[3] = GPIOE_11; engineConfiguration->injectionPins[3] = Gpio::E11;
// Disable the remainder only when they may never be assigned // Disable the remainder only when they may never be assigned
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {
engineConfiguration->injectionPins[i] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[i] = Gpio::Unassigned;
} }
// Do the same for ignition outputs // Do the same for ignition outputs
engineConfiguration->ignitionPinMode = OM_DEFAULT; engineConfiguration->ignitionPinMode = OM_DEFAULT;
engineConfiguration->ignitionPins[0] = GPIOD_4; engineConfiguration->ignitionPins[0] = Gpio::D4;
engineConfiguration->ignitionPins[1] = GPIOD_3; engineConfiguration->ignitionPins[1] = Gpio::D3;
engineConfiguration->ignitionPins[2] = GPIOD_2; engineConfiguration->ignitionPins[2] = Gpio::D2;
engineConfiguration->ignitionPins[3] = GPIOD_1; engineConfiguration->ignitionPins[3] = Gpio::D1;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT; i++) { for (int i = 4; i < MAX_CYLINDER_COUNT; i++) {
engineConfiguration->ignitionPins[i] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[i] = Gpio::Unassigned;
} }
// Board-specific scaling values to convert ADC fraction to Volts. // Board-specific scaling values to convert ADC fraction to Volts.
@ -184,17 +184,17 @@ void setBoardDefaultConfiguration() {
// Configure the TLE8888 half bridges (pushpull, lowside, or high-low) // Configure the TLE8888 half bridges (pushpull, lowside, or high-low)
// TLE8888_IN11 -> TLE8888_OUT21 // TLE8888_IN11 -> TLE8888_OUT21
// TLE8888_PIN_21: "35 - GP Out 1" // Gpio::TLE8888_PIN_21: "35 - GP Out 1"
engineConfiguration->fuelPumpPin = TLE8888_PIN_21; engineConfiguration->fuelPumpPin = Gpio::TLE8888_PIN_21;
// TLE8888 high current low side: VVT2 IN9 / OUT5 // TLE8888 high current low side: VVT2 IN9 / OUT5
// TLE8888_PIN_4: "3 - Lowside 2" // Gpio::TLE8888_PIN_4: "3 - Lowside 2"
engineConfiguration->idle.solenoidPin = TLE8888_PIN_5; engineConfiguration->idle.solenoidPin = Gpio::TLE8888_PIN_5;
// TLE8888_PIN_22: "34 - GP Out 2" // Gpio::TLE8888_PIN_22: "34 - GP Out 2"
engineConfiguration->fanPin = TLE8888_PIN_22; engineConfiguration->fanPin = Gpio::TLE8888_PIN_22;
// The "required" hardware is done - set some reasonable input defaults // The "required" hardware is done - set some reasonable input defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();

View File

@ -32,7 +32,7 @@ pins:
# TC4427 ignition outputs (5v) # TC4427 ignition outputs (5v)
- pin: 9 - pin: 9
id: GPIOD_4 id: D4
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 1 function: Ignition 1
@ -40,7 +40,7 @@ pins:
type: ign type: ign
- pin: 10 - pin: 10
id: GPIOD_3 id: D3
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 2 function: Ignition 2
@ -48,7 +48,7 @@ pins:
type: ign type: ign
- pin: 11 - pin: 11
id: GPIOD_2 id: D2
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 3 function: Ignition 3
@ -56,7 +56,7 @@ pins:
type: ign type: ign
- pin: 12 - pin: 12
id: GPIOD_1 id: D1
class: outputs class: outputs
color: dark blue color: dark blue
function: Ignition 4 function: Ignition 4
@ -64,7 +64,7 @@ pins:
type: ign type: ign
- pin: 13 - pin: 13
id: GPIOD_6 id: D6
class: outputs class: outputs
color: yellow color: yellow
function: Alternator (see JP2 jumper note) function: Alternator (see JP2 jumper note)
@ -73,7 +73,7 @@ pins:
# TC4427 general purpose output (selectable 5v/12v) # TC4427 general purpose output (selectable 5v/12v)
- pin: 14 - pin: 14
id: GPIOD_7 id: D7
class: outputs class: outputs
color: yellow color: yellow
function: (see JP2 jumper note) function: (see JP2 jumper note)
@ -81,7 +81,7 @@ pins:
type: gp_high type: gp_high
- pin: 18 - pin: 18
id: [GPIOA_0, EFI_ADC_0] id: [A0, EFI_ADC_0]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: red color: red
function: CLT sensor function: CLT sensor
@ -89,7 +89,7 @@ pins:
type: at type: at
- pin: 19 - pin: 19
id: [GPIOC_2, EFI_ADC_12] id: [C2, EFI_ADC_12]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: red color: red
function: Starting from version 0.5.0 this pin can be used as 5V input for USB connection through main connector (No need to open case to access micro-USB connector) function: Starting from version 0.5.0 this pin can be used as 5V input for USB connection through main connector (No need to open case to access micro-USB connector)
@ -97,7 +97,7 @@ pins:
type: av type: av
- pin: 20 - pin: 20
id: [GPIOC_3, EFI_ADC_13] id: [C3, EFI_ADC_13]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: red left color: red left
function: Throttle position sensor (TPS) function: Throttle position sensor (TPS)
@ -105,14 +105,14 @@ pins:
type: av type: av
- pin: 22 - pin: 22
id: [GPIOA_3, EFI_ADC_3] id: [A3, EFI_ADC_3]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: dark green color: dark green
ts_name: 22 - AN temp 4 ts_name: 22 - AN temp 4
type: at type: at
- pin: 23 - pin: 23
id: [GPIOA_1, EFI_ADC_1] id: [A1, EFI_ADC_1]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: dark green color: dark green
function: IAT sensor function: IAT sensor
@ -120,7 +120,7 @@ pins:
type: at type: at
- pin: 24 - pin: 24
id: [GPIOA_2, EFI_ADC_2] id: [A2, EFI_ADC_2]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: dark green color: dark green
ts_name: 24 - AN temp 3 ts_name: 24 - AN temp 3
@ -128,21 +128,21 @@ pins:
# RC filter input for hall # RC filter input for hall
- pin: 25 - pin: 25
id: [GPIOA_5, GPIOA_5] id: [A5, A5]
class: [event_inputs, switch_inputs] class: [event_inputs, switch_inputs]
color: light blue right color: light blue right
ts_name: 25 - Hall Cam ts_name: 25 - Hall Cam
type: hall type: hall
- pin: 26 - pin: 26
id: [GPIOA_6, EFI_ADC_6] id: [A6, EFI_ADC_6]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: light blue color: light blue
ts_name: 26 - AN volt 2 ts_name: 26 - AN volt 2
type: av type: av
- pin: 27 - pin: 27
id: [GPIOC_0, EFI_ADC_10] id: [C0, EFI_ADC_10]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: light blue color: light blue
function: MAP sensor function: MAP sensor
@ -150,21 +150,21 @@ pins:
type: av type: av
- pin: 28 - pin: 28
id: [GPIOA_4, EFI_ADC_4] id: [A4, EFI_ADC_4]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: light blue left color: light blue left
ts_name: 28 - AN volt 10 ts_name: 28 - AN volt 10
type: av type: av
- pin: 30 - pin: 30
id: [GPIOC_5, EFI_ADC_15] id: [C5, EFI_ADC_15]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: pink color: pink
ts_name: 30 - AN volt 7 ts_name: 30 - AN volt 7
type: av type: av
- pin: 31 - pin: 31
id: [GPIOA_7, EFI_ADC_7] id: [A7, EFI_ADC_7]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: pink color: pink
function: Throttle Pedal Position Sensor (PPS) function: Throttle Pedal Position Sensor (PPS)
@ -172,7 +172,7 @@ pins:
type: av type: av
- pin: 32 - pin: 32
id: [GPIOC_4, EFI_ADC_14] id: [C4, EFI_ADC_14]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: pink color: pink
function: External wideband O2 sensor function: External wideband O2 sensor
@ -207,7 +207,7 @@ pins:
type: [gp_low, gp_pp] type: [gp_low, gp_pp]
- pin: 36 - pin: 36
id: [GPIOB_0, EFI_ADC_8] id: [B0, EFI_ADC_8]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: orange left color: orange left
ts_name: 36 - AN volt 8 ts_name: 36 - AN volt 8
@ -230,7 +230,7 @@ pins:
type: inj type: inj
- pin: 40 - pin: 40
id: [GPIOB_1, EFI_ADC_9] id: [B1, EFI_ADC_9]
class: [switch_inputs, analog_inputs] class: [switch_inputs, analog_inputs]
color: grey color: grey
ts_name: 40 - AN volt 9 ts_name: 40 - AN volt 9
@ -262,7 +262,7 @@ pins:
type: [gp_low, gp_pp] type: [gp_low, gp_pp]
- pin: 45 - pin: 45
id: GPIOC_6 id: C6
class: event_inputs class: event_inputs
color: light green right color: light green right
function: Crank VR+/hall function: Crank VR+/hall

View File

@ -239,11 +239,6 @@
#define EFI_SPI3_AF 6 #define EFI_SPI3_AF 6
#define EFI_I2C_SCL_BRAIN_PIN GPIOB_6
#define EFI_I2C_SDA_BRAIN_PIN GPIOB_7
#define EFI_I2C_AF 4
/** /**
* Patched version of ChibiOS/RT support extra details in the system error messages * Patched version of ChibiOS/RT support extra details in the system error messages
*/ */
@ -294,7 +289,7 @@
#endif #endif
#ifndef LED_CRITICAL_ERROR_BRAIN_PIN #ifndef LED_CRITICAL_ERROR_BRAIN_PIN
#define LED_CRITICAL_ERROR_BRAIN_PIN GPIOD_14 #define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::D14
#endif #endif
#ifndef LED_ERROR_BRAIN_PIN_MODE #ifndef LED_ERROR_BRAIN_PIN_MODE
#define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT #define LED_ERROR_BRAIN_PIN_MODE DEFAULT_OUTPUT
@ -339,8 +334,8 @@
// todo: start using consoleSerial{Tx,Rx}Pin // todo: start using consoleSerial{Tx,Rx}Pin
#define EFI_CONSOLE_AF 7 #define EFI_CONSOLE_AF 7
#define TS_SERIAL_AF 7 #define TS_SERIAL_AF 7
#define EFI_CONSOLE_TX_BRAIN_PIN GPIOC_10 #define EFI_CONSOLE_TX_BRAIN_PIN Gpio::C10
#define EFI_CONSOLE_RX_BRAIN_PIN GPIOC_11 #define EFI_CONSOLE_RX_BRAIN_PIN Gpio::C11
// todo: document the limitations of DMA mode for the UART. // todo: document the limitations of DMA mode for the UART.
#undef TS_UART_DMA_MODE #undef TS_UART_DMA_MODE

View File

@ -14,9 +14,9 @@
#define BOARD_NAME "Subaru EG33/STM32F765 for RusEFI" #define BOARD_NAME "Subaru EG33/STM32F765 for RusEFI"
#define EFI_USB_AF 10U #define EFI_USB_AF 10U
//#define EFI_USB_SERIAL_ID GPIOA_10 //#define EFI_USB_SERIAL_ID Gpio::A10
#define EFI_USB_SERIAL_DM GPIOA_11 #define EFI_USB_SERIAL_DM Gpio::A11
#define EFI_USB_SERIAL_DP GPIOA_12 #define EFI_USB_SERIAL_DP Gpio::A12
/* /*
* Board oscillators-related settings. * Board oscillators-related settings.

View File

@ -14,7 +14,7 @@ ifeq ($(USE_BOOTLOADER),yes)
endif endif
#LED #LED
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOG_7 DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::G7
# We are running on Subaru EG33 hardware! # We are running on Subaru EG33 hardware!
DDEFS += -DHW_SUBARU_EG33=1 DDEFS += -DHW_SUBARU_EG33=1

View File

@ -13,11 +13,11 @@
void setSerialConfigurationOverrides() { void setSerialConfigurationOverrides() {
engineConfiguration->useSerialPort = false; engineConfiguration->useSerialPort = false;
engineConfiguration->binarySerialTxPin = GPIOE_1; engineConfiguration->binarySerialTxPin = Gpio::E1;
engineConfiguration->binarySerialRxPin = GPIOE_0; engineConfiguration->binarySerialRxPin = Gpio::E0;
/* actually Bluetooth/WiFi interface */ /* actually Bluetooth/WiFi interface */
//engineConfiguration->consoleSerialTxPin = GPIOC_10; //engineConfiguration->consoleSerialTxPin = Gpio::C10;
//engineConfiguration->consoleSerialRxPin = GPIOC_11; //engineConfiguration->consoleSerialRxPin = Gpio::C11;
engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED; engineConfiguration->tunerStudioSerialSpeed = SERIAL_SPEED;
engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED; engineConfiguration->uartConsoleSerialSpeed = SERIAL_SPEED;
} }
@ -25,7 +25,7 @@ void setSerialConfigurationOverrides() {
void setSdCardConfigurationOverrides() { void setSdCardConfigurationOverrides() {
engineConfiguration->is_enabled_spi_1 = false; engineConfiguration->is_enabled_spi_1 = false;
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1; engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1;
engineConfiguration->sdCardCsPin = GPIOA_2; engineConfiguration->sdCardCsPin = Gpio::A2;
engineConfiguration->isSdCardEnabled = false; engineConfiguration->isSdCardEnabled = false;
} }
@ -72,62 +72,62 @@ void setBoardDefaultConfiguration() {
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE; engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_NONE;
/* Injectors */ /* Injectors */
engineConfiguration->injectionPins[1 - 1] = MC33810_0_OUT_0; engineConfiguration->injectionPins[1 - 1] = Gpio::MC33810_0_OUT_0;
engineConfiguration->injectionPins[2 - 1] = MC33810_1_OUT_0; engineConfiguration->injectionPins[2 - 1] = Gpio::MC33810_1_OUT_0;
engineConfiguration->injectionPins[3 - 1] = MC33810_0_OUT_1; engineConfiguration->injectionPins[3 - 1] = Gpio::MC33810_0_OUT_1;
engineConfiguration->injectionPins[4 - 1] = MC33810_1_OUT_1; engineConfiguration->injectionPins[4 - 1] = Gpio::MC33810_1_OUT_1;
engineConfiguration->injectionPins[5 - 1] = MC33810_0_OUT_2; engineConfiguration->injectionPins[5 - 1] = Gpio::MC33810_0_OUT_2;
engineConfiguration->injectionPins[6 - 1] = MC33810_1_OUT_2; engineConfiguration->injectionPins[6 - 1] = Gpio::MC33810_1_OUT_2;
/* Additional, not used for EG33 */ /* Additional, not used for EG33 */
engineConfiguration->injectionPins[7 - 1] = MC33810_0_OUT_3; engineConfiguration->injectionPins[7 - 1] = Gpio::MC33810_0_OUT_3;
engineConfiguration->injectionPins[8 - 1] = MC33810_1_OUT_3; engineConfiguration->injectionPins[8 - 1] = Gpio::MC33810_1_OUT_3;
/* Ignition */ /* Ignition */
engineConfiguration->ignitionPins[1 - 1] = MC33810_1_GD_3; engineConfiguration->ignitionPins[1 - 1] = Gpio::MC33810_1_GD_3;
engineConfiguration->ignitionPins[2 - 1] = MC33810_1_GD_2; engineConfiguration->ignitionPins[2 - 1] = Gpio::MC33810_1_GD_2;
engineConfiguration->ignitionPins[3 - 1] = MC33810_0_GD_1; engineConfiguration->ignitionPins[3 - 1] = Gpio::MC33810_0_GD_1;
engineConfiguration->ignitionPins[4 - 1] = MC33810_0_GD_0; engineConfiguration->ignitionPins[4 - 1] = Gpio::MC33810_0_GD_0;
engineConfiguration->ignitionPins[5 - 1] = MC33810_0_GD_3; engineConfiguration->ignitionPins[5 - 1] = Gpio::MC33810_0_GD_3;
engineConfiguration->ignitionPins[6 - 1] = MC33810_1_GD_1; engineConfiguration->ignitionPins[6 - 1] = Gpio::MC33810_1_GD_1;
/* Additional, not used for EG33 */ /* Additional, not used for EG33 */
engineConfiguration->ignitionPins[7 - 1] = MC33810_0_GD_2; engineConfiguration->ignitionPins[7 - 1] = Gpio::MC33810_0_GD_2;
engineConfiguration->ignitionPins[8 - 1] = MC33810_1_GD_0; engineConfiguration->ignitionPins[8 - 1] = Gpio::MC33810_1_GD_0;
//engineConfiguration->ignitionPinMode = OM_INVERTED; //engineConfiguration->ignitionPinMode = OM_INVERTED;
// Idle configuration // Idle configuration
engineConfiguration->useStepperIdle = false; engineConfiguration->useStepperIdle = false;
engineConfiguration->isDoubleSolenoidIdle = true; engineConfiguration->isDoubleSolenoidIdle = true;
engineConfiguration->idle.solenoidPin = TLE6240_PIN_11; engineConfiguration->idle.solenoidPin = Gpio::TLE6240_PIN_11;
engineConfiguration->secondSolenoidPin = TLE6240_PIN_12; engineConfiguration->secondSolenoidPin = Gpio::TLE6240_PIN_12;
engineConfiguration->communicationLedPin = GPIOG_6; /* LD1 - green */ engineConfiguration->communicationLedPin = Gpio::G6; /* LD1 - green */
engineConfiguration->runningLedPin = GPIOG_8; /* LD3 - yellow */ engineConfiguration->runningLedPin = Gpio::G8; /* LD3 - yellow */
engineConfiguration->warningLedPin = GPIO_UNASSIGNED; /* LD3 - yellow*/ engineConfiguration->warningLedPin = Gpio::Unassigned; /* LD3 - yellow*/
//engineConfiguration->unusedErrorPin = LED_ERROR_BRAIN_PIN; /* LD2 - red */ //engineConfiguration->unusedErrorPin = LED_ERROR_BRAIN_PIN; /* LD2 - red */
/* IF you have BOTH camshaft position sensor and crankshaft position sensor /* IF you have BOTH camshaft position sensor and crankshaft position sensor
* camshaft is always trigger#1 input and then crankshaft is trigger#2. */ * camshaft is always trigger#1 input and then crankshaft is trigger#2. */
engineConfiguration->triggerInputPins[0] = GPIOH_12; /* cam */ engineConfiguration->triggerInputPins[0] = Gpio::H12; /* cam */
engineConfiguration->triggerInputPins[1] = GPIOH_10; /* crank pos #1 */ engineConfiguration->triggerInputPins[1] = Gpio::H10; /* crank pos #1 */
engineConfiguration->triggerInputPins[2] = GPIOE_9; /* crank pos #2 */ engineConfiguration->triggerInputPins[2] = Gpio::E9; /* crank pos #2 */
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED; engineConfiguration->camInputs[0] = Gpio::Unassigned;
/* SPI devices: mess of board and engine configurations */ /* SPI devices: mess of board and engine configurations */
/* TLE6240 */ /* TLE6240 */
engineConfiguration->tle6240spiDevice = SPI_DEVICE_4; engineConfiguration->tle6240spiDevice = SPI_DEVICE_4;
engineConfiguration->tle6240_cs = GPIOE_15; /* SPI4_NSS0 */ engineConfiguration->tle6240_cs = Gpio::E15; /* SPI4_NSS0 */
engineConfiguration->tle6240_csPinMode = OM_OPENDRAIN; engineConfiguration->tle6240_csPinMode = OM_OPENDRAIN;
/* MC33972 */ /* MC33972 */
engineConfiguration->mc33972spiDevice = SPI_DEVICE_4; engineConfiguration->mc33972spiDevice = SPI_DEVICE_4;
engineConfiguration->mc33972_cs = GPIOE_10; /* SPI4_NSS2 */ engineConfiguration->mc33972_cs = Gpio::E10; /* SPI4_NSS2 */
engineConfiguration->mc33972_csPinMode = OM_DEFAULT; engineConfiguration->mc33972_csPinMode = OM_DEFAULT;
/* TLE6240 - OUT3, also PG2 through 3.3V-> 5.0V level translator - not installed */ /* TLE6240 - OUT3, also PG2 through 3.3V-> 5.0V level translator - not installed */
engineConfiguration->tachOutputPin = TLE6240_PIN_2; engineConfiguration->tachOutputPin = Gpio::TLE6240_PIN_2;
engineConfiguration->tachOutputPinMode = OM_DEFAULT; engineConfiguration->tachOutputPinMode = OM_DEFAULT;
/* spi driven - TLE6240 - OUT5 */ /* spi driven - TLE6240 - OUT5 */
engineConfiguration->fuelPumpPin = TLE6240_PIN_5; engineConfiguration->fuelPumpPin = Gpio::TLE6240_PIN_5;
engineConfiguration->fuelPumpPinMode = OM_DEFAULT; engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
/* Self shutdown ouput: /* Self shutdown ouput:
@ -137,32 +137,32 @@ void setBoardDefaultConfiguration() {
* So ECU does not need to drive this signal. * So ECU does not need to drive this signal.
* The only puprose of this output is to keep ECU powered to finish some stuff before power off itself * The only puprose of this output is to keep ECU powered to finish some stuff before power off itself
* To support this we need to sense ING input from key switch */ * To support this we need to sense ING input from key switch */
//engineConfiguration->mainRelayPin = GPIOH_7; //engineConfiguration->mainRelayPin = Gpio::H7;
//engineConfiguration->mainRelayPinMode = OM_DEFAULT; //engineConfiguration->mainRelayPinMode = OM_DEFAULT;
/* spi driven - TLE6240 - OUT1, OUT2 */ /* spi driven - TLE6240 - OUT1, OUT2 */
engineConfiguration->fanPin = TLE6240_PIN_1; engineConfiguration->fanPin = Gpio::TLE6240_PIN_1;
engineConfiguration->fanPinMode = OM_DEFAULT; engineConfiguration->fanPinMode = OM_DEFAULT;
/* TODO: second fan */ /* TODO: second fan */
//engineConfiguration->fanPin[1] = TLE6240_PIN_2; //engineConfiguration->fanPin[1] = Gpio::TLE6240_2;
//engineConfiguration->fanPinMode[1] = OM_DEFAULT; //engineConfiguration->fanPinMode[1] = OM_DEFAULT;
/* spi driven - TLE6240 - OUT8 */ /* spi driven - TLE6240 - OUT8 */
engineConfiguration->malfunctionIndicatorPin = TLE6240_PIN_7; engineConfiguration->malfunctionIndicatorPin = Gpio::TLE6240_PIN_7;
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT; engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
/* not used */ /* not used */
engineConfiguration->displayMode = DM_NONE; engineConfiguration->displayMode = DM_NONE;
engineConfiguration->HD44780_rs = GPIO_UNASSIGNED; engineConfiguration->HD44780_rs = Gpio::Unassigned;
engineConfiguration->HD44780_e = GPIO_UNASSIGNED; engineConfiguration->HD44780_e = Gpio::Unassigned;
engineConfiguration->HD44780_db4 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db4 = Gpio::Unassigned;
engineConfiguration->HD44780_db5 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db5 = Gpio::Unassigned;
engineConfiguration->HD44780_db6 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db6 = Gpio::Unassigned;
engineConfiguration->HD44780_db7 = GPIO_UNASSIGNED; engineConfiguration->HD44780_db7 = Gpio::Unassigned;
engineConfiguration->digitalPotentiometerChipSelect[0] = GPIO_UNASSIGNED; engineConfiguration->digitalPotentiometerChipSelect[0] = Gpio::Unassigned;
engineConfiguration->digitalPotentiometerChipSelect[1] = GPIO_UNASSIGNED; engineConfiguration->digitalPotentiometerChipSelect[1] = Gpio::Unassigned;
engineConfiguration->digitalPotentiometerChipSelect[2] = GPIO_UNASSIGNED; engineConfiguration->digitalPotentiometerChipSelect[2] = Gpio::Unassigned;
engineConfiguration->digitalPotentiometerChipSelect[3] = GPIO_UNASSIGNED; engineConfiguration->digitalPotentiometerChipSelect[3] = Gpio::Unassigned;
engineConfiguration->vehicleSpeedSensorInputPin = GPIO_UNASSIGNED; engineConfiguration->vehicleSpeedSensorInputPin = Gpio::Unassigned;
/* SPIs */ /* SPIs */
engineConfiguration->is_enabled_spi_1 = true; engineConfiguration->is_enabled_spi_1 = true;
@ -170,18 +170,18 @@ void setBoardDefaultConfiguration() {
engineConfiguration->is_enabled_spi_3 = true; engineConfiguration->is_enabled_spi_3 = true;
engineConfiguration->is_enabled_spi_4 = true; engineConfiguration->is_enabled_spi_4 = true;
engineConfiguration->spi1mosiPin = GPIO_UNASSIGNED; engineConfiguration->spi1mosiPin = Gpio::Unassigned;
engineConfiguration->spi1MosiMode = PO_DEFAULT; engineConfiguration->spi1MosiMode = PO_DEFAULT;
engineConfiguration->spi1misoPin = GPIO_UNASSIGNED; engineConfiguration->spi1misoPin = Gpio::Unassigned;
engineConfiguration->spi1MisoMode = PO_DEFAULT; engineConfiguration->spi1MisoMode = PO_DEFAULT;
engineConfiguration->spi1sckPin = GPIO_UNASSIGNED; engineConfiguration->spi1sckPin = Gpio::Unassigned;
engineConfiguration->spi1SckMode = PO_DEFAULT; engineConfiguration->spi1SckMode = PO_DEFAULT;
engineConfiguration->spi3mosiPin = GPIOC_12; engineConfiguration->spi3mosiPin = Gpio::C12;
engineConfiguration->spi3MosiMode = PO_DEFAULT; engineConfiguration->spi3MosiMode = PO_DEFAULT;
engineConfiguration->spi3misoPin = GPIOC_11; engineConfiguration->spi3misoPin = Gpio::C11;
engineConfiguration->spi3MisoMode = PO_DEFAULT; engineConfiguration->spi3MisoMode = PO_DEFAULT;
engineConfiguration->spi3sckPin = GPIOC_10; engineConfiguration->spi3sckPin = Gpio::C10;
engineConfiguration->spi3SckMode = PO_DEFAULT; engineConfiguration->spi3SckMode = PO_DEFAULT;
/* TODO: add settings for SPI4 */ /* TODO: add settings for SPI4 */
@ -189,9 +189,9 @@ void setBoardDefaultConfiguration() {
/* Knock sensor */ /* Knock sensor */
/* Interface settings */ /* Interface settings */
engineConfiguration->hip9011SpiDevice = SPI_DEVICE_4; engineConfiguration->hip9011SpiDevice = SPI_DEVICE_4;
engineConfiguration->hip9011CsPin = GPIOE_11; /* SPI4_NSS1 */ engineConfiguration->hip9011CsPin = Gpio::E11; /* SPI4_NSS1 */
engineConfiguration->hip9011CsPinMode = OM_OPENDRAIN; engineConfiguration->hip9011CsPinMode = OM_OPENDRAIN;
engineConfiguration->hip9011IntHoldPin = GPIOH_8; engineConfiguration->hip9011IntHoldPin = Gpio::H8;
engineConfiguration->hip9011IntHoldPinMode = OM_OPENDRAIN; engineConfiguration->hip9011IntHoldPinMode = OM_OPENDRAIN;
engineConfiguration->hipOutputChannel = EFI_ADC_7; /* PA7 */ engineConfiguration->hipOutputChannel = EFI_ADC_7; /* PA7 */
engineConfiguration->isHip9011Enabled = true; engineConfiguration->isHip9011Enabled = true;
@ -220,24 +220,24 @@ void setBoardDefaultConfiguration() {
engineConfiguration->cylinderBankSelect[6 - 1] = 1; engineConfiguration->cylinderBankSelect[6 - 1] = 1;
/* Misc settings */ /* Misc settings */
engineConfiguration->acSwitch = MC33972_PIN_22; engineConfiguration->acSwitch = Gpio::MC33972_PIN_22;
engineConfiguration->acSwitchMode = PI_DEFAULT; engineConfiguration->acSwitchMode = PI_DEFAULT;
/* This board also has AC clutch output: */ /* This board also has AC clutch output: */
engineConfiguration->acRelayPin = TLE6240_PIN_15; engineConfiguration->acRelayPin = Gpio::TLE6240_PIN_15;
engineConfiguration->maxAcRpm = 3000; engineConfiguration->maxAcRpm = 3000;
engineConfiguration->acIdleRpmBump = 200; engineConfiguration->acIdleRpmBump = 200;
engineConfiguration->isCJ125Enabled = false; engineConfiguration->isCJ125Enabled = false;
/* CAN */ /* CAN */
engineConfiguration->canTxPin = GPIOD_1; engineConfiguration->canTxPin = Gpio::D1;
engineConfiguration->canRxPin = GPIOD_0; engineConfiguration->canRxPin = Gpio::D0;
/* not used pins with testpads */ /* not used pins with testpads */
engineConfiguration->triggerSimulatorPins[0] = GPIOH_2; engineConfiguration->triggerSimulatorPins[0] = Gpio::H2;
engineConfiguration->triggerSimulatorPins[1] = GPIOH_3; engineConfiguration->triggerSimulatorPins[1] = Gpio::H3;
engineConfiguration->triggerSimulatorPins[2] = GPIOH_4; engineConfiguration->triggerSimulatorPins[2] = Gpio::H4;
engineConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[0] = OM_DEFAULT;
engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[1] = OM_DEFAULT;
engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT; engineConfiguration->triggerSimulatorPinModes[2] = OM_DEFAULT;
@ -330,11 +330,11 @@ static void board_init_ext_gpios()
{ {
int ret; int ret;
ret = mc33810_add(MC33810_0_OUT_0, 0, &mc33810_odd); ret = mc33810_add(Gpio::MC33810_0_OUT_0, 0, &mc33810_odd);
if (ret < 0) { if (ret < 0) {
/* error */ /* error */
} }
ret = mc33810_add(MC33810_1_OUT_0, 1, &mc33810_even); ret = mc33810_add(Gpio::MC33810_1_OUT_0, 1, &mc33810_even);
if (ret < 0) { if (ret < 0) {
/* error */ /* error */
} }

View File

@ -44,14 +44,14 @@ pins:
type: av type: av
- pin: 7 - pin: 7
id: GPIOH_12 id: H12
class: event_inputs class: event_inputs
function: Cam VR+ function: Cam VR+
ts_name: A07 - Cam VR+ ts_name: A07 - Cam VR+
type: vr type: vr
- pin: 8 - pin: 8
id: GPIOE_9 id: E9
class: event_inputs class: event_inputs
function: Crank 2 VR+ function: Crank 2 VR+
ts_name: A08 - Crank 2 VR+ ts_name: A08 - Crank 2 VR+

View File

@ -34,7 +34,7 @@ pins:
type: sgnd type: sgnd
- pin: 7 - pin: 7
id: GPIO_UNASSIGNED id: Unassigned
class: switch_inputs class: switch_inputs
function: Power Steering Switch function: Power Steering Switch
ts_name: B07 - Power Steering Switch ts_name: B07 - Power Steering Switch
@ -62,7 +62,7 @@ pins:
type: av type: av
- pin: 11 - pin: 11
id: GPIOD_14 id: D14
class: event_inputs class: event_inputs
function: Speed Din function: Speed Din
ts_name: B11 - Speed Din ts_name: B11 - Speed Din

View File

@ -2,7 +2,7 @@
pins: pins:
- pin: 1 - pin: 1
id: GPIOH_10 id: H10
class: event_inputs class: event_inputs
function: Crank 1 VR+ function: Crank 1 VR+
ts_name: A08 - Crank 1 VR+ ts_name: A08 - Crank 1 VR+

View File

@ -31,7 +31,7 @@ pins:
type: av type: av
- pin: 5 - pin: 5
id: GPIOH_7 id: H7
class: outputs class: outputs
function: Self Shutdown function: Self Shutdown
ts_name: D05 - Self Shutdown ts_name: D05 - Self Shutdown

View File

@ -7,8 +7,6 @@
#pragma once #pragma once
enum class TestCppStyleEnum : uint8_t { };
// todo: migrate/unify with pin_output_mode_e? rename? something is messy here // todo: migrate/unify with pin_output_mode_e? rename? something is messy here
// this enum is currently only used for SPI pins // this enum is currently only used for SPI pins
typedef enum __attribute__ ((__packed__)) { typedef enum __attribute__ ((__packed__)) {
@ -22,162 +20,162 @@ typedef enum __attribute__ ((__packed__)) {
/** /**
* Hardware pin. This enum is platform-specific. * Hardware pin. This enum is platform-specific.
*/ */
typedef enum __attribute__ ((__packed__)) { enum class Gpio : uint8_t {
GPIO_UNASSIGNED = 0, Unassigned = 0,
GPIO_INVALID = 1, Invalid = 1,
GPIOA_0 = 2, A0 = 2,
GPIOA_1 = 3, A1 = 3,
GPIOA_2 = 4, A2 = 4,
GPIOA_3 = 5, A3 = 5,
GPIOA_4 = 6, A4 = 6,
GPIOA_5 = 7, A5 = 7,
GPIOA_6 = 8, A6 = 8,
GPIOA_7 = 9, A7 = 9,
GPIOA_8 = 10, A8 = 10,
GPIOA_9 = 11, A9 = 11,
GPIOA_10 = 12, A10 = 12,
GPIOA_11 = 13, A11 = 13,
GPIOA_12 = 14, A12 = 14,
GPIOA_13 = 15, A13 = 15,
GPIOA_14 = 16, A14 = 16,
GPIOA_15 = 17, A15 = 17,
GPIOB_0 = 18, B0 = 18,
GPIOB_1 = 19, B1 = 19,
GPIOB_2 = 20, B2 = 20,
GPIOB_3 = 21, B3 = 21,
GPIOB_4 = 22, B4 = 22,
GPIOB_5 = 23, B5 = 23,
GPIOB_6 = 24, B6 = 24,
GPIOB_7 = 25, B7 = 25,
GPIOB_8 = 26, B8 = 26,
GPIOB_9 = 27, B9 = 27,
GPIOB_10 = 28, B10 = 28,
GPIOB_11 = 29, B11 = 29,
GPIOB_12 = 30, B12 = 30,
GPIOB_13 = 31, B13 = 31,
GPIOB_14 = 32, B14 = 32,
GPIOB_15 = 33, B15 = 33,
GPIOC_0 = 34, C0 = 34,
GPIOC_1 = 35, C1 = 35,
GPIOC_2 = 36, C2 = 36,
GPIOC_3 = 37, C3 = 37,
GPIOC_4 = 38, C4 = 38,
GPIOC_5 = 39, C5 = 39,
GPIOC_6 = 40, C6 = 40,
GPIOC_7 = 41, C7 = 41,
GPIOC_8 = 42, C8 = 42,
GPIOC_9 = 43, C9 = 43,
GPIOC_10 = 44, C10 = 44,
GPIOC_11 = 45, C11 = 45,
GPIOC_12 = 46, C12 = 46,
GPIOC_13 = 47, C13 = 47,
GPIOC_14 = 48, C14 = 48,
GPIOC_15 = 49, C15 = 49,
GPIOD_0 = 50, D0 = 50,
GPIOD_1 = 51, D1 = 51,
GPIOD_2 = 52, D2 = 52,
GPIOD_3 = 53, D3 = 53,
GPIOD_4 = 54, D4 = 54,
GPIOD_5 = 55, D5 = 55,
GPIOD_6 = 56, D6 = 56,
GPIOD_7 = 57, D7 = 57,
GPIOD_8 = 58, D8 = 58,
GPIOD_9 = 59, D9 = 59,
GPIOD_10 = 60, D10 = 60,
GPIOD_11 = 61, D11 = 61,
GPIOD_12 = 62, D12 = 62,
GPIOD_13 = 63, D13 = 63,
GPIOD_14 = 64, D14 = 64,
GPIOD_15 = 65, D15 = 65,
GPIOE_0 = 66, E0 = 66,
GPIOE_1 = 67, E1 = 67,
GPIOE_2 = 68, E2 = 68,
GPIOE_3 = 69, E3 = 69,
GPIOE_4 = 70, E4 = 70,
GPIOE_5 = 71, E5 = 71,
GPIOE_6 = 72, E6 = 72,
GPIOE_7 = 73, E7 = 73,
GPIOE_8 = 74, E8 = 74,
GPIOE_9 = 75, E9 = 75,
GPIOE_10 = 76, E10 = 76,
GPIOE_11 = 77, E11 = 77,
GPIOE_12 = 78, E12 = 78,
GPIOE_13 = 79, E13 = 79,
GPIOE_14 = 80, E14 = 80,
GPIOE_15 = 81, E15 = 81,
GPIOF_0 = 82, F0 = 82,
GPIOF_1 = 83, F1 = 83,
GPIOF_2 = 84, F2 = 84,
GPIOF_3 = 85, F3 = 85,
GPIOF_4 = 86, F4 = 86,
GPIOF_5 = 87, F5 = 87,
GPIOF_6 = 88, F6 = 88,
GPIOF_7 = 89, F7 = 89,
GPIOF_8 = 90, F8 = 90,
GPIOF_9 = 91, F9 = 91,
GPIOF_10 = 92, F10 = 92,
GPIOF_11 = 93, F11 = 93,
GPIOF_12 = 94, F12 = 94,
GPIOF_13 = 95, F13 = 95,
GPIOF_14 = 96, F14 = 96,
GPIOF_15 = 97, F15 = 97,
GPIOG_0 = 98, G0 = 98,
GPIOG_1 = 99, G1 = 99,
GPIOG_2 = 100, G2 = 100,
GPIOG_3 = 101, G3 = 101,
GPIOG_4 = 102, G4 = 102,
GPIOG_5 = 103, G5 = 103,
GPIOG_6 = 104, G6 = 104,
GPIOG_7 = 105, G7 = 105,
GPIOG_8 = 106, G8 = 106,
GPIOG_9 = 107, G9 = 107,
GPIOG_10 = 108, G10 = 108,
GPIOG_11 = 109, G11 = 109,
GPIOG_12 = 110, G12 = 110,
GPIOG_13 = 111, G13 = 111,
GPIOG_14 = 112, G14 = 112,
GPIOG_15 = 113, G15 = 113,
GPIOH_0 = 114, H0 = 114,
GPIOH_1 = 115, H1 = 115,
GPIOH_2 = 116, H2 = 116,
GPIOH_3 = 117, H3 = 117,
GPIOH_4 = 118, H4 = 118,
GPIOH_5 = 119, H5 = 119,
GPIOH_6 = 120, H6 = 120,
GPIOH_7 = 121, H7 = 121,
GPIOH_8 = 122, H8 = 122,
GPIOH_9 = 123, H9 = 123,
GPIOH_10 = 124, H10 = 124,
GPIOH_11 = 125, H11 = 125,
GPIOH_12 = 126, H12 = 126,
GPIOH_13 = 127, H13 = 127,
GPIOH_14 = 128, H14 = 128,
GPIOH_15 = 129, H15 = 129,
GPIOI_0 = 130, I0 = 130,
GPIOI_1 = 131, I1 = 131,
GPIOI_2 = 132, I2 = 132,
GPIOI_3 = 133, I3 = 133,
GPIOI_4 = 134, I4 = 134,
GPIOI_5 = 135, I5 = 135,
GPIOI_6 = 136, I6 = 136,
GPIOI_7 = 137, I7 = 137,
GPIOI_8 = 138, I8 = 138,
GPIOI_9 = 139, I9 = 139,
GPIOI_10 = 140, I10 = 140,
GPIOI_11 = 141, I11 = 141,
GPIOI_12 = 142, I12 = 142,
GPIOI_13 = 143, I13 = 143,
GPIOI_14 = 144, I14 = 144,
GPIOI_15 = 145, I15 = 145,
TLE6240_PIN_1 = 146, TLE6240_PIN_1 = 146,
TLE6240_PIN_2 = 147, TLE6240_PIN_2 = 147,
@ -236,13 +234,13 @@ typedef enum __attribute__ ((__packed__)) {
MC33810_1_GD_1 = 197, MC33810_1_GD_1 = 197,
MC33810_1_GD_2 = 198, MC33810_1_GD_2 = 198,
MC33810_1_GD_3 = 199, MC33810_1_GD_3 = 199,
} brain_pin_e; };
/* Plase keep updating these defines */ /* Plase keep updating these defines */
#define BRAIN_PIN_ONCHIP_LAST GPIOI_15 #define BRAIN_PIN_ONCHIP_LAST Gpio::I15
#define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - GPIOA_0 + 1) #define BRAIN_PIN_ONCHIP_PINS (BRAIN_PIN_ONCHIP_LAST - Gpio::A0 + 1)
#define BRAIN_PIN_LAST MC33810_1_GD_3 #define BRAIN_PIN_LAST Gpio::MC33810_1_GD_3
#define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - GPIOA_0 + 1) #define BRAIN_PIN_TOTAL_PINS (BRAIN_PIN_LAST - Gpio::A0 + 1)
/* Plase keep updating these defines */ /* Plase keep updating these defines */
typedef enum __attribute__ ((__packed__)) { typedef enum __attribute__ ((__packed__)) {

View File

@ -3,7 +3,7 @@ BOARDCPPSRC = $(PROJECT_DIR)/config/boards/tdg-pdm8/board_configuration.cpp
PROJECT_CPU = ARCH_STM32F4 PROJECT_CPU = ARCH_STM32F4
DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=GPIOC_11 DDEFS += -DLED_CRITICAL_ERROR_BRAIN_PIN=Gpio::C11
# We're running on TDG PDM hardware! # We're running on TDG PDM hardware!
DDEFS += -DHW_TDG_PDM8=1 DDEFS += -DHW_TDG_PDM8=1

View File

@ -11,6 +11,6 @@ void setBoardConfigOverrides() {
engineConfiguration->vbattDividerCoeff = 11; engineConfiguration->vbattDividerCoeff = 11;
engineConfiguration->vbattAdcChannel = EFI_ADC_4; engineConfiguration->vbattAdcChannel = EFI_ADC_4;
engineConfiguration->canTxPin = GPIOA_12; engineConfiguration->canTxPin = Gpio::A12;
engineConfiguration->canRxPin = GPIOA_11; engineConfiguration->canRxPin = Gpio::A11;
} }

View File

@ -7,56 +7,56 @@ pins:
ts_name: Battery Sense ts_name: Battery Sense
- pin: 3/13 - pin: 3/13
id: GPIOA_10 id: A10
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs
ts_name: Out 8 ts_name: Out 8
- pin: 4/14 - pin: 4/14
id: GPIOA_9 id: A9
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs
ts_name: Out 7 ts_name: Out 7
- pin: 5/15 - pin: 5/15
id: GPIOA_8 id: A8
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs
ts_name: Out 6 ts_name: Out 6
- pin: 6/16 - pin: 6/16
id: GPIOC_9 id: C9
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs
ts_name: Out 5 ts_name: Out 5
- pin: 7/17 - pin: 7/17
id: GPIOA_3 id: A3
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs
ts_name: Out 4 ts_name: Out 4
- pin: 8/18 - pin: 8/18
id: GPIOA_2 id: A2
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs
ts_name: Out 3 ts_name: Out 3
- pin: 9/19 - pin: 9/19
id: GPIOA_1 id: A1
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs
ts_name: Out 2 ts_name: Out 2
- pin: 10/20 - pin: 10/20
id: GPIOA_0 id: A0
class: outputs class: outputs
function: High Side Output function: High Side Output
type: hs type: hs

View File

@ -40,8 +40,8 @@ void setGy6139qmbDefaultEngineConfiguration() {
engineConfiguration->trigger.customTotalToothCount = 8; engineConfiguration->trigger.customTotalToothCount = 8;
engineConfiguration->trigger.customSkippedToothCount = 1; engineConfiguration->trigger.customSkippedToothCount = 1;
engineConfiguration->injectionPins[0] = GPIOC_9; engineConfiguration->injectionPins[0] = Gpio::C9;
engineConfiguration->ignitionPins[0] = GPIOC_8; engineConfiguration->ignitionPins[0] = Gpio::C8;
// set injection_mode 1 // set injection_mode 1
engineConfiguration->injectionMode = IM_SEQUENTIAL; engineConfiguration->injectionMode = IM_SEQUENTIAL;

View File

@ -135,26 +135,26 @@ void setEngineBMW_M73_Manhattan() {
Nucleo boards - first step is to confirm that I can blink via each pin Nucleo boards - first step is to confirm that I can blink via each pin
going clockwise from top-right corner going clockwise from top-right corner
GPIOA_10 USD ID Gpio::A10 USD ID
GPIOA_11 USD DM Gpio::A11 USD DM
GPIOA_12 USD DP Gpio::A12 USD DP
E_4: running E_4: running
Good GPIO: Good GPIO:
GPIOC_9 ETB#1 Gpio::C9 ETB#1
GPIOC_8 ETB#1 Gpio::C8 ETB#1
GPIOB_8 ETB#2 Gpio::B8 ETB#2
GPIOB_9 ETB#2 Gpio::B9 ETB#2
GPIOC_5 Gpio::C5
GPIOA_7 Gpio::A7
GPIOA_6 Gpio::A6
*/ */
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED; engineConfiguration->fuelPumpPin = Gpio::Unassigned;
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
engineConfiguration->fanPin = GPIO_UNASSIGNED; engineConfiguration->fanPin = Gpio::Unassigned;
/** /**
* Yellow op-amp board * Yellow op-amp board
@ -177,35 +177,35 @@ GPIOA_6
engineConfiguration->tps2_1AdcChannel = EFI_ADC_4; // PA4 engineConfiguration->tps2_1AdcChannel = EFI_ADC_4; // PA4
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = GPIO_UNASSIGNED; engineConfiguration->etbIo[0].controlPin = Gpio::Unassigned;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = GPIOC_8; engineConfiguration->etbIo[0].directionPin1 = Gpio::C8;
engineConfiguration->etbIo[0].directionPin2 = GPIOC_9; engineConfiguration->etbIo[0].directionPin2 = Gpio::C9;
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
// PWM pin // PWM pin
engineConfiguration->etbIo[1].controlPin = GPIO_UNASSIGNED; engineConfiguration->etbIo[1].controlPin = Gpio::Unassigned;
// DIR pin // DIR pin
engineConfiguration->etbIo[1].directionPin1 = GPIOB_9; engineConfiguration->etbIo[1].directionPin1 = Gpio::B9;
engineConfiguration->etbIo[1].directionPin2 = GPIOB_8; engineConfiguration->etbIo[1].directionPin2 = Gpio::B8;
engineConfiguration->tps2Min = engineConfiguration->tpsMin; engineConfiguration->tps2Min = engineConfiguration->tpsMin;
engineConfiguration->tps2Max = engineConfiguration->tpsMax; engineConfiguration->tps2Max = engineConfiguration->tpsMax;
engineConfiguration->injectionPins[0] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[0] = Gpio::Unassigned;
engineConfiguration->injectionPins[1] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[1] = Gpio::Unassigned;
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[2] = Gpio::Unassigned;
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[3] = Gpio::Unassigned;
engineConfiguration->injectionPins[4] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[4] = Gpio::Unassigned;
engineConfiguration->injectionPins[5] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[5] = Gpio::Unassigned;
engineConfiguration->injectionPins[6] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[6] = Gpio::Unassigned;
engineConfiguration->injectionPins[7] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[7] = Gpio::Unassigned;
engineConfiguration->injectionPins[8] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[8] = Gpio::Unassigned;
engineConfiguration->injectionPins[9] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[9] = Gpio::Unassigned;
engineConfiguration->injectionPins[10] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[10] = Gpio::Unassigned;
engineConfiguration->injectionPins[11] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[11] = Gpio::Unassigned;
} }
/** /**
@ -259,7 +259,7 @@ void setEngineBMW_M73_Proteus() {
// set_trigger_input_pin 0 PE7 // set_trigger_input_pin 0 PE7
engineConfiguration->triggerInputPins[0] = PROTEUS_VR_1; engineConfiguration->triggerInputPins[0] = PROTEUS_VR_1;
// GPIOE_11: "Digital 2" // Gpio::E11: "Digital 2"
engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_2; engineConfiguration->camInputs[0] = PROTEUS_DIGITAL_2;
// set vbatt_divider 8.16 // set vbatt_divider 8.16
@ -272,10 +272,10 @@ void setEngineBMW_M73_Proteus() {
engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_4; engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_4;
// GPIOE_0: "Lowside 14" // Gpio::E0: "Lowside 14"
engineConfiguration->starterControlPin = GPIOE_0; engineConfiguration->starterControlPin = Gpio::E0;
// GPIOE_12: "Digital 3" // Gpio::E12: "Digital 3"
engineConfiguration->startStopButtonPin = GPIOE_12; engineConfiguration->startStopButtonPin = Gpio::E12;
engineConfiguration->startStopButtonMode = PI_PULLUP; engineConfiguration->startStopButtonMode = PI_PULLUP;
setProteusHitachiEtbDefaults(); setProteusHitachiEtbDefaults();

View File

@ -84,11 +84,11 @@ void setEngineBMW_M73_microRusEfi() {
engineConfiguration->etb.iFactor = 0.35; engineConfiguration->etb.iFactor = 0.35;
// 22 - AN Temp 4, orange wire // 22 - AN Temp 4, orange wire
engineConfiguration->startStopButtonPin = GPIOA_3; engineConfiguration->startStopButtonPin = Gpio::A3;
#if (BOARD_TLE8888_COUNT > 0) #if (BOARD_TLE8888_COUNT > 0)
// "43 - GP Out 4" // "43 - GP Out 4"
engineConfiguration->starterControlPin = TLE8888_PIN_24; engineConfiguration->starterControlPin = Gpio::TLE8888_PIN_24;
#endif /* BOARD_TLE8888_COUNT */ #endif /* BOARD_TLE8888_COUNT */

View File

@ -24,8 +24,8 @@ void setCamaro4() {
strcpy(engineConfiguration->engineMake, ENGINE_MAKE_GM); strcpy(engineConfiguration->engineMake, ENGINE_MAKE_GM);
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3; engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
engineConfiguration->triggerInputPins[0] = GPIOA_5; engineConfiguration->triggerInputPins[0] = Gpio::A5;
engineConfiguration->triggerInputPins[1] = GPIOC_6; engineConfiguration->triggerInputPins[1] = Gpio::C6;
engineConfiguration->injectionMode = IM_BATCH; engineConfiguration->injectionMode = IM_BATCH;
engineConfiguration->twoWireBatchInjection = true; engineConfiguration->twoWireBatchInjection = true;
@ -56,31 +56,31 @@ void setCamaro4() {
engineConfiguration->afr.hwChannel = EFI_ADC_13; engineConfiguration->afr.hwChannel = EFI_ADC_13;
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; engineConfiguration->idle.solenoidPin = Gpio::Unassigned;
engineConfiguration->fuelPumpPin = GPIO_UNASSIGNED; engineConfiguration->fuelPumpPin = Gpio::Unassigned;
engineConfiguration->injectionPins[0] = GPIOE_6; engineConfiguration->injectionPins[0] = Gpio::E6;
engineConfiguration->injectionPins[1] = GPIOE_5; engineConfiguration->injectionPins[1] = Gpio::E5;
engineConfiguration->injectionPins[2] = GPIOD_7; engineConfiguration->injectionPins[2] = Gpio::D7;
engineConfiguration->injectionPins[3] = GPIOC_13; engineConfiguration->injectionPins[3] = Gpio::C13;
engineConfiguration->injectionPins[4] = GPIOE_3; engineConfiguration->injectionPins[4] = Gpio::E3;
engineConfiguration->injectionPins[5] = GPIOE_4; engineConfiguration->injectionPins[5] = Gpio::E4;
engineConfiguration->injectionPins[6] = GPIOD_3; engineConfiguration->injectionPins[6] = Gpio::D3;
engineConfiguration->injectionPins[7] = GPIOE_2; engineConfiguration->injectionPins[7] = Gpio::E2;
engineConfiguration->ignitionPins[0] = GPIOC_9; engineConfiguration->ignitionPins[0] = Gpio::C9;
engineConfiguration->ignitionPins[1] = GPIOC_7; engineConfiguration->ignitionPins[1] = Gpio::C7;
engineConfiguration->ignitionPins[2] = GPIOE_14; engineConfiguration->ignitionPins[2] = Gpio::E14;
engineConfiguration->ignitionPins[3] = GPIOE_12; engineConfiguration->ignitionPins[3] = Gpio::E12;
engineConfiguration->ignitionPins[4] = GPIOE_10; engineConfiguration->ignitionPins[4] = Gpio::E10;
engineConfiguration->ignitionPins[5] = GPIOE_8; engineConfiguration->ignitionPins[5] = Gpio::E8;
engineConfiguration->ignitionPins[6] = GPIOD_9; engineConfiguration->ignitionPins[6] = Gpio::D9;
engineConfiguration->ignitionPins[7] = GPIOD_8; engineConfiguration->ignitionPins[7] = Gpio::D8;
engineConfiguration->fuelPumpPin = GPIOB_8; engineConfiguration->fuelPumpPin = Gpio::B8;
engineConfiguration->fanPin = GPIO_UNASSIGNED; engineConfiguration->fanPin = Gpio::Unassigned;
engineConfiguration->mainRelayPin = GPIOD_5; engineConfiguration->mainRelayPin = Gpio::D5;
} }

View File

@ -56,35 +56,35 @@ void setCitroenBerlingoTU3JPConfiguration() {
// Frankenstein lo-side output #11: PB8 Main relay // Frankenstein lo-side output #11: PB8 Main relay
// Frankenstein lo-side output #12: PB9 Fuel pump // Frankenstein lo-side output #12: PB9 Fuel pump
engineConfiguration->ignitionPins[0] = GPIOC_14; engineConfiguration->ignitionPins[0] = Gpio::C14;
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
engineConfiguration->ignitionPins[2] = GPIOC_15; engineConfiguration->ignitionPins[2] = Gpio::C15;
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED; engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
engineConfiguration->injector.flow = 137; //SIEMENS DEKA VAZ20734 engineConfiguration->injector.flow = 137; //SIEMENS DEKA VAZ20734
engineConfiguration->injectionPins[0] = GPIOE_6; engineConfiguration->injectionPins[0] = Gpio::E6;
engineConfiguration->injectionPins[1] = GPIOC_13; engineConfiguration->injectionPins[1] = Gpio::C13;
engineConfiguration->injectionPins[2] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[2] = Gpio::Unassigned;
engineConfiguration->injectionPins[3] = GPIO_UNASSIGNED; engineConfiguration->injectionPins[3] = Gpio::Unassigned;
engineConfiguration->fanPin = GPIOE_0; engineConfiguration->fanPin = Gpio::E0;
engineConfiguration->fanPinMode = OM_DEFAULT; engineConfiguration->fanPinMode = OM_DEFAULT;
engineConfiguration->fanOffTemperature = 95; engineConfiguration->fanOffTemperature = 95;
engineConfiguration->fanOnTemperature = 99; engineConfiguration->fanOnTemperature = 99;
engineConfiguration->malfunctionIndicatorPin = GPIOE_1; engineConfiguration->malfunctionIndicatorPin = Gpio::E1;
engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT; engineConfiguration->malfunctionIndicatorPinMode = OM_DEFAULT;
engineConfiguration->mainRelayPin = GPIOB_8; engineConfiguration->mainRelayPin = Gpio::B8;
engineConfiguration->fuelPumpPin = GPIOB_9; engineConfiguration->fuelPumpPin = Gpio::B9;
engineConfiguration->fuelPumpPinMode = OM_DEFAULT; engineConfiguration->fuelPumpPinMode = OM_DEFAULT;
setFrankenso_01_LCD(engineConfiguration); setFrankenso_01_LCD(engineConfiguration);
// engineConfiguration->o2heaterPin = GPIOC_13; // engineConfiguration->o2heaterPin = Gpio::C13;
// engineConfiguration->logicAnalyzerPins[1] = GPIO_UNASSIGNED; // engineConfiguration->logicAnalyzerPins[1] = Gpio::Unassigned;
/** /**
* Inputs * Inputs

Some files were not shown because too many files have changed in this diff Show More