export board-specific macro for stm32 pins based on board yaml #3298

This commit is contained in:
rusefi 2023-08-27 23:10:13 -04:00 committed by rusefillc
parent 0f026220ca
commit 948d7161aa
34 changed files with 294 additions and 333 deletions

View File

@ -1,4 +1,3 @@
# https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/hellen/hellen_meta.h
# copyright: Michael Holzer # copyright: Michael Holzer
pins: pins:

View File

@ -70,12 +70,12 @@ static void setupDefaultSensorInputs() {
void boardInitHardware() { void boardInitHardware() {
alphaTachPullUp.initPin("a-tach", H144_OUT_IO1); alphaTachPullUp.initPin("a-tach", Gpio::H144_OUT_IO1);
alphaTempPullUp.initPin("a-temp", H144_OUT_IO4); alphaTempPullUp.initPin("a-temp", Gpio::H144_OUT_IO4);
alphaCrankPPullUp.initPin("a-crank-p", H144_OUT_IO2); alphaCrankPPullUp.initPin("a-crank-p", Gpio::H144_OUT_IO2);
alphaCrankNPullUp.initPin("a-crank-n", H144_OUT_IO5); alphaCrankNPullUp.initPin("a-crank-n", Gpio::H144_OUT_IO5);
alpha2stepPullDown.initPin("a-2step", H144_OUT_IO7); alpha2stepPullDown.initPin("a-2step", Gpio::H144_OUT_IO7);
alphaCamPullDown.initPin("a-cam", H144_OUT_IO8); alphaCamPullDown.initPin("a-cam", Gpio::H144_OUT_IO8);
boardOnConfigurationChange(nullptr); boardOnConfigurationChange(nullptr);
} }
@ -105,7 +105,7 @@ void setBoardConfigOverrides() {
configureHellenMegaAccCS2Pin(); configureHellenMegaAccCS2Pin();
setHellenMegaEnPin(); setHellenMegaEnPin();
} else { } else {
setHellenEnPin(H144_OUT_IO3); setHellenEnPin(Gpio::H144_OUT_IO3);
} }
setDefaultHellenAtPullUps(); setDefaultHellenAtPullUps();
@ -127,19 +127,19 @@ void setBoardDefaultConfiguration() {
int16_t hellenBoardId = engine->engineState.hellenBoardId; int16_t hellenBoardId = engine->engineState.hellenBoardId;
if (isMegaModuleRevision()) { if (isMegaModuleRevision()) {
setHellenMMbaro(); setHellenMMbaro();
engineConfiguration->map.sensor.hwChannel = Gpio::H144_IN_MAP3; // On-board MAP engineConfiguration->map.sensor.hwChannel = H144_IN_MAP3; // On-board MAP
engineConfiguration->map.sensor.type = MT_MPXH6400; engineConfiguration->map.sensor.type = MT_MPXH6400;
} else { } else {
engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2; // B2 external signal engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2; // B2 external signal
engineConfiguration->baroSensor.type = MT_MPXH6400; engineConfiguration->baroSensor.type = MT_MPXH6400;
engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3; // On-board MAP engineConfiguration->baroSensor.hwChannel = H144_IN_MAP3; // On-board MAP
} }
engineConfiguration->boardUseTempPullUp = true; engineConfiguration->boardUseTempPullUp = true;
engineConfiguration->acSwitch = Gpio::Unassigned; engineConfiguration->acSwitch = Gpio::Unassigned;
engineConfiguration->fuelPumpPin = H144_OUT_PWM2; engineConfiguration->fuelPumpPin = Gpio::H144_OUT_PWM2;
engineConfiguration->fanPin = H144_OUT_PWM4; engineConfiguration->fanPin = Gpio::H144_OUT_PWM4;
engineConfiguration->mainRelayPin = Gpio::Unassigned; engineConfiguration->mainRelayPin = Gpio::Unassigned;
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM3; engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM3;
@ -152,7 +152,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6; engineConfiguration->vrThreshold[0].pin = Gpio::H144_OUT_PWM6;
} }
void boardPrepareForStop() { void boardPrepareForStop() {

View File

@ -15,8 +15,7 @@ pins:
color: red color: red
- pin: A3 - pin: A3
# H144_OUT_PWM2 meta: H144_OUT_PWM2
id: C6
class: outputs class: outputs
function: Fuel Pump Relay Output (low) function: Fuel Pump Relay Output (low)
type: ls type: ls
@ -24,8 +23,7 @@ pins:
color: purple color: purple
- pin: A4 - pin: A4
# H144_OUT_PWM3 meta: H144_OUT_PWM3
id: C7
class: outputs class: outputs
function: Tachometer Output function: Tachometer Output
ts_name: A4 - Tachometer ts_name: A4 - Tachometer
@ -127,8 +125,7 @@ pins:
color: blue color: blue
- pin: C1 - pin: C1
# H144_OUT_PWM4 meta: H144_OUT_PWM4
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
@ -191,8 +188,7 @@ pins:
color: brown color: brown
- pin: C8 - pin: C8
# H144_OUT_PWM1 meta: H144_OUT_PWM1
id: D13
class: outputs class: outputs
function: Idle Output (low) function: Idle Output (low)
type: ls type: ls

View File

@ -44,7 +44,7 @@ static void setupEtb() {
// DIS - disables motor (enable low) // DIS - disables motor (enable low)
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = H144_GP1; engineConfiguration->etbIo[0].directionPin1 = H144_GP1;
// Disable pin // Disable pin
@ -105,24 +105,24 @@ static bool is_F_OrOlder() {
} }
void boardInitHardware() { void boardInitHardware() {
alphaTachPullUp.initPin("a-tach", H144_OUT_IO1); alphaTachPullUp.initPin("a-tach", Gpio::H144_OUT_IO1);
alphaTempPullUp.initPin("a-temp", H144_OUT_IO4); alphaTempPullUp.initPin("a-temp", Gpio::H144_OUT_IO4);
alphaCrankPPullUp.initPin("a-crank-p", H144_OUT_IO2); alphaCrankPPullUp.initPin("a-crank-p", Gpio::H144_OUT_IO2);
alphaCrankNPullUp.initPin("a-crank-n", H144_OUT_IO5); alphaCrankNPullUp.initPin("a-crank-n", Gpio::H144_OUT_IO5);
alpha2stepPullDown.initPin("a-2step", H144_OUT_IO7); alpha2stepPullDown.initPin("a-2step", Gpio::H144_OUT_IO7);
alphaCamVrPullUp.initPin("a-cam-vr", H144_OUT_IO9); alphaCamVrPullUp.initPin("a-cam-vr", Gpio::H144_OUT_IO9);
if (is_F_OrOlder()) { if (is_F_OrOlder()) {
alphaD2PullDown.initPin("a-d2", H144_LS_5); alphaD2PullDown.initPin("a-d2", Gpio::H144_LS_5);
alphaCamPullDown.initPin("a-cam", H144_OUT_IO8); alphaCamPullDown.initPin("a-cam", Gpio::H144_OUT_IO8);
alphaD3PullDown.initPin("a-d3", H144_LS_6); alphaD3PullDown.initPin("a-d3", Gpio::H144_LS_6);
} else { } else {
alphaD2PullDown.initPin("a-d2", Gpio::H144_OUT_IO13;); alphaD2PullDown.initPin("a-d2", Gpio::H144_OUT_IO13);
alphaCamPullDown.initPin("a-cam", H144_GP4); alphaCamPullDown.initPin("a-cam", H144_GP4);
alphaD3PullDown.initPin("a-d3", H144_OUT_IO8); alphaD3PullDown.initPin("a-d3", Gpio::H144_OUT_IO8);
} }
alphaD4PullDown.initPin("a-d4", Gpio::H144_LS_7); alphaD4PullDown.initPin("a-d4", Gpio::H144_LS_7);
alphaD5PullDown.initPin("a-d5", H144_LS_8); alphaD5PullDown.initPin("a-d5", Gpio::H144_LS_8);
boardOnConfigurationChange(nullptr); boardOnConfigurationChange(nullptr);
} }
@ -147,7 +147,7 @@ void setBoardConfigOverrides() {
setupVbatt(); setupVbatt();
if (is_F_OrOlder()) { if (is_F_OrOlder()) {
setHellenEnPin(H144_OUT_IO3); setHellenEnPin(Gpio::H144_OUT_IO3);
setHellenSdCardSpi2(); setHellenSdCardSpi2();
} else { } else {
setHellenMegaEnPin(); setHellenMegaEnPin();
@ -174,8 +174,8 @@ void setBoardDefaultConfiguration() {
setupEtb(); setupEtb();
if (is_F_OrOlder()) { if (is_F_OrOlder()) {
engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;; engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;;
engineConfiguration->vvtPins[0] = H144_OUT_PWM7; engineConfiguration->vvtPins[0] = Gpio::H144_OUT_PWM7;
engineConfiguration->vvtPins[1] = H144_OUT_PWM8; engineConfiguration->vvtPins[1] = Gpio::H144_OUT_PWM8;
} else { } else {
engineConfiguration->vvtPins[0] = Gpio::H144_IGN_7; engineConfiguration->vvtPins[0] = Gpio::H144_IGN_7;
engineConfiguration->vvtPins[1] = Gpio::H144_IGN_8; engineConfiguration->vvtPins[1] = Gpio::H144_IGN_8;
@ -185,10 +185,10 @@ void setBoardDefaultConfiguration() {
// todo: should be conditional? currently set best for newest boards based on MegaModule // todo: should be conditional? currently set best for newest boards based on MegaModule
setHellenMMbaro(); setHellenMMbaro();
engineConfiguration->map.sensor.hwChannel = Gpio::H144_IN_MAP3; // On-board MAP engineConfiguration->map.sensor.hwChannel = H144_IN_MAP3; // On-board MAP
engineConfiguration->map.sensor.type = MT_MPXH6400; engineConfiguration->map.sensor.type = MT_MPXH6400;
// engineConfiguration->baroSensor.type = MT_MPXH6400; // engineConfiguration->baroSensor.type = MT_MPXH6400;
// engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3; // On-board MAP // engineConfiguration->baroSensor.hwChannel = H144_IN_MAP3; // On-board MAP
engineConfiguration->boardUseTempPullUp = true; engineConfiguration->boardUseTempPullUp = true;
@ -210,8 +210,8 @@ void setBoardDefaultConfiguration() {
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6; engineConfiguration->vrThreshold[0].pin = Gpio::H144_OUT_PWM6;
engineConfiguration->vrThreshold[1].pin = H144_OUT_PWM4; engineConfiguration->vrThreshold[1].pin = Gpio::H144_OUT_PWM4;
} }
void boardPrepareForStop() { void boardPrepareForStop() {

View File

@ -43,7 +43,7 @@ static void setupEtb() {
// DIS - disables motor (enable low) // DIS - disables motor (enable low)
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = H144_GP1; engineConfiguration->etbIo[0].directionPin1 = H144_GP1;
// Disable pin // Disable pin
@ -100,7 +100,7 @@ static void setupDefaultSensorInputs() {
engineConfiguration->mafAdcChannel = EFI_ADC_NONE; engineConfiguration->mafAdcChannel = EFI_ADC_NONE;
engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2; engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2;
engineConfiguration->baroSensor.type = MT_MPXH6400; engineConfiguration->baroSensor.type = MT_MPXH6400;
// engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3; // engineConfiguration->baroSensor.hwChannel = H144_IN_MAP3;
engineConfiguration->afr.hwChannel = EFI_ADC_NONE; engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
@ -110,18 +110,18 @@ static void setupDefaultSensorInputs() {
} }
void boardInitHardware() { void boardInitHardware() {
setHellenEnPin(H144_OUT_IO3); setHellenEnPin(Gpio::H144_OUT_IO3);
alphaTempPullUp.initPin("a-temp", H144_OUT_IO4); alphaTempPullUp.initPin("a-temp", Gpio::H144_OUT_IO4);
alphaCrankPPullUp.initPin("a-crank-p", H144_OUT_IO5); alphaCrankPPullUp.initPin("a-crank-p", Gpio::H144_OUT_IO5);
alphaTachPullUp.initPin("a-tach", H144_OUT_IO6); alphaTachPullUp.initPin("a-tach", Gpio::H144_OUT_IO6);
alpha2stepPullDown.initPin("a-2step", H144_OUT_IO7); alpha2stepPullDown.initPin("a-2step", Gpio::H144_OUT_IO7);
alphaCamPullDown.initPin("a-cam", H144_OUT_IO8); alphaCamPullDown.initPin("a-cam", Gpio::H144_OUT_IO8);
//alphaCamVrPullUp.initPin("a-cam-vr", H144_OUT_IO9); //alphaCamVrPullUp.initPin("a-cam-vr", Gpio::H144_OUT_IO9);
alphaD2PullDown.initPin("a-d2", H_SPI3_SCK); alphaD2PullDown.initPin("a-d2", H_SPI3_SCK);
alphaD3PullDown.initPin("a-d3", H_SPI3_MISO); alphaD3PullDown.initPin("a-d3", H_SPI3_MISO);
alphaD4PullDown.initPin("a-d4", H_SPI3_MOSI); alphaD4PullDown.initPin("a-d4", H_SPI3_MOSI);
//alphaD5PullDown.initPin("a-d5", H144_LS_8); //alphaD5PullDown.initPin("a-d5", Gpio::H144_LS_8);
boardOnConfigurationChange(nullptr); boardOnConfigurationChange(nullptr);
} }
@ -162,8 +162,8 @@ void setBoardDefaultConfiguration() {
setInjectorPins(); setInjectorPins();
setIgnitionPins(); setIgnitionPins();
setupEtb(); setupEtb();
engineConfiguration->vvtPins[0] = H144_OUT_PWM7; engineConfiguration->vvtPins[0] = Gpio::H144_OUT_PWM7;
engineConfiguration->vvtPins[1] = H144_OUT_PWM8; engineConfiguration->vvtPins[1] = Gpio::H144_OUT_PWM8;
engineConfiguration->boardUseTempPullUp = true; engineConfiguration->boardUseTempPullUp = true;
@ -183,8 +183,8 @@ void setBoardDefaultConfiguration() {
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6; engineConfiguration->vrThreshold[0].pin = Gpio::H144_OUT_PWM6;
engineConfiguration->vrThreshold[1].pin = H144_OUT_PWM4; engineConfiguration->vrThreshold[1].pin = Gpio::H144_OUT_PWM4;
hellenWbo(); hellenWbo();
} }

View File

@ -39,11 +39,11 @@ static void setupEtb() {
// DIS - disables motor (enable low) // DIS - disables motor (enable low)
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM1; engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM1;
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = H144_OUT_IO1; engineConfiguration->etbIo[0].disablePin = Gpio::H144_OUT_IO1;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
@ -80,7 +80,7 @@ static void setupDefaultSensorInputs() {
engineConfiguration->mafAdcChannel = H144_IN_MAP1; engineConfiguration->mafAdcChannel = H144_IN_MAP1;
engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2; engineConfiguration->map.sensor.hwChannel = H144_IN_MAP2;
engineConfiguration->baroSensor.type = MT_MPXH6400; engineConfiguration->baroSensor.type = MT_MPXH6400;
engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3; engineConfiguration->baroSensor.hwChannel = H144_IN_MAP3;
engineConfiguration->afr.hwChannel = EFI_ADC_NONE; engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
@ -90,7 +90,7 @@ static void setupDefaultSensorInputs() {
} }
void boardInitHardware() { void boardInitHardware() {
setHellenEnPin(H144_OUT_IO3); setHellenEnPin(Gpio::H144_OUT_IO3);
boardOnConfigurationChange(nullptr); boardOnConfigurationChange(nullptr);
} }
@ -123,8 +123,8 @@ void setBoardDefaultConfiguration() {
setIgnitionPins(); setIgnitionPins();
setupEtb(); setupEtb();
engineConfiguration->acSwitch = Gpio::Unassigned; engineConfiguration->acSwitch = Gpio::Unassigned;
// engineConfiguration->fuelPumpPin = Gpio::Unassigned;//H144_OUT_PWM2; // engineConfiguration->fuelPumpPin = Gpio::Unassigned;//Gpio::H144_OUT_PWM2;
// engineConfiguration->fanPin = Gpio::Unassigned;//H144_OUT_PWM4; // engineConfiguration->fanPin = Gpio::Unassigned;//Gpio::H144_OUT_PWM4;
engineConfiguration->mainRelayPin = Gpio::Unassigned; engineConfiguration->mainRelayPin = Gpio::Unassigned;
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM3; engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM3;
@ -150,7 +150,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->clutchDownPinMode = PI_PULLDOWN; engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH; engineConfiguration->launchActivationMode = CLUTCH_INPUT_LAUNCH;
// ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light // ? engineConfiguration->malfunctionIndicatorPin = Gpio::G4; //1E - Check Engine Light
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM4; engineConfiguration->vrThreshold[0].pin = Gpio::H144_OUT_PWM4;
} }
void boardPrepareForStop() { void boardPrepareForStop() {

View File

@ -26,7 +26,7 @@ static void setInjectorPins() {
engineConfiguration->clutchDownPin = Gpio::C4; // 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 = Gpio::H144_OUT_IO8;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
@ -92,11 +92,11 @@ void setBoardConfigOverrides() {
//ETB1 //ETB1
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM8; engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM8;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_IO13;; engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_IO13;;
// Disable pin // Disable pin
engineConfiguration->etbIo[0].disablePin = H144_OUT_IO4; engineConfiguration->etbIo[0].disablePin = Gpio::H144_OUT_IO4;
// Unused // Unused
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned; engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
@ -120,14 +120,14 @@ void setBoardDefaultConfiguration() {
engineConfiguration->luaOutputPins[0] = Gpio::H144_OUT_IO6; // starter relay engineConfiguration->luaOutputPins[0] = Gpio::H144_OUT_IO6; // starter relay
engineConfiguration->boostControlPin = H144_OUT_PWM5; engineConfiguration->boostControlPin = Gpio::H144_OUT_PWM5;
engineConfiguration->brakePedalPin = H144_IN_RES2; engineConfiguration->brakePedalPin = H144_IN_RES2;
// engineConfiguration->acSwitch = // engineConfiguration->acSwitch =
// engineConfiguration->acRelayPin = // engineConfiguration->acRelayPin =
engineConfiguration->fuelPumpPin = H144_OUT_IO5; engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO5;
engineConfiguration->fanPin = Gpio::H144_OUT_IO12; engineConfiguration->fanPin = Gpio::H144_OUT_IO12;
engineConfiguration->mainRelayPin = H144_OUT_IO3; engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO3;
engineConfiguration->tachOutputPin = H144_OUT_PWM7; engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM7;
engineConfiguration->alternatorControlPin = Gpio::H144_OUT_PWM1; engineConfiguration->alternatorControlPin = Gpio::H144_OUT_PWM1;
// engineConfiguration->fan2Pin = // engineConfiguration->fan2Pin =

View File

@ -80,7 +80,7 @@ void setBoardConfigOverrides() {
// //ETB1 // //ETB1
// // PWM pin // // PWM pin
// engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; // engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
// // DIR pin // // DIR pin
// engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3; // engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3;
// // Disable pin // // Disable pin
@ -114,7 +114,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->canTxPin = H176_CAN_TX; engineConfiguration->canTxPin = H176_CAN_TX;
engineConfiguration->canRxPin = H176_CAN_RX; engineConfiguration->canRxPin = H176_CAN_RX;
engineConfiguration->vvtPins[0] = H144_OUT_PWM4; engineConfiguration->vvtPins[0] = Gpio::H144_OUT_PWM4;
gppwm_channel *vtsControl = &engineConfiguration->gppwm[0]; gppwm_channel *vtsControl = &engineConfiguration->gppwm[0];
// vtsControl->pin = Gpio::H144_OUT_IO6; // vtsControl->pin = Gpio::H144_OUT_IO6;
@ -122,8 +122,8 @@ void setBoardDefaultConfiguration() {
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO13;; engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO13;;
engineConfiguration->idle.solenoidPin = Gpio::H144_LS_6; engineConfiguration->idle.solenoidPin = Gpio::H144_LS_6;
engineConfiguration->fanPin = Gpio::H144_OUT_IO12; engineConfiguration->fanPin = Gpio::H144_OUT_IO12;
engineConfiguration->mainRelayPin = H144_OUT_IO3; engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO3;
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO7; engineConfiguration->malfunctionIndicatorPin = Gpio::H144_OUT_IO7;
// how come this is not denso 183?! // how come this is not denso 183?!
engineConfiguration->map.sensor.type = MT_CUSTOM; engineConfiguration->map.sensor.type = MT_CUSTOM;
@ -164,10 +164,10 @@ void setBoardDefaultConfiguration() {
} }
static Gpio OUTPUTS[] = { static Gpio OUTPUTS[] = {
H144_LS_1, Gpio::H144_LS_1,
H144_LS_2, Gpio::H144_LS_2,
H144_LS_3, Gpio::H144_LS_3,
H144_LS_4, Gpio::H144_LS_4,
}; };
int getBoardMetaOutputsCount() { int getBoardMetaOutputsCount() {

View File

@ -1,3 +1,5 @@
meta: config/boards/hellen_meta.h
pins: pins:
- pin: auxhigh1 - pin: auxhigh1
# H144_OUT_IO5 # H144_OUT_IO5
@ -7,8 +9,7 @@ pins:
function: AuxHigh1 function: AuxHigh1
- pin: auxpp1 - pin: auxpp1
# H144_OUT_IO11 meta: H144_OUT_IO11
id: G2
class: outputs class: outputs
ts_name: AuxPP1 ts_name: AuxPP1
function: AuxPP1 function: AuxPP1
@ -49,8 +50,7 @@ pins:
type: gnda type: gnda
- pin: A12 - pin: A12
# H144_LS_6 meta: H144_LS_6
id: F12
class: outputs class: outputs
ts_name: A12 Idle Air Control ts_name: A12 Idle Air Control
function: Idle Air Control Valve function: Idle Air Control Valve
@ -124,28 +124,24 @@ pins:
function: Cam Sensor function: Cam Sensor
- pin: A27 - pin: A27
# H144_IGN_4 meta: H144_IGN_4
id: E3
class: outputs class: outputs
ts_name: A27 - IGN4 ts_name: A27 - IGN4
function: Ignition 4 function: Ignition 4
- pin: A28 - pin: A28
# H144_IGN_3 meta: H144_IGN_3
id: E4
class: outputs class: outputs
ts_name: A28 - IGN3 ts_name: A28 - IGN3
function: Ignition 3 function: Ignition 3
- pin: A29 - pin: A29
# H144_IGN_2 meta: H144_IGN_2
id: E5
class: outputs class: outputs
ts_name: A29 - IGN2 ts_name: A29 - IGN2
function: Ignition 2 function: Ignition 2
- pin: A30 - pin: A30
# H144_IGN_1 meta: H144_IGN_1
id: C13
class: outputs class: outputs
ts_name: A30 - IGN1 ts_name: A30 - IGN1
function: Ignition 1 function: Ignition 1
@ -154,45 +150,39 @@ pins:
function: VTC +12 supply function: VTC +12 supply
- pin: B2 - pin: B2
# H144_LS_4 meta: H144_LS_4
id: D10
class: outputs class: outputs
type: inj type: inj
ts_name: B2 - Injector 4 ts_name: B2 - Injector 4
function: Injector 4 function: Injector 4
- pin: B3 - pin: B3
# H144_LS_3 meta: H144_LS_3
id: D11
class: outputs class: outputs
type: inj type: inj
ts_name: B3 - Injector 3 ts_name: B3 - Injector 3
function: Injector 3 function: Injector 3
- pin: B4 - pin: B4
# H144_LS_2 meta: H144_LS_2
id: G8
class: outputs class: outputs
type: inj type: inj
ts_name: B4 - Injector 2 ts_name: B4 - Injector 2
function: Injector 2 function: Injector 2
- pin: B5 - pin: B5
# H144_LS_1 meta: H144_LS_1
id: G7
class: outputs class: outputs
ts_name: B5 - Injector 1 ts_name: B5 - Injector 1
function: Injector 1 function: Injector 1
- pin: B6 - pin: B6
# H144_OUT_IO12 meta: H144_OUT_IO12
id: A8
class: outputs class: outputs
type: ls type: ls
ts_name: B6 Radiator Relay ts_name: B6 Radiator Relay
function: Radiator Relay Output function: Radiator Relay Output
- pin: B7 - pin: B7
# H144_LS_8 meta: H144_LS_8
id: F14
class: outputs class: outputs
ts_name: ___ Lockout Solenoid ts_name: ___ Lockout Solenoid
function: Lockout Solenoid function: Lockout Solenoid
@ -215,8 +205,7 @@ pins:
function: Alternator Field function: Alternator Field
- pin: B15 - pin: B15
# H144_OUT_IO6 meta: H144_OUT_IO6
id: G11
class: outputs class: outputs
ts_name: ___ VTEC/VTS Output ts_name: ___ VTEC/VTS Output
# not to be confused with VTC aka VVT # not to be confused with VTC aka VVT
@ -229,29 +218,25 @@ pins:
ts_name: ___ IAT ts_name: ___ IAT
function: IAT function: IAT
- pin: B18 - pin: B18
# H144_OUT_IO9 meta: H144_OUT_IO9
id: G13
class: outputs class: outputs
ts_name: ___ Alternator Control ts_name: ___ Alternator Control
function: Alternator Control function: Alternator Control
- pin: B21 - pin: B21
# H144_OUT_PWM5 meta: H144_OUT_PWM5
id: C9
class: outputs class: outputs
ts_name: ___ - EVAP ts_name: ___ - EVAP
function: EVAP function: EVAP
- pin: B22 - pin: B22
# H144_LS_7 meta: H144_LS_7
id: F13
class: outputs class: outputs
ts_name: ___ Intake Runner ts_name: ___ Intake Runner
function: Intake Runner function: Intake Runner
- pin: B23 - pin: B23
# H144_OUT_PWM4 meta: H144_OUT_PWM4
id: C8
class: outputs class: outputs
ts_name: ___ VTC VVT ts_name: ___ VTC VVT
function: VTC VVT function: VTC VVT
@ -295,21 +280,18 @@ pins:
- pin: C11 - pin: C11
# H144_OUT_PWM7 meta: H144_OUT_PWM7
id: D15
class: outputs class: outputs
ts_name: ___ Aux Low 3 ts_name: ___ Aux Low 3
function: Aux Low 3 function: Aux Low 3
- pin: C12 - pin: C12
# H144_OUT_PWM6 meta: H144_OUT_PWM6
id: D14
class: outputs class: outputs
function: Aux Low 2 function: Aux Low 2
- pin: C13 - pin: C13
# H144_OUT_PWM2 meta: H144_OUT_PWM2
id: C6
class: outputs class: outputs
function: Aux Low 1 function: Aux Low 1
@ -354,8 +336,7 @@ pins:
color: orange color: orange
- pin: E1 - pin: E1
# H144_OUT_IO13 meta: H144_OUT_IO13
id: G6
class: outputs class: outputs
ts_name: E1 Fuel Relay ts_name: E1 Fuel Relay
function: Fuel Relay function: Fuel Relay
@ -373,8 +354,7 @@ pins:
function: 5V Sensor Power function: 5V Sensor Power
- pin: E7 - pin: E7
# H144_OUT_IO3 meta: H144_OUT_IO3
id: G14
class: outputs class: outputs
ts_name: E7 Main Relay Control ts_name: E7 Main Relay Control
function: Main Relay Control function: Main Relay Control

View File

@ -22,7 +22,7 @@ static void setInjectorPins() {
engineConfiguration->clutchDownPin = Gpio::C4; // 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 = Gpio::H144_OUT_IO8;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
@ -97,8 +97,8 @@ void setBoardDefaultConfiguration() {
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3 engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM1; engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM1;
engineConfiguration->alternatorControlPin = H144_OUT_PWM7; engineConfiguration->alternatorControlPin = Gpio::H144_OUT_PWM7;
engineConfiguration->fan2Pin = H144_OUT_IO2; engineConfiguration->fan2Pin = Gpio::H144_OUT_IO2;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();

View File

@ -1,7 +1,4 @@
# meta: config/boards/hellen_meta.h
# CONNECTOR MAPPING NEEDED
# https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/hellen/hellen_meta.h
#
pins: pins:
- pin: 1A - pin: 1A

View File

@ -74,8 +74,8 @@ void setBoardConfigOverrides() {
setupVbatt(); setupVbatt();
setHellenSdCardSpi3(); setHellenSdCardSpi3();
engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM7; engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM7;
engineConfiguration->etbIo[0].directionPin2 = H144_OUT_PWM6; engineConfiguration->etbIo[0].directionPin2 = Gpio::H144_OUT_PWM6;
engineConfiguration->etbIo[0].controlPin = Gpio::D13; // 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;
@ -103,7 +103,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->fuelPumpPin = Gpio::D12; // 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 = Gpio::D12; // OUT_PWM8 // engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = H144_OUT_IO3; engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO3;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();
@ -133,8 +133,8 @@ void setBoardDefaultConfiguration() {
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK
engineConfiguration->injectionMode = IM_SEQUENTIAL; engineConfiguration->injectionMode = IM_SEQUENTIAL;
engineConfiguration->luaOutputPins[0] = H144_OUT_IO4; // 104 ETB Relay engineConfiguration->luaOutputPins[0] = Gpio::H144_OUT_IO4; // 104 ETB Relay
engineConfiguration->luaOutputPins[1] = H144_OUT_PWM2; // aux LS1, upstream oxygen heaters engineConfiguration->luaOutputPins[1] = Gpio::H144_OUT_PWM2; // aux LS1, upstream oxygen heaters
setPPSCalibration(0.75, 4.45, 0.43, 2.20); setPPSCalibration(0.75, 4.45, 0.43, 2.20);

View File

@ -108,15 +108,15 @@ void setBoardDefaultConfiguration() {
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->fuelPumpPin = H144_OUT_IO3; engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO3;
engineConfiguration->malfunctionIndicatorPin = Gpio::G4; // 47 - CEL engineConfiguration->malfunctionIndicatorPin = Gpio::G4; // 47 - CEL
engineConfiguration->tachOutputPin = H144_OUT_PWM7; engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM7;
// earlier revisions? engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5 // earlier revisions? engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
engineConfiguration->idle.solenoidPin = H144_OUT_IO4; engineConfiguration->idle.solenoidPin = Gpio::H144_OUT_IO4;
engineConfiguration->fanPin = H144_OUT_PWM8; engineConfiguration->fanPin = Gpio::H144_OUT_PWM8;
engineConfiguration->mainRelayPin = H144_OUT_IO1; engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO1;
// engineConfiguration->injectorCompensationMode // engineConfiguration->injectorCompensationMode
engineConfiguration->fuelReferencePressure = 300; engineConfiguration->fuelReferencePressure = 300;
@ -132,6 +132,6 @@ void setBoardDefaultConfiguration() {
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK
engineConfiguration->vrThreshold[0].pin = H144_OUT_PWM6; engineConfiguration->vrThreshold[0].pin = Gpio::H144_OUT_PWM6;
hellenWbo(); hellenWbo();
} }

View File

@ -85,7 +85,7 @@ void setBoardConfigOverrides() {
// control pins are inverted since overall ECU pinout seems to be inverted // control pins are inverted since overall ECU pinout seems to be inverted
engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3; engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3;
engineConfiguration->etbIo[0].directionPin2 = H144_OUT_PWM2; engineConfiguration->etbIo[0].directionPin2 = Gpio::H144_OUT_PWM2;
engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_IO12; engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_IO12;
engineConfiguration->etbIo[0].disablePin = Gpio::Unassigned; engineConfiguration->etbIo[0].disablePin = Gpio::Unassigned;
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
@ -99,9 +99,9 @@ void setBoardConfigOverrides() {
if (isFirstInvocation) { if (isFirstInvocation) {
isFirstInvocation = false; isFirstInvocation = false;
efiSetPadMode("ETB FIX0", H144_OUT_PWM4, PAL_MODE_INPUT_ANALOG); efiSetPadMode("ETB FIX0", Gpio::H144_OUT_PWM4, PAL_MODE_INPUT_ANALOG);
efiSetPadMode("ETB FIX1", H144_OUT_PWM5, PAL_MODE_INPUT_ANALOG); efiSetPadMode("ETB FIX1", Gpio::H144_OUT_PWM5, PAL_MODE_INPUT_ANALOG);
efiSetPadMode("ETB FIX2", Gpio::H144_OUT_IO13;, PAL_MODE_INPUT_ANALOG); efiSetPadMode("ETB FIX2", Gpio::H144_OUT_IO13, PAL_MODE_INPUT_ANALOG);
} }
engineConfiguration->stepperDcInvertedPins = false; engineConfiguration->stepperDcInvertedPins = false;
} else if (hellenBoardId == BOARD_ID_154hyundai_c || hellenBoardId == BOARD_ID_154hyundai_d) { } else if (hellenBoardId == BOARD_ID_154hyundai_c || hellenBoardId == BOARD_ID_154hyundai_d) {
@ -114,7 +114,7 @@ void setBoardConfigOverrides() {
//ETB1 //ETB1
// PWM pin // PWM pin
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
// DIR pin // DIR pin
engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3; engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3;
// Disable pin // Disable pin
@ -125,9 +125,9 @@ void setBoardConfigOverrides() {
// wastegate DC motor // wastegate DC motor
//ETB2 //ETB2
// PWM pin // PWM pin
engineConfiguration->etbIo[1].controlPin = H144_OUT_PWM4; engineConfiguration->etbIo[1].controlPin = Gpio::H144_OUT_PWM4;
// DIR pin // DIR pin
engineConfiguration->etbIo[1].directionPin1 = H144_OUT_PWM5; engineConfiguration->etbIo[1].directionPin1 = Gpio::H144_OUT_PWM5;
// Disable pin // Disable pin
engineConfiguration->etbIo[1].disablePin = Gpio::H144_OUT_IO13;; engineConfiguration->etbIo[1].disablePin = Gpio::H144_OUT_IO13;;
// Unused // Unused
@ -149,10 +149,10 @@ void setBoardDefaultConfiguration() {
engineConfiguration->canTxPin = H176_CAN_TX; engineConfiguration->canTxPin = H176_CAN_TX;
engineConfiguration->canRxPin = H176_CAN_RX; engineConfiguration->canRxPin = H176_CAN_RX;
engineConfiguration->fuelPumpPin = H144_OUT_IO9; engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO9;
// engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8 // engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = H144_OUT_IO3; // pin: 111a engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO3; // pin: 111a
engineConfiguration->malfunctionIndicatorPin = H144_OUT_PWM8; engineConfiguration->malfunctionIndicatorPin = Gpio::H144_OUT_PWM8;
engineConfiguration->brakePedalPin = H144_IN_RES3; engineConfiguration->brakePedalPin = H144_IN_RES3;
engineConfiguration->clutchUpPin = H144_IN_RES2; engineConfiguration->clutchUpPin = H144_IN_RES2;
@ -165,10 +165,10 @@ void setBoardDefaultConfiguration() {
} }
static Gpio OUTPUTS[] = { static Gpio OUTPUTS[] = {
H144_LS_1, Gpio::H144_LS_1,
H144_LS_2, Gpio::H144_LS_2,
H144_LS_3, Gpio::H144_LS_3,
H144_LS_4, Gpio::H144_LS_4,
}; };
int getBoardMetaOutputsCount() { int getBoardMetaOutputsCount() {

View File

@ -1,21 +1,18 @@
# https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/hellen/hellen_meta.h meta: config/boards/hellen_meta.h
pins: pins:
- pin: P66 - pin: P66
# LOW3 IO1 meta: H144_OUT_IO1
id: D3
class: outputs class: outputs
ts_name: Aux P66 ts_name: Aux P66
- pin: P67 - pin: P67
# LOW4 IO2 meta: H144_OUT_IO2
id: A9
class: outputs class: outputs
ts_name: Aux P67 ts_name: Aux P67
- pin: P68 - pin: P68
# LOW6 IO4 meta: H144_OUT_IO4
id: G5
class: outputs class: outputs
ts_name: Aux P68 ts_name: Aux P68
@ -100,28 +97,28 @@ pins:
ts_name: BK2 Wastegate Position - 22 ts_name: BK2 Wastegate Position - 22
- pin: K25 - pin: K25
id: G7 meta: H144_LS_1
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: G8 meta: H144_LS_2
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: D11 meta: H144_LS_3
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: D10 meta: H144_LS_4
class: outputs class: outputs
ts_name: INJ_4 k28 ts_name: INJ_4 k28
function: Injector 4 function: Injector 4
@ -187,8 +184,7 @@ pins:
function: Analog Ground function: Analog Ground
- pin: K47 - pin: K47
# H144_LS_7 meta: H144_LS_7
id: F13
class: outputs class: outputs
ts_name: K47 BK1 Wastegate Solenoid ts_name: K47 BK1 Wastegate Solenoid
function: BK1 Wastegate Solenoid function: BK1 Wastegate Solenoid
@ -246,38 +242,33 @@ pins:
type: 5v type: 5v
- pin: K64 - pin: K64
# H144_OUT_IO3 meta: H144_OUT_IO3
id: G14
class: outputs class: outputs
ts_name: Main Relay K64 ts_name: Main Relay K64
function: Main relay control function: Main relay control
type: ls type: ls
- pin: K65 - pin: K65
# H144_OUT_IO7 meta: H144_OUT_IO7
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: K66 - pin: K66
# H144_LS_5 meta: H144_LS_5
id: D9
class: outputs class: outputs
ts_name: VVT1 ts_name: VVT1
function: VVT1 function: VVT1
- pin: K68 - pin: K68
# H144_LS_6 meta: H144_LS_6
id: F12
class: outputs class: outputs
ts_name: VVT2 ts_name: VVT2
function: VVT2 function: VVT2
- pin: K70 - pin: K70
# H144_OUT_IO9 meta: H144_OUT_IO9
id: G13
class: outputs class: outputs
ts_name: Fuel Pump K70 ts_name: Fuel Pump K70
function: Fuel Pump Relay function: Fuel Pump Relay
@ -319,36 +310,32 @@ pins:
function: Analog Ground function: Analog Ground
- pin: K86 - pin: K86
# H144_OUT_PWM7 meta: H144_OUT_PWM7
id: D15
class: outputs class: outputs
ts_name: Tacho ts_name: Tacho
function: Tachometer function: Tachometer
- pin: K87 - pin: K87
# H144_OUT_IO10 meta: H144_OUT_IO10
id: G12
class: outputs class: outputs
ts_name: K87 AC Relay ts_name: K87 AC Relay
function: A/C Relay function: A/C Relay
type: ls type: ls
- pin: K88 - pin: K88
# H144_OUT_IO8 meta: H144_OUT_IO8
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 meta: H144_OUT_PWM8
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: E3 meta: H144_IGN_4
class: outputs class: outputs
ts_name: Coil 4 ts_name: Coil 4
function: Coil 4 function: Coil 4
@ -361,7 +348,7 @@ pins:
function: Ground function: Ground
- pin: A16 - pin: A16
id: E5 meta: H144_IGN_2
class: outputs class: outputs
ts_name: Coil 2 ts_name: Coil 2
function: Coil 2 function: Coil 2
@ -376,7 +363,7 @@ pins:
- pin: A31 - pin: A31
id: C13 meta: H144_IGN_1
class: outputs class: outputs
ts_name: Coil 1 ts_name: Coil 1
function: Coil 1 function: Coil 1
@ -393,7 +380,7 @@ pins:
function: BK2 DC Wastegate Pos function: BK2 DC Wastegate Pos
- pin: A46 - pin: A46
id: E4 meta: H144_IGN_3
class: outputs class: outputs
ts_name: Coil 3 ts_name: Coil 3
function: Coil 3 function: Coil 3

View File

@ -75,8 +75,8 @@ void setBoardConfigOverrides() {
// NB2 still uses L6205PD // NB2 still uses L6205PD
engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3; // ETB+ engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3; // ETB+
engineConfiguration->etbIo[0].directionPin2 = H144_OUT_PWM4; // ETB- engineConfiguration->etbIo[0].directionPin2 = Gpio::H144_OUT_PWM4; // ETB-
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; // ETB_EN engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2; // ETB_EN
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
setDefaultHellenAtPullUps(); setDefaultHellenAtPullUps();

View File

@ -71,7 +71,7 @@ void setBoardConfigOverrides() {
setupVbatt(); setupVbatt();
// hellen88bmw uses L6205PD // hellen88bmw uses L6205PD
engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM2; // ETB+ engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM2; // ETB+
engineConfiguration->etbIo[0].directionPin2 = Gpio::H144_OUT_PWM3; // ETB- engineConfiguration->etbIo[0].directionPin2 = Gpio::H144_OUT_PWM3; // ETB-
engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM1; // ETB_EN engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM1; // ETB_EN
engineConfiguration->etb_use_two_wires = true; engineConfiguration->etb_use_two_wires = true;
@ -101,10 +101,10 @@ void setBoardDefaultConfiguration() {
setHellenCan(); setHellenCan();
engineConfiguration->fuelPumpPin = Gpio::D12; // 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 = Gpio::H144_OUT_PWM5;
// engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8 // engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->mainRelayPin = H144_OUT_IO3; // pin: 111a engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO3; // pin: 111a
engineConfiguration->tachOutputPin = H144_OUT_PWM7; engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM7;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();

View File

@ -1,4 +1,4 @@
# https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/hellen/hellen_meta.h meta: config/boards/hellen_meta.h
pins: pins:
# extension header pins # extension header pins

View File

@ -22,7 +22,7 @@ static void setInjectorPins() {
engineConfiguration->clutchDownPin = Gpio::C4; // 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 = Gpio::H144_OUT_IO8;
} }
static void setIgnitionPins() { static void setIgnitionPins() {
@ -55,7 +55,7 @@ static void setupDefaultSensorInputs() {
engineConfiguration->tps1_1AdcChannel = H144_IN_TPS; engineConfiguration->tps1_1AdcChannel = H144_IN_TPS;
engineConfiguration->mafAdcChannel = EFI_ADC_10; engineConfiguration->mafAdcChannel = EFI_ADC_10;
engineConfiguration->map.sensor.hwChannel = Gpio::H144_IN_MAP3; engineConfiguration->map.sensor.hwChannel = H144_IN_MAP3;
engineConfiguration->afr.hwChannel = EFI_ADC_1; engineConfiguration->afr.hwChannel = EFI_ADC_1;
@ -101,7 +101,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5 engineConfiguration->idle.solenoidPin = Gpio::D14; // OUT_PWM5
engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8 engineConfiguration->fanPin = Gpio::D12; // OUT_PWM8
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM1; engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM1;
engineConfiguration->fan2Pin = H144_OUT_IO2; engineConfiguration->fan2Pin = Gpio::H144_OUT_IO2;
// "required" hardware is done - set some reasonable defaults // "required" hardware is done - set some reasonable defaults
setupDefaultSensorInputs(); setupDefaultSensorInputs();

View File

@ -1,7 +1,4 @@
# meta: config/boards/hellen_meta.h
# CONNECTOR MAPPING NEEDED
# https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/hellen/hellen_meta.h
#
pins: pins:
- pin: p18_p22 - pin: p18_p22

View File

@ -1,4 +1,4 @@
# https://github.com/rusefi/rusefi/blob/master/firmware/config/boards/hellen/hellen_meta.h meta: config/boards/hellen_meta.h
pins: pins:
- pin: A1 - pin: A1

View File

@ -95,13 +95,13 @@ void detectHellenBoardType();
#define H176_IGN_5 Gpio::E2 #define H176_IGN_5 Gpio::E2
#define H144_OUT_PWM1 D13 #define H144_OUT_PWM1 D13
#define H144_OUT_PWM2 Gpio::C6 #define H144_OUT_PWM2 C6
#define H144_OUT_PWM3 C7 #define H144_OUT_PWM3 C7
#define H144_OUT_PWM4 Gpio::C8 #define H144_OUT_PWM4 C8
#define H144_OUT_PWM5 Gpio::C9 #define H144_OUT_PWM5 C9
#define H144_OUT_PWM6 Gpio::D14 #define H144_OUT_PWM6 D14
#define H144_OUT_PWM7 Gpio::D15 #define H144_OUT_PWM7 D15
#define H144_OUT_PWM8 Gpio::D12 #define H144_OUT_PWM8 D12
// also IO1/IO5 on rev 0.6 // also IO1/IO5 on rev 0.6
@ -116,15 +116,15 @@ void detectHellenBoardType();
#define H144_GP8 Gpio::E10 #define H144_GP8 Gpio::E10
#define H144_GP9 Gpio::F2 #define H144_GP9 Gpio::F2
#define H144_OUT_IO1 Gpio::D3 #define H144_OUT_IO1 D3
#define H144_OUT_IO2 Gpio::A9 #define H144_OUT_IO2 A9
#define H144_OUT_IO3 Gpio::G14 #define H144_OUT_IO3 G14
#define H144_OUT_IO4 Gpio::G5 #define H144_OUT_IO4 G5
#define H144_OUT_IO5 Gpio::D2 #define H144_OUT_IO5 D2
#define H144_OUT_IO6 G11 #define H144_OUT_IO6 G11
#define H144_OUT_IO7 Gpio::G3 #define H144_OUT_IO7 G3
#define H144_OUT_IO8 Gpio::G4 #define H144_OUT_IO8 G4
#define H144_OUT_IO9 Gpio::G13 #define H144_OUT_IO9 G13
#define H144_OUT_IO10 G12 #define H144_OUT_IO10 G12
#define H144_OUT_IO11 G2 #define H144_OUT_IO11 G2
#define H144_OUT_IO12 A8 #define H144_OUT_IO12 A8

View File

@ -10,23 +10,23 @@
#include "proteus_meta.h" #include "proteus_meta.h"
static const brain_pin_e injPins[] = { static const brain_pin_e injPins[] = {
PROTEUS_LS_1, Gpio::PROTEUS_LS_1,
PROTEUS_LS_2, Gpio::PROTEUS_LS_2,
PROTEUS_LS_3, Gpio::PROTEUS_LS_3,
PROTEUS_LS_4, Gpio::PROTEUS_LS_4,
PROTEUS_LS_5, Gpio::PROTEUS_LS_5,
PROTEUS_LS_6, Gpio::PROTEUS_LS_6,
PROTEUS_LS_7, Gpio::PROTEUS_LS_7,
PROTEUS_LS_8, Gpio::PROTEUS_LS_8,
PROTEUS_LS_9, Gpio::PROTEUS_LS_9,
PROTEUS_LS_10, Gpio::PROTEUS_LS_10,
PROTEUS_LS_11, Gpio::PROTEUS_LS_11,
PROTEUS_LS_12 Gpio::PROTEUS_LS_12
}; };
static const brain_pin_e ignPins[] = { static const brain_pin_e ignPins[] = {
PROTEUS_IGN_1, Gpio::PROTEUS_IGN_1,
PROTEUS_IGN_2, Gpio::PROTEUS_IGN_2,
PROTEUS_IGN_3, PROTEUS_IGN_3,
PROTEUS_IGN_4, PROTEUS_IGN_4,
PROTEUS_IGN_5, PROTEUS_IGN_5,
@ -34,9 +34,9 @@ static const brain_pin_e ignPins[] = {
PROTEUS_IGN_7, PROTEUS_IGN_7,
PROTEUS_IGN_8, PROTEUS_IGN_8,
PROTEUS_IGN_9, PROTEUS_IGN_9,
PROTEUS_IGN_10, Gpio::PROTEUS_IGN_10,
PROTEUS_IGN_11, Gpio::PROTEUS_IGN_11,
PROTEUS_IGN_12, Gpio::PROTEUS_IGN_12,
}; };
static void setInjectorPins() { static void setInjectorPins() {
@ -184,9 +184,9 @@ void setBoardDefaultConfiguration() {
engineConfiguration->injectionMode = IM_SIMULTANEOUS; engineConfiguration->injectionMode = IM_SIMULTANEOUS;
#if HW_PROTEUS & EFI_PROD_CODE #if HW_PROTEUS & EFI_PROD_CODE
engineConfiguration->mainRelayPin = PROTEUS_LS_12; engineConfiguration->mainRelayPin = Gpio::PROTEUS_LS_12;
engineConfiguration->fanPin = PROTEUS_LS_11; engineConfiguration->fanPin = Gpio::PROTEUS_LS_11;
engineConfiguration->fuelPumpPin = PROTEUS_LS_10; engineConfiguration->fuelPumpPin = Gpio::PROTEUS_LS_10;
#endif // HW_PROTEUS #endif // HW_PROTEUS
// 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

View File

@ -12,40 +12,40 @@
#define PROTEUS_DEFAULT_AT_PULLUP 2700 #define PROTEUS_DEFAULT_AT_PULLUP 2700
#define PROTEUS_LS_1 Gpio::D7 #define PROTEUS_LS_1 D7
// pin 15/black35 // pin 15/black35
#define PROTEUS_LS_2 Gpio::G9 #define PROTEUS_LS_2 G9
// pin 4/black35 // pin 4/black35
#define PROTEUS_LS_3 Gpio::G10 #define PROTEUS_LS_3 G10
// pin 16/black35 // pin 16/black35
#define PROTEUS_LS_4 Gpio::G11 #define PROTEUS_LS_4 G11
// pin 5/black35 // pin 5/black35
#define PROTEUS_LS_5 Gpio::G12 #define PROTEUS_LS_5 G12
// pin 6/black35 // pin 6/black35
#define PROTEUS_LS_6 Gpio::G13 #define PROTEUS_LS_6 G13
// pin 7/black35 // pin 7/black35
#define PROTEUS_LS_7 Gpio::G14 #define PROTEUS_LS_7 G14
#define PROTEUS_LS_8 Gpio::B4 #define PROTEUS_LS_8 B4
#define PROTEUS_LS_9 Gpio::B5 #define PROTEUS_LS_9 B5
// pin 20/black35 // pin 20/black35
#define PROTEUS_LS_10 Gpio::B6 #define PROTEUS_LS_10 B6
#define PROTEUS_LS_11 Gpio::B7 #define PROTEUS_LS_11 B7
#define PROTEUS_LS_12 Gpio::B8 #define PROTEUS_LS_12 B8
// pin 10/black35 // pin 10/black35
#define PROTEUS_LS_13 Gpio::B9 #define PROTEUS_LS_13 B9
// pin 11/black35 // pin 11/black35
#define PROTEUS_LS_14 Gpio::E0 #define PROTEUS_LS_14 E0
// pin 12/black35 // pin 12/black35
#define PROTEUS_LS_15 Gpio::E1 #define PROTEUS_LS_15 E1
// pin 23/black35 // pin 23/black35
#define PROTEUS_LS_16 Gpio::E2 #define PROTEUS_LS_16 E2
// pin 2/black35 // pin 2/black35
@ -59,10 +59,10 @@
#define PROTEUS_HS_4 Gpio::D14 #define PROTEUS_HS_4 Gpio::D14
// pin 35/black35 // pin 35/black35
#define PROTEUS_IGN_1 Gpio::D4 #define PROTEUS_IGN_1 D4
// pin 34/black35 // pin 34/black35
#define PROTEUS_IGN_2 Gpio::D3 #define PROTEUS_IGN_2 D3
// pin 22/black35 // pin 22/black35
#define PROTEUS_IGN_3 Gpio::C9 #define PROTEUS_IGN_3 Gpio::C9
@ -72,9 +72,9 @@
#define PROTEUS_IGN_7 Gpio::G7 #define PROTEUS_IGN_7 Gpio::G7
#define PROTEUS_IGN_8 Gpio::G6 #define PROTEUS_IGN_8 Gpio::G6
#define PROTEUS_IGN_9 Gpio::G5 #define PROTEUS_IGN_9 Gpio::G5
#define PROTEUS_IGN_10 Gpio::G4 #define PROTEUS_IGN_10 G4
#define PROTEUS_IGN_11 Gpio::G3 #define PROTEUS_IGN_11 G3
#define PROTEUS_IGN_12 Gpio::G2 #define PROTEUS_IGN_12 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
@ -143,22 +143,24 @@
#if HW_PROTEUS #if HW_PROTEUS
static Gpio PROTEUS_OUTPUTS[] = { static Gpio PROTEUS_OUTPUTS[] = {
PROTEUS_LS_1, Gpio::PROTEUS_LS_1,
PROTEUS_LS_2, Gpio::PROTEUS_LS_2,
PROTEUS_LS_3, Gpio::PROTEUS_LS_3,
PROTEUS_LS_4, Gpio::PROTEUS_LS_4,
PROTEUS_LS_5, Gpio::PROTEUS_LS_5,
PROTEUS_LS_6, Gpio::PROTEUS_LS_6,
PROTEUS_LS_7, Gpio::PROTEUS_LS_7,
PROTEUS_LS_8, Gpio::PROTEUS_LS_8,
PROTEUS_LS_9, Gpio::PROTEUS_LS_9,
PROTEUS_LS_10, Gpio::PROTEUS_LS_10,
PROTEUS_LS_11, Gpio::PROTEUS_LS_11,
PROTEUS_LS_12, Gpio::PROTEUS_LS_12,
PROTEUS_LS_13, Gpio::PROTEUS_LS_13,
PROTEUS_LS_14, Gpio::PROTEUS_LS_14,
PROTEUS_LS_15, Gpio::PROTEUS_LS_15,
PROTEUS_LS_16, Gpio::PROTEUS_LS_16,
Gpio::PROTEUS_IGN_1,
Gpio::PROTEUS_IGN_2,
}; };
#endif // HW_PROTEUS #endif // HW_PROTEUS

View File

@ -271,12 +271,12 @@ void setEngineBMW_M73_Proteus() {
engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_4; engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_4;
engineConfiguration->starterControlPin = PROTEUS_LS_14; engineConfiguration->starterControlPin = Gpio::PROTEUS_LS_14;
engineConfiguration->startStopButtonPin = PROTEUS_DIGITAL_3; engineConfiguration->startStopButtonPin = PROTEUS_DIGITAL_3;
engineConfiguration->startStopButtonMode = PI_PULLUP; engineConfiguration->startStopButtonMode = PI_PULLUP;
engineConfiguration->fuelPumpPin = PROTEUS_LS_16; engineConfiguration->fuelPumpPin = Gpio::PROTEUS_LS_16;
engineConfiguration->fanPin = PROTEUS_LS_15; engineConfiguration->fanPin = Gpio::PROTEUS_LS_15;
engineConfiguration->mainRelayPin = PROTEUS_LS_13; engineConfiguration->mainRelayPin = Gpio::PROTEUS_LS_13;
engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_ANALOG_VOLT_8; // M73 adapter board engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_ANALOG_VOLT_8; // M73 adapter board
engineConfiguration->map.sensor.type = MT_MPX4250A; engineConfiguration->map.sensor.type = MT_MPX4250A;

View File

@ -491,29 +491,29 @@ void proteusBoardTest() {
engineConfiguration->fuelPumpPin = Gpio::Unassigned; engineConfiguration->fuelPumpPin = Gpio::Unassigned;
#if EFI_PROD_CODE #if EFI_PROD_CODE
engineConfiguration->injectionPins[0] = PROTEUS_LS_1; engineConfiguration->injectionPins[0] = Gpio::PROTEUS_LS_1;
engineConfiguration->injectionPins[1] = PROTEUS_LS_2; engineConfiguration->injectionPins[1] = Gpio::PROTEUS_LS_2;
engineConfiguration->injectionPins[2] = PROTEUS_LS_3; engineConfiguration->injectionPins[2] = Gpio::PROTEUS_LS_3;
engineConfiguration->injectionPins[3] = PROTEUS_LS_4; engineConfiguration->injectionPins[3] = Gpio::PROTEUS_LS_4;
engineConfiguration->injectionPins[4] = PROTEUS_LS_5; engineConfiguration->injectionPins[4] = Gpio::PROTEUS_LS_5;
engineConfiguration->injectionPins[5] = PROTEUS_LS_6; engineConfiguration->injectionPins[5] = Gpio::PROTEUS_LS_6;
engineConfiguration->injectionPins[6] = PROTEUS_LS_9; engineConfiguration->injectionPins[6] = Gpio::PROTEUS_LS_9;
engineConfiguration->injectionPins[7] = PROTEUS_LS_8; engineConfiguration->injectionPins[7] = Gpio::PROTEUS_LS_8;
engineConfiguration->injectionPins[8] = PROTEUS_LS_11; engineConfiguration->injectionPins[8] = Gpio::PROTEUS_LS_11;
engineConfiguration->injectionPins[9] = PROTEUS_LS_10; engineConfiguration->injectionPins[9] = Gpio::PROTEUS_LS_10;
engineConfiguration->injectionPins[10] = PROTEUS_LS_12; engineConfiguration->injectionPins[10] = Gpio::PROTEUS_LS_12;
engineConfiguration->injectionPins[11] = PROTEUS_LS_13; engineConfiguration->injectionPins[11] = Gpio::PROTEUS_LS_13;
engineConfiguration->luaOutputPins[0] = PROTEUS_LS_7; engineConfiguration->luaOutputPins[0] = Gpio::PROTEUS_LS_7;
engineConfiguration->luaOutputPins[1] = PROTEUS_LS_14; engineConfiguration->luaOutputPins[1] = Gpio::PROTEUS_LS_14;
engineConfiguration->luaOutputPins[2] = PROTEUS_LS_15; engineConfiguration->luaOutputPins[2] = Gpio::PROTEUS_LS_15;
engineConfiguration->luaOutputPins[3] = PROTEUS_LS_16; engineConfiguration->luaOutputPins[3] = Gpio::PROTEUS_LS_16;
engineConfiguration->luaOutputPins[4] = PROTEUS_HS_2; engineConfiguration->luaOutputPins[4] = PROTEUS_HS_2;
engineConfiguration->luaOutputPins[5] = PROTEUS_HS_4; engineConfiguration->luaOutputPins[5] = PROTEUS_HS_4;
engineConfiguration->ignitionPins[0] = PROTEUS_IGN_1; engineConfiguration->ignitionPins[0] = Gpio::PROTEUS_IGN_1;
engineConfiguration->ignitionPins[1] = PROTEUS_IGN_2; engineConfiguration->ignitionPins[1] = Gpio::PROTEUS_IGN_2;
engineConfiguration->ignitionPins[2] = PROTEUS_IGN_4; engineConfiguration->ignitionPins[2] = PROTEUS_IGN_4;
engineConfiguration->ignitionPins[3] = PROTEUS_IGN_5; engineConfiguration->ignitionPins[3] = PROTEUS_IGN_5;
engineConfiguration->ignitionPins[4] = PROTEUS_IGN_6; engineConfiguration->ignitionPins[4] = PROTEUS_IGN_6;
@ -524,7 +524,7 @@ void proteusBoardTest() {
engineConfiguration->ignitionPins[8] = PROTEUS_IGN_9; engineConfiguration->ignitionPins[8] = PROTEUS_IGN_9;
engineConfiguration->ignitionPins[9] = PROTEUS_IGN_8; engineConfiguration->ignitionPins[9] = PROTEUS_IGN_8;
engineConfiguration->ignitionPins[10] = PROTEUS_HS_1; engineConfiguration->ignitionPins[10] = PROTEUS_HS_1;
engineConfiguration->ignitionPins[11] = PROTEUS_IGN_12; engineConfiguration->ignitionPins[11] = Gpio::PROTEUS_IGN_12;
strncpy(config->luaScript, R"( strncpy(config->luaScript, R"(
startPwm(0, 10, 0.5) startPwm(0, 10, 0.5)

View File

@ -80,12 +80,12 @@ void setSbc() {
#if HW_PROTEUS #if HW_PROTEUS
// tan wire with a black trace - "HEI B", plug pin B // tan wire with a black trace - "HEI B", plug pin B
ignOverride->pin = PROTEUS_IGN_12; ignOverride->pin = Gpio::PROTEUS_IGN_12;
engineConfiguration->fanPin = Gpio::Unassigned; engineConfiguration->fanPin = Gpio::Unassigned;
// reminder about D101 // reminder about D101
engineConfiguration->injectionPins[0] = PROTEUS_LS_14; // #1 engineConfiguration->injectionPins[0] = Gpio::PROTEUS_LS_14; // #1
// reminder about D104 // reminder about D104
engineConfiguration->injectionPins[3] = PROTEUS_LS_15; // #4 engineConfiguration->injectionPins[3] = Gpio::PROTEUS_LS_15; // #4
// wow high side relay control // wow high side relay control
engineConfiguration->fuelPumpPin = PROTEUS_HS_1; engineConfiguration->fuelPumpPin = PROTEUS_HS_1;

View File

@ -16,7 +16,7 @@ void proteusHarley() {
engineConfiguration->mapCamDetectionAnglePosition = 50; engineConfiguration->mapCamDetectionAnglePosition = 50;
engineConfiguration->luaOutputPins[0] = PROTEUS_LS_12; engineConfiguration->luaOutputPins[0] = Gpio::PROTEUS_LS_12;
#if HW_PROTEUS #if HW_PROTEUS
strncpy(config->luaScript, R"( strncpy(config->luaScript, R"(
outputIndex = 0 outputIndex = 0

View File

@ -81,17 +81,17 @@ void setProteusHondaElement2003() {
// offset -41 // offset -41
engineConfiguration->injectionPins[0] = PROTEUS_LS_8; engineConfiguration->injectionPins[0] = Gpio::PROTEUS_LS_8;
engineConfiguration->injectionPins[1] = PROTEUS_LS_7; engineConfiguration->injectionPins[1] = Gpio::PROTEUS_LS_7;
engineConfiguration->injectionPins[2] = PROTEUS_LS_6; engineConfiguration->injectionPins[2] = Gpio::PROTEUS_LS_6;
engineConfiguration->injectionPins[3] = PROTEUS_LS_5; engineConfiguration->injectionPins[3] = Gpio::PROTEUS_LS_5;
vtsControl->pin = PROTEUS_HS_1; vtsControl->pin = PROTEUS_HS_1;
engineConfiguration->vvtPins[0] = PROTEUS_HS_2; engineConfiguration->vvtPins[0] = PROTEUS_HS_2;
engineConfiguration->malfunctionIndicatorPin = PROTEUS_LS_10; engineConfiguration->malfunctionIndicatorPin = Gpio::PROTEUS_LS_10;
engineConfiguration->idle.solenoidPin = PROTEUS_LS_15; engineConfiguration->idle.solenoidPin = Gpio::PROTEUS_LS_15;
engineConfiguration->fanPin = PROTEUS_LS_1; engineConfiguration->fanPin = Gpio::PROTEUS_LS_1;
engineConfiguration->iat.adcChannel = PROTEUS_IN_ANALOG_TEMP_1; engineConfiguration->iat.adcChannel = PROTEUS_IN_ANALOG_TEMP_1;
engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_2; engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_2;
@ -99,8 +99,8 @@ void setProteusHondaElement2003() {
engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_ANALOG_VOLT_6; engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_ANALOG_VOLT_6;
engineConfiguration->fanPin = Gpio::Unassigned; engineConfiguration->fanPin = Gpio::Unassigned;
engineConfiguration->mainRelayPin = PROTEUS_LS_9; engineConfiguration->mainRelayPin = Gpio::PROTEUS_LS_9;
engineConfiguration->fuelPumpPin = PROTEUS_LS_11; engineConfiguration->fuelPumpPin = Gpio::PROTEUS_LS_11;
#endif // HW_PROTEUS #endif // HW_PROTEUS
} }

View File

@ -84,14 +84,14 @@ void setHyundaiPb() {
setCommonNTCSensor(&engineConfiguration->clt, PROTEUS_DEFAULT_AT_PULLUP); setCommonNTCSensor(&engineConfiguration->clt, PROTEUS_DEFAULT_AT_PULLUP);
setCommonNTCSensor(&engineConfiguration->iat, PROTEUS_DEFAULT_AT_PULLUP); setCommonNTCSensor(&engineConfiguration->iat, PROTEUS_DEFAULT_AT_PULLUP);
// engineConfiguration->acRelayPin = PROTEUS_LS_6; // engineConfiguration->acRelayPin = Gpio::PROTEUS_LS_6;
engineConfiguration->acSwitch = PROTEUS_DIGITAL_5; engineConfiguration->acSwitch = PROTEUS_DIGITAL_5;
engineConfiguration->fanPin = PROTEUS_LS_5; engineConfiguration->fanPin = Gpio::PROTEUS_LS_5;
engineConfiguration->tachOutputPin = PROTEUS_IGN_12; engineConfiguration->tachOutputPin = Gpio::PROTEUS_IGN_12;
engineConfiguration->hpfpValvePin = PROTEUS_LS_6; engineConfiguration->hpfpValvePin = Gpio::PROTEUS_LS_6;
engineConfiguration->vvtPins[0] = PROTEUS_LS_15; // intake engineConfiguration->vvtPins[0] = Gpio::PROTEUS_LS_15; // intake
engineConfiguration->vvtPins[1] = PROTEUS_LS_16; // exhaust engineConfiguration->vvtPins[1] = Gpio::PROTEUS_LS_16; // exhaust
#endif // HW_PROTEUS #endif // HW_PROTEUS
#if HW_PROTEUS #if HW_PROTEUS
@ -210,7 +210,7 @@ void setProteusHyundaiPb() {
setProteusEtbIO(); setProteusEtbIO();
// something something input levels are not happy for digital input pin? // something something input levels are not happy for digital input pin?
engineConfiguration->starterControlPin = PROTEUS_LS_14; engineConfiguration->starterControlPin = Gpio::PROTEUS_LS_14;
engineConfiguration->startStopButtonPin = PROTEUS_IN_AV_6_DIGITAL; engineConfiguration->startStopButtonPin = PROTEUS_IN_AV_6_DIGITAL;
engineConfiguration->startStopButtonMode = PI_DEFAULT; engineConfiguration->startStopButtonMode = PI_DEFAULT;
} }

View File

@ -710,7 +710,7 @@ void setMiataNB2_Proteus() {
engineConfiguration->ignitionMode = IM_WASTED_SPARK; engineConfiguration->ignitionMode = IM_WASTED_SPARK;
#if EFI_PROD_CODE #if EFI_PROD_CODE
engineConfiguration->ignitionPins[0] = PROTEUS_IGN_1; engineConfiguration->ignitionPins[0] = Gpio::PROTEUS_IGN_1;
engineConfiguration->ignitionPins[1] = Gpio::Unassigned; engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
engineConfiguration->ignitionPins[2] = PROTEUS_IGN_3; engineConfiguration->ignitionPins[2] = PROTEUS_IGN_3;
engineConfiguration->ignitionPins[3] = Gpio::Unassigned; engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
@ -719,14 +719,14 @@ void setMiataNB2_Proteus() {
engineConfiguration->injectionMode = IM_SEQUENTIAL; engineConfiguration->injectionMode = IM_SEQUENTIAL;
engineConfiguration->injectionPins[0] = PROTEUS_LS_1; // BLU # pin 3/black35 engineConfiguration->injectionPins[0] = Gpio::PROTEUS_LS_1; // BLU # pin 3/black35
engineConfiguration->injectionPins[1] = PROTEUS_LS_2; // BLK engineConfiguration->injectionPins[1] = Gpio::PROTEUS_LS_2; // BLK
engineConfiguration->injectionPins[2] = PROTEUS_LS_3; // GRN engineConfiguration->injectionPins[2] = Gpio::PROTEUS_LS_3; // GRN
engineConfiguration->injectionPins[3] = PROTEUS_LS_4; // WHT engineConfiguration->injectionPins[3] = Gpio::PROTEUS_LS_4; // WHT
engineConfiguration->enableSoftwareKnock = true; engineConfiguration->enableSoftwareKnock = true;
engineConfiguration->malfunctionIndicatorPin = PROTEUS_LS_10; engineConfiguration->malfunctionIndicatorPin = Gpio::PROTEUS_LS_10;
engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_MAP; engineConfiguration->map.sensor.hwChannel = PROTEUS_IN_MAP;
@ -740,9 +740,9 @@ void setMiataNB2_Proteus() {
engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_1; engineConfiguration->clt.adcChannel = PROTEUS_IN_ANALOG_TEMP_1;
engineConfiguration->iat.adcChannel = PROTEUS_IN_ANALOG_TEMP_3; engineConfiguration->iat.adcChannel = PROTEUS_IN_ANALOG_TEMP_3;
engineConfiguration->fuelPumpPin = PROTEUS_LS_6; engineConfiguration->fuelPumpPin = Gpio::PROTEUS_LS_6;
engineConfiguration->idle.solenoidPin = PROTEUS_LS_7; engineConfiguration->idle.solenoidPin = Gpio::PROTEUS_LS_7;
engineConfiguration->fanPin = Gpio::B7; engineConfiguration->fanPin = Gpio::B7;

View File

@ -113,7 +113,7 @@ void setProteusAnalogPwmTest() {
engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned; engineConfiguration->triggerSimulatorPins[1] = Gpio::Unassigned;
// The idle control pin is connected to the default TPS input, analog volt 2 // The idle control pin is connected to the default TPS input, analog volt 2
engineConfiguration->idle.solenoidPin = PROTEUS_IGN_10; engineConfiguration->idle.solenoidPin = Gpio::PROTEUS_IGN_10;
// 5893hz is coprime with the analog sample rate, 500hz, so hopefully we get less aliasing // 5893hz is coprime with the analog sample rate, 500hz, so hopefully we get less aliasing
engineConfiguration->idle.solenoidFrequency = 5893; engineConfiguration->idle.solenoidFrequency = 5893;

View File

@ -164,16 +164,16 @@ void setProteusVwPassatB6() {
engineConfiguration->highPressureFuel.hwChannel = PROTEUS_IN_ANALOG_VOLT_4; engineConfiguration->highPressureFuel.hwChannel = PROTEUS_IN_ANALOG_VOLT_4;
gppwm_channel *coolantControl = &engineConfiguration->gppwm[0]; gppwm_channel *coolantControl = &engineConfiguration->gppwm[0];
coolantControl->pin = PROTEUS_LS_5; coolantControl->pin = Gpio::PROTEUS_LS_5;
engineConfiguration->mainRelayPin = PROTEUS_LS_6; engineConfiguration->mainRelayPin = Gpio::PROTEUS_LS_6;
gppwm_channel *lowPressureFuelPumpControl = &engineConfiguration->gppwm[1]; gppwm_channel *lowPressureFuelPumpControl = &engineConfiguration->gppwm[1];
lowPressureFuelPumpControl->pin = PROTEUS_LS_7; lowPressureFuelPumpControl->pin = Gpio::PROTEUS_LS_7;
//engineConfiguration->boostControlPin = PROTEUS_LS_8; //engineConfiguration->boostControlPin = Gpio::PROTEUS_LS_8;
engineConfiguration->vvtPins[0] = PROTEUS_LS_9; engineConfiguration->vvtPins[0] = Gpio::PROTEUS_LS_9;
engineConfiguration->hpfpValvePin = PROTEUS_LS_15; engineConfiguration->hpfpValvePin = Gpio::PROTEUS_LS_15;
setProteusEtbIO(); setProteusEtbIO();

View File

@ -151,8 +151,11 @@ public class PinoutLogic {
} }
if (meta != null) { if (meta != null) {
pinId = map.get(meta); pinId = map.get(meta);
if (pinId == null) if (pinId == null) {
if (map.isEmpty())
throw new IllegalStateException("Empty meta mapping");
throw new IllegalStateException("Failing to resolve [" + meta + "]"); throw new IllegalStateException("Failing to resolve [" + meta + "]");
}
} }
Object pinClass = pin.get("class"); Object pinClass = pin.get("class");
Object pinName = pin.get("pin"); Object pinName = pin.get("pin");