mirror of https://github.com/rusefi/rusefi.git
export board-specific macro for stm32 pins based on board yaml #3298
This commit is contained in:
parent
5a66cc6c8f
commit
05f68d68f2
|
@ -20,8 +20,8 @@ static OutputPin alpha2stepPullDown;
|
||||||
static OutputPin alphaCamPullDown;
|
static OutputPin alphaCamPullDown;
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ static void setInjectorPins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_2;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,12 +127,12 @@ void setBoardDefaultConfiguration() {
|
||||||
int16_t hellenBoardId = engine->engineState.hellenBoardId;
|
int16_t hellenBoardId = engine->engineState.hellenBoardId;
|
||||||
if (isMegaModuleRevision()) {
|
if (isMegaModuleRevision()) {
|
||||||
setHellenMMbaro();
|
setHellenMMbaro();
|
||||||
engineConfiguration->map.sensor.hwChannel = H144_IN_MAP3; // On-board MAP
|
engineConfiguration->map.sensor.hwChannel = Gpio::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 = H144_IN_MAP3; // On-board MAP
|
engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3; // On-board MAP
|
||||||
}
|
}
|
||||||
|
|
||||||
engineConfiguration->boardUseTempPullUp = true;
|
engineConfiguration->boardUseTempPullUp = true;
|
||||||
|
@ -141,7 +141,7 @@ void setBoardDefaultConfiguration() {
|
||||||
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 = Gpio::H144_OUT_PWM3;
|
||||||
|
|
||||||
// "required" hardware is done - set some reasonable defaults
|
// "required" hardware is done - set some reasonable defaults
|
||||||
setupDefaultSensorInputs();
|
setupDefaultSensorInputs();
|
||||||
|
@ -161,8 +161,8 @@ void boardPrepareForStop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Gpio OUTPUTS[] = {
|
static Gpio OUTPUTS[] = {
|
||||||
H144_LS_1,
|
Gpio::H144_LS_1,
|
||||||
H144_LS_2,
|
Gpio::H144_LS_2,
|
||||||
};
|
};
|
||||||
|
|
||||||
int getBoardMetaOutputsCount() {
|
int getBoardMetaOutputsCount() {
|
||||||
|
|
|
@ -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
|
||||||
|
@ -37,8 +37,7 @@ pins:
|
||||||
color: brown
|
color: brown
|
||||||
|
|
||||||
- pin: A6
|
- pin: A6
|
||||||
# H144_IGN_1
|
meta: H144_IGN_1
|
||||||
id: C13
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Smart Ignition A Output
|
function: Smart Ignition A Output
|
||||||
type: ign
|
type: ign
|
||||||
|
@ -46,8 +45,7 @@ pins:
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
||||||
- pin: A7
|
- pin: A7
|
||||||
# H144_IGN_2
|
meta: H144_IGN_2
|
||||||
id: E5
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Smart Ignition B Output
|
function: Smart Ignition B Output
|
||||||
type: ign
|
type: ign
|
||||||
|
@ -55,8 +53,7 @@ pins:
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
||||||
- pin: A8
|
- pin: A8
|
||||||
# H144_LS_1
|
meta: H144_LS_1
|
||||||
id: G7
|
|
||||||
function: Injector A Output
|
function: Injector A Output
|
||||||
class: outputs
|
class: outputs
|
||||||
type: inj
|
type: inj
|
||||||
|
@ -122,8 +119,7 @@ pins:
|
||||||
color: orange
|
color: orange
|
||||||
|
|
||||||
- pin: B8
|
- pin: B8
|
||||||
# H144_LS_2
|
meta: H144_LS_2
|
||||||
id: G8
|
|
||||||
function: Injector B Output
|
function: Injector B Output
|
||||||
class: outputs
|
class: outputs
|
||||||
type: inj
|
type: inj
|
||||||
|
|
|
@ -25,10 +25,10 @@ static OutputPin alphaD4PullDown;
|
||||||
static OutputPin alphaD5PullDown;
|
static OutputPin alphaD5PullDown;
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
|
|
||||||
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
||||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||||
|
@ -57,10 +57,10 @@ static void setupEtb() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_3;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||||
engineConfiguration->ignitionPins[3] = H144_IGN_4;
|
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupVbatt() {
|
static void setupVbatt() {
|
||||||
|
@ -116,12 +116,12 @@ void boardInitHardware() {
|
||||||
alphaCamPullDown.initPin("a-cam", H144_OUT_IO8);
|
alphaCamPullDown.initPin("a-cam", H144_OUT_IO8);
|
||||||
alphaD3PullDown.initPin("a-d3", H144_LS_6);
|
alphaD3PullDown.initPin("a-d3", H144_LS_6);
|
||||||
} else {
|
} else {
|
||||||
alphaD2PullDown.initPin("a-d2", 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", H144_OUT_IO8);
|
||||||
}
|
}
|
||||||
|
|
||||||
alphaD4PullDown.initPin("a-d4", H144_LS_7);
|
alphaD4PullDown.initPin("a-d4", Gpio::H144_LS_7);
|
||||||
alphaD5PullDown.initPin("a-d5", H144_LS_8);
|
alphaD5PullDown.initPin("a-d5", H144_LS_8);
|
||||||
boardOnConfigurationChange(nullptr);
|
boardOnConfigurationChange(nullptr);
|
||||||
}
|
}
|
||||||
|
@ -173,30 +173,30 @@ void setBoardDefaultConfiguration() {
|
||||||
setIgnitionPins();
|
setIgnitionPins();
|
||||||
setupEtb();
|
setupEtb();
|
||||||
if (is_F_OrOlder()) {
|
if (is_F_OrOlder()) {
|
||||||
engineConfiguration->tachOutputPin = H144_OUT_IO13;
|
engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;;
|
||||||
engineConfiguration->vvtPins[0] = H144_OUT_PWM7;
|
engineConfiguration->vvtPins[0] = H144_OUT_PWM7;
|
||||||
engineConfiguration->vvtPins[1] = H144_OUT_PWM8;
|
engineConfiguration->vvtPins[1] = H144_OUT_PWM8;
|
||||||
} else {
|
} else {
|
||||||
engineConfiguration->vvtPins[0] = H144_IGN_7;
|
engineConfiguration->vvtPins[0] = Gpio::H144_IGN_7;
|
||||||
engineConfiguration->vvtPins[1] = H144_IGN_8;
|
engineConfiguration->vvtPins[1] = Gpio::H144_IGN_8;
|
||||||
engineConfiguration->tachOutputPin = H144_GP3;
|
engineConfiguration->tachOutputPin = Gpio::H144_GP3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 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 = H144_IN_MAP3; // On-board MAP
|
engineConfiguration->map.sensor.hwChannel = Gpio::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 = H144_IN_MAP3; // On-board MAP
|
// engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3; // On-board MAP
|
||||||
|
|
||||||
engineConfiguration->boardUseTempPullUp = true;
|
engineConfiguration->boardUseTempPullUp = true;
|
||||||
|
|
||||||
engineConfiguration->acSwitch = Gpio::Unassigned;
|
engineConfiguration->acSwitch = Gpio::Unassigned;
|
||||||
engineConfiguration->fuelPumpPin = H144_OUT_IO12;
|
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO12;
|
||||||
engineConfiguration->fanPin = H144_OUT_IO11;
|
engineConfiguration->fanPin = Gpio::H144_OUT_IO11;
|
||||||
engineConfiguration->mainRelayPin = H144_OUT_IO10;
|
engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO10;
|
||||||
engineConfiguration->boostControlPin = H144_OUT_PWM3;
|
engineConfiguration->boostControlPin = Gpio::H144_OUT_PWM3;
|
||||||
|
|
||||||
// "required" hardware is done - set some reasonable defaults
|
// "required" hardware is done - set some reasonable defaults
|
||||||
setupDefaultSensorInputs();
|
setupDefaultSensorInputs();
|
||||||
|
@ -220,10 +220,10 @@ void boardPrepareForStop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
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() {
|
||||||
|
|
|
@ -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
|
||||||
|
@ -21,16 +21,14 @@ pins:
|
||||||
color: purple
|
color: purple
|
||||||
|
|
||||||
- pin: A4old
|
- pin: A4old
|
||||||
# H144_OUT_IO13
|
meta: H144_OUT_IO13
|
||||||
id: G6
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Tachometer Output
|
function: Tachometer Output
|
||||||
ts_name: A4 - Tachometer legacy up to rev F
|
ts_name: A4 - Tachometer legacy up to rev F
|
||||||
color: purple
|
color: purple
|
||||||
|
|
||||||
- pin: A4
|
- pin: A4
|
||||||
# H144_GP3
|
meta: H144_GP3
|
||||||
id: G10
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Tachometer Output
|
function: Tachometer Output
|
||||||
ts_name: A4 - Tachometer
|
ts_name: A4 - Tachometer
|
||||||
|
@ -42,8 +40,7 @@ pins:
|
||||||
color: brown
|
color: brown
|
||||||
|
|
||||||
- pin: A6
|
- pin: A6
|
||||||
# H144_IGN_1
|
meta: H144_IGN_1
|
||||||
id: C13
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Smart Ignition 1
|
function: Smart Ignition 1
|
||||||
type: ign
|
type: ign
|
||||||
|
@ -51,8 +48,7 @@ pins:
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
||||||
- pin: A7
|
- pin: A7
|
||||||
# H144_IGN_2
|
meta: H144_IGN_2
|
||||||
id: E5
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Smart Ignition 2 Output
|
function: Smart Ignition 2 Output
|
||||||
type: ign
|
type: ign
|
||||||
|
@ -60,8 +56,7 @@ pins:
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
||||||
- pin: A8
|
- pin: A8
|
||||||
# H144_LS_1
|
meta: H144_LS_1
|
||||||
id: G7
|
|
||||||
function: Injector 1 Output
|
function: Injector 1 Output
|
||||||
class: outputs
|
class: outputs
|
||||||
type: inj
|
type: inj
|
||||||
|
@ -74,8 +69,7 @@ pins:
|
||||||
color: black
|
color: black
|
||||||
|
|
||||||
- pin: On-board MAP
|
- pin: On-board MAP
|
||||||
# H144_IN_MAP3
|
meta: H144_IN_MAP3
|
||||||
id: EFI_ADC_2
|
|
||||||
class: analog_inputs
|
class: analog_inputs
|
||||||
function: MAP Sensor Input
|
function: MAP Sensor Input
|
||||||
ts_name: On-board MAP
|
ts_name: On-board MAP
|
||||||
|
@ -127,8 +121,7 @@ pins:
|
||||||
color: orange
|
color: orange
|
||||||
|
|
||||||
- pin: B8
|
- pin: B8
|
||||||
# H144_LS_2
|
meta: H144_LS_2
|
||||||
id: G8
|
|
||||||
function: Injector 2 Output
|
function: Injector 2 Output
|
||||||
class: outputs
|
class: outputs
|
||||||
type: inj
|
type: inj
|
||||||
|
@ -136,8 +129,7 @@ pins:
|
||||||
color: blue
|
color: blue
|
||||||
|
|
||||||
- pin: C1
|
- pin: C1
|
||||||
# H144_OUT_IO11
|
meta: H144_OUT_IO11
|
||||||
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
|
||||||
|
@ -200,8 +192,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
|
||||||
|
@ -209,8 +200,7 @@ pins:
|
||||||
color: purple
|
color: purple
|
||||||
|
|
||||||
- pin: D1
|
- pin: D1
|
||||||
# H144_LS_3
|
meta: H144_LS_3
|
||||||
id: D11
|
|
||||||
function: Injector 3
|
function: Injector 3
|
||||||
class: outputs
|
class: outputs
|
||||||
type: inj
|
type: inj
|
||||||
|
@ -218,8 +208,7 @@ pins:
|
||||||
color: blue
|
color: blue
|
||||||
|
|
||||||
- pin: D2
|
- pin: D2
|
||||||
# H144_OUT_PWM3
|
meta: H144_OUT_PWM3
|
||||||
id: C7
|
|
||||||
function: Out Boost
|
function: Out Boost
|
||||||
class: outputs
|
class: outputs
|
||||||
ts_name: D2 - Out Boost
|
ts_name: D2 - Out Boost
|
||||||
|
@ -259,8 +248,7 @@ pins:
|
||||||
color: orange
|
color: orange
|
||||||
|
|
||||||
- pin: D6
|
- pin: D6
|
||||||
# H144_IGN_3
|
meta: H144_IGN_3
|
||||||
id: E4
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Smart Ignition 3 Output
|
function: Smart Ignition 3 Output
|
||||||
type: ign
|
type: ign
|
||||||
|
@ -268,8 +256,7 @@ pins:
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
||||||
- pin: D7
|
- pin: D7
|
||||||
# H144_IGN_4
|
meta: H144_IGN_4
|
||||||
id: E3
|
|
||||||
class: outputs
|
class: outputs
|
||||||
function: Smart Ignition 4 Output
|
function: Smart Ignition 4 Output
|
||||||
type: ign
|
type: ign
|
||||||
|
@ -282,8 +269,7 @@ pins:
|
||||||
color: black
|
color: black
|
||||||
|
|
||||||
- pin: E1
|
- pin: E1
|
||||||
# H144_LS_4
|
meta: H144_LS_4
|
||||||
id: D10
|
|
||||||
function: Injector 4
|
function: Injector 4
|
||||||
class: outputs
|
class: outputs
|
||||||
type: inj
|
type: inj
|
||||||
|
@ -291,8 +277,7 @@ pins:
|
||||||
color: blue
|
color: blue
|
||||||
|
|
||||||
- pin: E2
|
- pin: E2
|
||||||
# H144_OUT_IO6
|
meta: H144_OUT_IO6
|
||||||
id: G11
|
|
||||||
function: Out NOS
|
function: Out NOS
|
||||||
class: outputs
|
class: outputs
|
||||||
ts_name: E2 - Out NOS
|
ts_name: E2 - Out NOS
|
||||||
|
@ -370,8 +355,7 @@ pins:
|
||||||
color: purple
|
color: purple
|
||||||
|
|
||||||
- pin: F2g
|
- pin: F2g
|
||||||
# H144_IGN_7
|
meta: H144_IGN_7
|
||||||
id: B9
|
|
||||||
function: VVT#1 rev G
|
function: VVT#1 rev G
|
||||||
class: outputs
|
class: outputs
|
||||||
type: ls
|
type: ls
|
||||||
|
@ -398,8 +382,7 @@ pins:
|
||||||
color: purple
|
color: purple
|
||||||
|
|
||||||
- pin: F4g
|
- pin: F4g
|
||||||
# H144_IGN_8
|
meta: H144_IGN_8
|
||||||
id: E6
|
|
||||||
function: VVT#2 rev G
|
function: VVT#2 rev G
|
||||||
class: outputs
|
class: outputs
|
||||||
type: ls
|
type: ls
|
||||||
|
|
|
@ -24,10 +24,10 @@ static OutputPin alphaD4PullDown;
|
||||||
//static OutputPin alphaD5PullDown;
|
//static OutputPin alphaD5PullDown;
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
|
|
||||||
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
||||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||||
|
@ -54,7 +54,7 @@ static void setupEtb() {
|
||||||
// PWM pin
|
// PWM pin
|
||||||
engineConfiguration->etbIo[1].controlPin = H144_GP4;
|
engineConfiguration->etbIo[1].controlPin = H144_GP4;
|
||||||
// DIR pin
|
// DIR pin
|
||||||
engineConfiguration->etbIo[1].directionPin1 = H144_GP3;
|
engineConfiguration->etbIo[1].directionPin1 = Gpio::H144_GP3;
|
||||||
// Disable pin
|
// Disable pin
|
||||||
engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
|
engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
|
||||||
// Unused
|
// Unused
|
||||||
|
@ -64,10 +64,10 @@ static void setupEtb() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_3;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||||
engineConfiguration->ignitionPins[3] = H144_IGN_4;
|
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupVbatt() {
|
static void setupVbatt() {
|
||||||
|
@ -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 = H144_IN_MAP3;
|
// engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3;
|
||||||
|
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
|
engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
|
||||||
|
|
||||||
|
@ -167,10 +167,10 @@ void setBoardDefaultConfiguration() {
|
||||||
|
|
||||||
engineConfiguration->boardUseTempPullUp = true;
|
engineConfiguration->boardUseTempPullUp = true;
|
||||||
|
|
||||||
engineConfiguration->mainRelayPin = H144_OUT_IO10;
|
engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO10;
|
||||||
engineConfiguration->fanPin = H144_OUT_IO11;
|
engineConfiguration->fanPin = Gpio::H144_OUT_IO11;
|
||||||
engineConfiguration->fuelPumpPin = H144_OUT_IO12;
|
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO12;
|
||||||
engineConfiguration->tachOutputPin = H144_OUT_IO13;
|
engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;;
|
||||||
|
|
||||||
// "required" hardware is done - set some reasonable defaults
|
// "required" hardware is done - set some reasonable defaults
|
||||||
setupDefaultSensorInputs();
|
setupDefaultSensorInputs();
|
||||||
|
@ -195,10 +195,10 @@ void boardPrepareForStop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
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() {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
meta: config/boards/hellen_meta.h
|
||||||
|
|
||||||
pins:
|
pins:
|
||||||
- pin: On-board MAP
|
- pin: On-board MAP
|
||||||
# H144_IN_MAP2
|
# H144_IN_MAP2
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
meta: config/boards/hellen_meta.h
|
||||||
|
|
||||||
pins:
|
pins:
|
||||||
- pin: 1C
|
- pin: 1C
|
||||||
# H144_LS_8
|
# H144_LS_8
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
pins:
|
meta: config/boards/hellen_meta.h
|
||||||
|
|
||||||
|
pins:
|
||||||
- pin: 1D
|
- pin: 1D
|
||||||
function: DC3 positive
|
function: DC3 positive
|
||||||
type: etb
|
type: etb
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
#include "defaults.h"
|
#include "defaults.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
engineConfiguration->injectionPins[2] = Gpio::Unassigned;
|
||||||
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
engineConfiguration->injectionPins[3] = Gpio::Unassigned;
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ static void setInjectorPins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[2] = Gpio::Unassigned;
|
||||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ static void setupEtb() {
|
||||||
// PWM pin
|
// PWM pin
|
||||||
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2;
|
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2;
|
||||||
// DIR pin
|
// DIR pin
|
||||||
engineConfiguration->etbIo[0].directionPin1 = 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 = H144_OUT_IO1;
|
||||||
// Unused
|
// Unused
|
||||||
|
@ -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 = H144_IN_MAP3;
|
engineConfiguration->baroSensor.hwChannel = Gpio::H144_IN_MAP3;
|
||||||
|
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
|
engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void setBoardDefaultConfiguration() {
|
||||||
// engineConfiguration->fuelPumpPin = Gpio::Unassigned;//H144_OUT_PWM2;
|
// engineConfiguration->fuelPumpPin = Gpio::Unassigned;//H144_OUT_PWM2;
|
||||||
// engineConfiguration->fanPin = Gpio::Unassigned;//H144_OUT_PWM4;
|
// engineConfiguration->fanPin = Gpio::Unassigned;//H144_OUT_PWM4;
|
||||||
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
engineConfiguration->mainRelayPin = Gpio::Unassigned;
|
||||||
engineConfiguration->tachOutputPin = H144_OUT_PWM3;
|
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM3;
|
||||||
|
|
||||||
// "required" hardware is done - set some reasonable defaults
|
// "required" hardware is done - set some reasonable defaults
|
||||||
setupDefaultSensorInputs();
|
setupDefaultSensorInputs();
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
#include "defaults.h"
|
#include "defaults.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
engineConfiguration->injectionPins[4] = H144_LS_5;
|
engineConfiguration->injectionPins[4] = Gpio::H144_LS_5;
|
||||||
engineConfiguration->injectionPins[5] = H144_LS_6;
|
engineConfiguration->injectionPins[5] = Gpio::H144_LS_6;
|
||||||
engineConfiguration->injectionPins[6] = H144_LS_7;
|
engineConfiguration->injectionPins[6] = Gpio::H144_LS_7;
|
||||||
engineConfiguration->injectionPins[7] = H144_LS_8;
|
engineConfiguration->injectionPins[7] = H144_LS_8;
|
||||||
|
|
||||||
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
||||||
|
@ -30,14 +30,14 @@ static void setInjectorPins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_3;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||||
engineConfiguration->ignitionPins[3] = H144_IGN_4;
|
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||||
engineConfiguration->ignitionPins[4] = H144_IGN_5;
|
engineConfiguration->ignitionPins[4] = Gpio::H144_IGN_5;;
|
||||||
engineConfiguration->ignitionPins[5] = H144_IGN_6;
|
engineConfiguration->ignitionPins[5] = Gpio::H144_IGN_6;
|
||||||
engineConfiguration->ignitionPins[6] = H144_IGN_7;
|
engineConfiguration->ignitionPins[6] = Gpio::H144_IGN_7;
|
||||||
engineConfiguration->ignitionPins[7] = H144_IGN_8;
|
engineConfiguration->ignitionPins[7] = Gpio::H144_IGN_8;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupVbatt() {
|
static void setupVbatt() {
|
||||||
|
@ -94,7 +94,7 @@ void setBoardConfigOverrides() {
|
||||||
// PWM pin
|
// PWM pin
|
||||||
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM8;
|
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM8;
|
||||||
// DIR pin
|
// DIR pin
|
||||||
engineConfiguration->etbIo[0].directionPin1 = 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 = H144_OUT_IO4;
|
||||||
// Unused
|
// Unused
|
||||||
|
@ -118,17 +118,17 @@ void setBoardDefaultConfiguration() {
|
||||||
|
|
||||||
engineConfiguration->invertPrimaryTriggerSignal = true;
|
engineConfiguration->invertPrimaryTriggerSignal = true;
|
||||||
|
|
||||||
engineConfiguration->luaOutputPins[0] = H144_OUT_IO6; // starter relay
|
engineConfiguration->luaOutputPins[0] = Gpio::H144_OUT_IO6; // starter relay
|
||||||
|
|
||||||
engineConfiguration->boostControlPin = H144_OUT_PWM5;
|
engineConfiguration->boostControlPin = 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 = H144_OUT_IO5;
|
||||||
engineConfiguration->fanPin = H144_OUT_IO12;
|
engineConfiguration->fanPin = Gpio::H144_OUT_IO12;
|
||||||
engineConfiguration->mainRelayPin = H144_OUT_IO3;
|
engineConfiguration->mainRelayPin = H144_OUT_IO3;
|
||||||
engineConfiguration->tachOutputPin = H144_OUT_PWM7;
|
engineConfiguration->tachOutputPin = H144_OUT_PWM7;
|
||||||
engineConfiguration->alternatorControlPin = H144_OUT_PWM1;
|
engineConfiguration->alternatorControlPin = Gpio::H144_OUT_PWM1;
|
||||||
// engineConfiguration->fan2Pin =
|
// engineConfiguration->fan2Pin =
|
||||||
|
|
||||||
// "required" hardware is done - set some reasonable defaults
|
// "required" hardware is done - set some reasonable defaults
|
||||||
|
|
|
@ -12,17 +12,17 @@
|
||||||
#include "honda_k_dbc.h"
|
#include "honda_k_dbc.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_3;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||||
engineConfiguration->ignitionPins[3] = H144_IGN_4;
|
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupVbatt() {
|
static void setupVbatt() {
|
||||||
|
@ -82,9 +82,9 @@ void setBoardConfigOverrides() {
|
||||||
// // PWM pin
|
// // PWM pin
|
||||||
// engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2;
|
// engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2;
|
||||||
// // DIR pin
|
// // DIR pin
|
||||||
// engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM3;
|
// engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3;
|
||||||
// // Disable pin
|
// // Disable pin
|
||||||
// engineConfiguration->etbIo[0].disablePin = H144_OUT_IO12;
|
// engineConfiguration->etbIo[0].disablePin = Gpio::H144_OUT_IO12;
|
||||||
// // Unused
|
// // Unused
|
||||||
// engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
// engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||||
|
|
||||||
|
@ -117,11 +117,11 @@ void setBoardDefaultConfiguration() {
|
||||||
engineConfiguration->vvtPins[0] = H144_OUT_PWM4;
|
engineConfiguration->vvtPins[0] = H144_OUT_PWM4;
|
||||||
|
|
||||||
gppwm_channel *vtsControl = &engineConfiguration->gppwm[0];
|
gppwm_channel *vtsControl = &engineConfiguration->gppwm[0];
|
||||||
// vtsControl->pin = H144_OUT_IO6;
|
// vtsControl->pin = Gpio::H144_OUT_IO6;
|
||||||
|
|
||||||
engineConfiguration->fuelPumpPin = H144_OUT_IO13;
|
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO13;;
|
||||||
engineConfiguration->idle.solenoidPin = H144_LS_6;
|
engineConfiguration->idle.solenoidPin = Gpio::H144_LS_6;
|
||||||
engineConfiguration->fanPin = H144_OUT_IO12;
|
engineConfiguration->fanPin = Gpio::H144_OUT_IO12;
|
||||||
engineConfiguration->mainRelayPin = H144_OUT_IO3;
|
engineConfiguration->mainRelayPin = H144_OUT_IO3;
|
||||||
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO7;
|
engineConfiguration->malfunctionIndicatorPin = H144_OUT_IO7;
|
||||||
|
|
||||||
|
@ -138,8 +138,8 @@ void setBoardDefaultConfiguration() {
|
||||||
engineConfiguration->verboseKLine = true;
|
engineConfiguration->verboseKLine = true;
|
||||||
|
|
||||||
engineConfiguration->brakePedalPin = H144_IN_CAM;
|
engineConfiguration->brakePedalPin = H144_IN_CAM;
|
||||||
engineConfiguration->acRelayPin = H144_LS_5;
|
engineConfiguration->acRelayPin = Gpio::H144_LS_5;
|
||||||
engineConfiguration->tachOutputPin = H144_OUT_IO10;
|
engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO10;
|
||||||
// A/C switch on k-line
|
// A/C switch on k-line
|
||||||
|
|
||||||
// "required" hardware is done - set some reasonable defaults
|
// "required" hardware is done - set some reasonable defaults
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
|
|
||||||
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
||||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||||
|
@ -26,9 +26,9 @@ static void setInjectorPins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_2;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,14 +89,14 @@ void setBoardDefaultConfiguration() {
|
||||||
|
|
||||||
engineConfiguration->enableSoftwareKnock = true;
|
engineConfiguration->enableSoftwareKnock = true;
|
||||||
|
|
||||||
engineConfiguration->boostControlPin = H144_LS_6;
|
engineConfiguration->boostControlPin = Gpio::H144_LS_6;
|
||||||
engineConfiguration->acSwitch = H144_IN_D_AUX3;
|
engineConfiguration->acSwitch = H144_IN_D_AUX3;
|
||||||
engineConfiguration->acRelayPin = H144_OUT_IO6;
|
engineConfiguration->acRelayPin = Gpio::H144_OUT_IO6;
|
||||||
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
||||||
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->mainRelayPin = Gpio::I2; // OUT_LOW3
|
engineConfiguration->mainRelayPin = Gpio::I2; // OUT_LOW3
|
||||||
engineConfiguration->tachOutputPin = H144_OUT_PWM1;
|
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM1;
|
||||||
engineConfiguration->alternatorControlPin = H144_OUT_PWM7;
|
engineConfiguration->alternatorControlPin = H144_OUT_PWM7;
|
||||||
engineConfiguration->fan2Pin = H144_OUT_IO2;
|
engineConfiguration->fan2Pin = H144_OUT_IO2;
|
||||||
|
|
||||||
|
|
|
@ -16,21 +16,21 @@
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
engineConfiguration->injectionPins[4] = H144_LS_5;
|
engineConfiguration->injectionPins[4] = Gpio::H144_LS_5;
|
||||||
engineConfiguration->injectionPins[5] = H144_LS_6;
|
engineConfiguration->injectionPins[5] = Gpio::H144_LS_6;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_3;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||||
engineConfiguration->ignitionPins[3] = H144_IGN_4;
|
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||||
engineConfiguration->ignitionPins[4] = H144_IGN_5;
|
engineConfiguration->ignitionPins[4] = Gpio::H144_IGN_5;;
|
||||||
engineConfiguration->ignitionPins[5] = H144_IGN_6;
|
engineConfiguration->ignitionPins[5] = Gpio::H144_IGN_6;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupVbatt() {
|
static void setupVbatt() {
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_3;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||||
engineConfiguration->ignitionPins[3] = H144_IGN_4;
|
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupVbatt() {
|
static void setupVbatt() {
|
||||||
|
@ -84,9 +84,9 @@ void setBoardConfigOverrides() {
|
||||||
engineConfiguration->camInputs[0] = H144_IN_CAM;
|
engineConfiguration->camInputs[0] = H144_IN_CAM;
|
||||||
|
|
||||||
// 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 = H144_OUT_PWM3;
|
engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3;
|
||||||
engineConfiguration->etbIo[0].directionPin2 = H144_OUT_PWM2;
|
engineConfiguration->etbIo[0].directionPin2 = H144_OUT_PWM2;
|
||||||
engineConfiguration->etbIo[0].controlPin = 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;
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ void setBoardConfigOverrides() {
|
||||||
isFirstInvocation = false;
|
isFirstInvocation = false;
|
||||||
efiSetPadMode("ETB FIX0", H144_OUT_PWM4, PAL_MODE_INPUT_ANALOG);
|
efiSetPadMode("ETB FIX0", H144_OUT_PWM4, PAL_MODE_INPUT_ANALOG);
|
||||||
efiSetPadMode("ETB FIX1", H144_OUT_PWM5, PAL_MODE_INPUT_ANALOG);
|
efiSetPadMode("ETB FIX1", H144_OUT_PWM5, PAL_MODE_INPUT_ANALOG);
|
||||||
efiSetPadMode("ETB FIX2", 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) {
|
||||||
|
@ -116,9 +116,9 @@ void setBoardConfigOverrides() {
|
||||||
// PWM pin
|
// PWM pin
|
||||||
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2;
|
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2;
|
||||||
// DIR pin
|
// DIR pin
|
||||||
engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM3;
|
engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3;
|
||||||
// Disable pin
|
// Disable pin
|
||||||
engineConfiguration->etbIo[0].disablePin = H144_OUT_IO12;
|
engineConfiguration->etbIo[0].disablePin = Gpio::H144_OUT_IO12;
|
||||||
// Unused
|
// Unused
|
||||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ void setBoardConfigOverrides() {
|
||||||
// DIR pin
|
// DIR pin
|
||||||
engineConfiguration->etbIo[1].directionPin1 = H144_OUT_PWM5;
|
engineConfiguration->etbIo[1].directionPin1 = H144_OUT_PWM5;
|
||||||
// Disable pin
|
// Disable pin
|
||||||
engineConfiguration->etbIo[1].disablePin = H144_OUT_IO13;
|
engineConfiguration->etbIo[1].disablePin = Gpio::H144_OUT_IO13;;
|
||||||
// Unused
|
// Unused
|
||||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ void setBoardConfigOverrides() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NB2 still uses L6205PD
|
// NB2 still uses L6205PD
|
||||||
engineConfiguration->etbIo[0].directionPin1 = 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 = H144_OUT_PWM4; // ETB-
|
||||||
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; // ETB_EN
|
engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; // ETB_EN
|
||||||
engineConfiguration->etb_use_two_wires = true;
|
engineConfiguration->etb_use_two_wires = true;
|
||||||
|
|
|
@ -13,21 +13,21 @@
|
||||||
#include "defaults.h"
|
#include "defaults.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
engineConfiguration->injectionPins[4] = H144_LS_5;
|
engineConfiguration->injectionPins[4] = Gpio::H144_LS_5;
|
||||||
engineConfiguration->injectionPins[5] = H144_LS_6;
|
engineConfiguration->injectionPins[5] = Gpio::H144_LS_6;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = H144_IGN_2;
|
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_3;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||||
engineConfiguration->ignitionPins[3] = H144_IGN_4;
|
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||||
engineConfiguration->ignitionPins[4] = H144_IGN_5;
|
engineConfiguration->ignitionPins[4] = Gpio::H144_IGN_5;;
|
||||||
engineConfiguration->ignitionPins[5] = H144_IGN_6;
|
engineConfiguration->ignitionPins[5] = Gpio::H144_IGN_6;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupVbatt() {
|
static void setupVbatt() {
|
||||||
|
@ -72,8 +72,8 @@ void setBoardConfigOverrides() {
|
||||||
|
|
||||||
// hellen88bmw uses L6205PD
|
// hellen88bmw uses L6205PD
|
||||||
engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM2; // ETB+
|
engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM2; // ETB+
|
||||||
engineConfiguration->etbIo[0].directionPin2 = H144_OUT_PWM3; // ETB-
|
engineConfiguration->etbIo[0].directionPin2 = Gpio::H144_OUT_PWM3; // ETB-
|
||||||
engineConfiguration->etbIo[0].controlPin = 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;
|
||||||
|
|
||||||
setHellenSdCardSpi3();
|
setHellenSdCardSpi3();
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
#include "hellen_meta.h"
|
#include "hellen_meta.h"
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_1;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||||
engineConfiguration->injectionPins[1] = H144_LS_2;
|
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||||
engineConfiguration->injectionPins[2] = H144_LS_3;
|
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||||
engineConfiguration->injectionPins[3] = H144_LS_4;
|
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||||
|
|
||||||
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
engineConfiguration->clutchDownPin = Gpio::C4; // Clutch switch input
|
||||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||||
|
@ -26,9 +26,9 @@ static void setInjectorPins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setIgnitionPins() {
|
static void setIgnitionPins() {
|
||||||
engineConfiguration->ignitionPins[0] = H144_IGN_1;
|
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||||
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[1] = Gpio::Unassigned;
|
||||||
engineConfiguration->ignitionPins[2] = H144_IGN_2;
|
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_2;
|
||||||
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
engineConfiguration->ignitionPins[3] = Gpio::Unassigned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 = H144_IN_MAP3;
|
engineConfiguration->map.sensor.hwChannel = Gpio::H144_IN_MAP3;
|
||||||
|
|
||||||
engineConfiguration->afr.hwChannel = EFI_ADC_1;
|
engineConfiguration->afr.hwChannel = EFI_ADC_1;
|
||||||
|
|
||||||
|
@ -94,13 +94,13 @@ void setBoardDefaultConfiguration() {
|
||||||
|
|
||||||
engineConfiguration->enableSoftwareKnock = true;
|
engineConfiguration->enableSoftwareKnock = true;
|
||||||
|
|
||||||
engineConfiguration->boostControlPin = H144_LS_6;
|
engineConfiguration->boostControlPin = Gpio::H144_LS_6;
|
||||||
engineConfiguration->acSwitch = H144_IN_D_AUX3;
|
engineConfiguration->acSwitch = H144_IN_D_AUX3;
|
||||||
engineConfiguration->acRelayPin = H144_OUT_IO6;
|
engineConfiguration->acRelayPin = Gpio::H144_OUT_IO6;
|
||||||
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
engineConfiguration->fuelPumpPin = Gpio::G2; // OUT_IO9
|
||||||
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 = H144_OUT_PWM1;
|
engineConfiguration->tachOutputPin = Gpio::H144_OUT_PWM1;
|
||||||
engineConfiguration->fan2Pin = H144_OUT_IO2;
|
engineConfiguration->fan2Pin = H144_OUT_IO2;
|
||||||
|
|
||||||
// "required" hardware is done - set some reasonable defaults
|
// "required" hardware is done - set some reasonable defaults
|
||||||
|
|
|
@ -70,23 +70,23 @@ void detectHellenBoardType();
|
||||||
|
|
||||||
#define H176_LED1_RED Gpio::H8
|
#define H176_LED1_RED Gpio::H8
|
||||||
|
|
||||||
#define H144_LS_1 Gpio::G7
|
#define H144_LS_1 G7
|
||||||
#define H144_LS_2 Gpio::G8
|
#define H144_LS_2 G8
|
||||||
#define H144_LS_3 Gpio::D11
|
#define H144_LS_3 D11
|
||||||
#define H144_LS_4 Gpio::D10
|
#define H144_LS_4 D10
|
||||||
#define H144_LS_5 Gpio::D9
|
#define H144_LS_5 D9
|
||||||
#define H144_LS_6 Gpio::F12
|
#define H144_LS_6 F12
|
||||||
#define H144_LS_7 Gpio::F13
|
#define H144_LS_7 F13
|
||||||
#define H144_LS_8 Gpio::F14
|
#define H144_LS_8 F14
|
||||||
|
|
||||||
#define H144_IGN_1 Gpio::C13
|
#define H144_IGN_1 C13
|
||||||
#define H144_IGN_2 Gpio::E5
|
#define H144_IGN_2 E5
|
||||||
#define H144_IGN_3 Gpio::E4
|
#define H144_IGN_3 E4
|
||||||
#define H144_IGN_4 Gpio::E3
|
#define H144_IGN_4 E3
|
||||||
#define H144_IGN_5 Gpio::E2
|
#define H144_IGN_5 E2
|
||||||
#define H144_IGN_6 Gpio::B8
|
#define H144_IGN_6 B8
|
||||||
#define H144_IGN_7 Gpio::B9
|
#define H144_IGN_7 B9
|
||||||
#define H144_IGN_8 Gpio::E6
|
#define H144_IGN_8 E6
|
||||||
|
|
||||||
#define H176_IGN_1 Gpio::I8
|
#define H176_IGN_1 Gpio::I8
|
||||||
#define H176_IGN_2 Gpio::E5
|
#define H176_IGN_2 Gpio::E5
|
||||||
|
@ -94,9 +94,9 @@ void detectHellenBoardType();
|
||||||
#define H176_IGN_4 Gpio::E3
|
#define H176_IGN_4 Gpio::E3
|
||||||
#define H176_IGN_5 Gpio::E2
|
#define H176_IGN_5 Gpio::E2
|
||||||
|
|
||||||
#define H144_OUT_PWM1 Gpio::D13
|
#define H144_OUT_PWM1 D13
|
||||||
#define H144_OUT_PWM2 Gpio::C6
|
#define H144_OUT_PWM2 Gpio::C6
|
||||||
#define H144_OUT_PWM3 Gpio::C7
|
#define H144_OUT_PWM3 C7
|
||||||
#define H144_OUT_PWM4 Gpio::C8
|
#define H144_OUT_PWM4 Gpio::C8
|
||||||
#define H144_OUT_PWM5 Gpio::C9
|
#define H144_OUT_PWM5 Gpio::C9
|
||||||
#define H144_OUT_PWM6 Gpio::D14
|
#define H144_OUT_PWM6 Gpio::D14
|
||||||
|
@ -108,7 +108,7 @@ void detectHellenBoardType();
|
||||||
#define H144_GP1 Gpio::D4
|
#define H144_GP1 Gpio::D4
|
||||||
// also IO2/IO5 on rev 0.6
|
// also IO2/IO5 on rev 0.6
|
||||||
#define H144_GP2 Gpio::D7
|
#define H144_GP2 Gpio::D7
|
||||||
#define H144_GP3 Gpio::G10
|
#define H144_GP3 G10
|
||||||
#define H144_GP4 Gpio::G9
|
#define H144_GP4 Gpio::G9
|
||||||
#define H144_GP5 Gpio::G15
|
#define H144_GP5 Gpio::G15
|
||||||
#define H144_GP6 Gpio::D8
|
#define H144_GP6 Gpio::D8
|
||||||
|
@ -121,14 +121,14 @@ void detectHellenBoardType();
|
||||||
#define H144_OUT_IO3 Gpio::G14
|
#define H144_OUT_IO3 Gpio::G14
|
||||||
#define H144_OUT_IO4 Gpio::G5
|
#define H144_OUT_IO4 Gpio::G5
|
||||||
#define H144_OUT_IO5 Gpio::D2
|
#define H144_OUT_IO5 Gpio::D2
|
||||||
#define H144_OUT_IO6 Gpio::G11
|
#define H144_OUT_IO6 G11
|
||||||
#define H144_OUT_IO7 Gpio::G3
|
#define H144_OUT_IO7 Gpio::G3
|
||||||
#define H144_OUT_IO8 Gpio::G4
|
#define H144_OUT_IO8 Gpio::G4
|
||||||
#define H144_OUT_IO9 Gpio::G13
|
#define H144_OUT_IO9 Gpio::G13
|
||||||
#define H144_OUT_IO10 Gpio::G12
|
#define H144_OUT_IO10 G12
|
||||||
#define H144_OUT_IO11 Gpio::G2
|
#define H144_OUT_IO11 G2
|
||||||
#define H144_OUT_IO12 Gpio::A8
|
#define H144_OUT_IO12 A8
|
||||||
#define H144_OUT_IO13 Gpio::G6
|
#define H144_OUT_IO13 G6
|
||||||
|
|
||||||
// A24
|
// A24
|
||||||
#define H144_IN_CRANK Gpio::B1
|
#define H144_IN_CRANK Gpio::B1
|
||||||
|
|
|
@ -21,7 +21,7 @@ void setStepperHw() {
|
||||||
setPPSInputs(EFI_ADC_NONE, EFI_ADC_NONE);
|
setPPSInputs(EFI_ADC_NONE, EFI_ADC_NONE);
|
||||||
// using 8chan pinout for DC1: A26 (OUT_DC1+ AH pin "D") and A27 (OUT_DC1- AL pin "C")
|
// using 8chan pinout for DC1: A26 (OUT_DC1+ AH pin "D") and A27 (OUT_DC1- AL pin "C")
|
||||||
engineConfiguration->stepperDcIo[0].controlPin = H144_GP4; // DC1_PWM
|
engineConfiguration->stepperDcIo[0].controlPin = H144_GP4; // DC1_PWM
|
||||||
engineConfiguration->stepperDcIo[0].directionPin1 = H144_GP3; // DC1_DIR
|
engineConfiguration->stepperDcIo[0].directionPin1 = Gpio::H144_GP3; // DC1_DIR
|
||||||
engineConfiguration->stepperDcIo[0].directionPin2 = Gpio::Unassigned;
|
engineConfiguration->stepperDcIo[0].directionPin2 = Gpio::Unassigned;
|
||||||
engineConfiguration->stepperDcIo[0].disablePin = H144_GP5; // ETB_DIS
|
engineConfiguration->stepperDcIo[0].disablePin = H144_GP5; // ETB_DIS
|
||||||
// using 8chan pinout for DC2: A28 (OUT_DC2+ BL pin "A") and A29 (OUT_DC2- BH pin "B")
|
// using 8chan pinout for DC2: A28 (OUT_DC2+ BL pin "A") and A29 (OUT_DC2- BH pin "B")
|
||||||
|
|
|
@ -17,7 +17,7 @@ static void common() {
|
||||||
void setHellenMercedes128_4_cyl() {
|
void setHellenMercedes128_4_cyl() {
|
||||||
common();
|
common();
|
||||||
#if HW_HELLEN
|
#if HW_HELLEN
|
||||||
engineConfiguration->injectionPins[0] = H144_LS_7;
|
engineConfiguration->injectionPins[0] = Gpio::H144_LS_7;
|
||||||
engineConfiguration->injectionPins[1] = H176_LS_6;
|
engineConfiguration->injectionPins[1] = H176_LS_6;
|
||||||
engineConfiguration->injectionPins[2] = H176_LS_8;
|
engineConfiguration->injectionPins[2] = H176_LS_8;
|
||||||
engineConfiguration->injectionPins[3] = H176_LS_5;
|
engineConfiguration->injectionPins[3] = H176_LS_5;
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class FileSystemBoardInputsImpl implements BoardInputs {
|
||||||
@Override
|
@Override
|
||||||
public List<String> getBoardMeta(String boardMetaFileName) {
|
public List<String> getBoardMeta(String boardMetaFileName) {
|
||||||
try {
|
try {
|
||||||
return Files.readAllLines(Paths.get(URI.create(boardMetaFileName)));
|
return Files.readAllLines(Paths.get(boardMetaFileName));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,15 @@ public class PinoutLogic {
|
||||||
Objects.requireNonNull(data, "data");
|
Objects.requireNonNull(data, "data");
|
||||||
for (Map<String, Object> pin : data) {
|
for (Map<String, Object> pin : data) {
|
||||||
Object pinId = pin.get("id");
|
Object pinId = pin.get("id");
|
||||||
|
String meta = (String) pin.get("meta");
|
||||||
|
if (meta != null && pinId != null) {
|
||||||
|
throw new IllegalStateException(pinId + " not expected with meta=" + meta);
|
||||||
|
}
|
||||||
|
if (meta != null) {
|
||||||
|
pinId = map.get(meta);
|
||||||
|
if (pinId == null)
|
||||||
|
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");
|
||||||
Object pinTsName = pin.get("ts_name");
|
Object pinTsName = pin.get("ts_name");
|
||||||
|
|
|
@ -16,7 +16,7 @@ import static org.junit.Assert.assertEquals;
|
||||||
public class PinoutLogicIntegratedTest {
|
public class PinoutLogicIntegratedTest {
|
||||||
|
|
||||||
private static final List<String> META_CONTENT = Arrays.asList("#define H144_LS_1 Gpio::G7\n",
|
private static final List<String> META_CONTENT = Arrays.asList("#define H144_LS_1 Gpio::G7\n",
|
||||||
"#define H144_LS_2 Gpio::G8\n",
|
"#define H144_LS_2 G8\n",
|
||||||
"// IN_O2S AIN13 A13 PA0\n",
|
"// IN_O2S AIN13 A13 PA0\n",
|
||||||
"#define H144_IN_O2S EFI_ADC_0\n",
|
"#define H144_IN_O2S EFI_ADC_0\n",
|
||||||
"// IN_O2S2 AIN12 PA1\n",
|
"// IN_O2S2 AIN12 PA1\n",
|
||||||
|
@ -32,8 +32,7 @@ public class PinoutLogicIntegratedTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWholeThing() throws IOException {
|
public void testWholeThing() throws IOException {
|
||||||
runPinoutTest("meta: meta.h\n" +
|
runPinoutTest("pins:\n" +
|
||||||
"pins:\n" +
|
|
||||||
" - pin: 1\n" +
|
" - pin: 1\n" +
|
||||||
" id: [E11, E11]\n" +
|
" id: [E11, E11]\n" +
|
||||||
" class: [event_inputs, switch_inputs]\n" +
|
" class: [event_inputs, switch_inputs]\n" +
|
||||||
|
@ -58,9 +57,10 @@ public class PinoutLogicIntegratedTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTemplate() throws IOException {
|
public void testTemplate() throws IOException {
|
||||||
runPinoutTest("pins:\n" +
|
runPinoutTest("meta: meta.h\n" +
|
||||||
|
"pins:\n" +
|
||||||
" - pin: 2\n" +
|
" - pin: 2\n" +
|
||||||
" id: G8\n" +
|
" meta: H144_LS_2\n" +
|
||||||
" class: outputs\n" +
|
" class: outputs\n" +
|
||||||
" function: Digital trigger/switch input for instance Hall type CAM\n" +
|
" function: Digital trigger/switch input for instance Hall type CAM\n" +
|
||||||
" ts_name: ___ - Digital 1\n" +
|
" ts_name: ___ - Digital 1\n" +
|
||||||
|
|
Loading…
Reference in New Issue