mirror of https://github.com/rusefi/rusefi.git
only:alphax-8chan
This commit is contained in:
parent
3af8d69ad9
commit
42db127156
|
@ -24,10 +24,10 @@ static OutputPin alphaD4PullDown;
|
|||
//static OutputPin alphaD5PullDown;
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = Gpio::H144_LS_1;
|
||||
engineConfiguration->injectionPins[1] = Gpio::H144_LS_2;
|
||||
engineConfiguration->injectionPins[2] = Gpio::H144_LS_3;
|
||||
engineConfiguration->injectionPins[3] = Gpio::H144_LS_4;
|
||||
engineConfiguration->injectionPins[0] = Gpio::MM176_INJ1;
|
||||
engineConfiguration->injectionPins[1] = Gpio::MM176_INJ2;
|
||||
engineConfiguration->injectionPins[2] = Gpio::MM176_INJ3;
|
||||
engineConfiguration->injectionPins[3] = Gpio::MM176_INJ4;
|
||||
|
||||
engineConfiguration->clutchDownPin = Gpio::Unassigned;
|
||||
engineConfiguration->clutchDownPinMode = PI_PULLDOWN;
|
||||
|
@ -42,32 +42,32 @@ static void setupEtb() {
|
|||
// PWM - pwm control (enable high, coast low)
|
||||
// DIS - disables motor (enable low)
|
||||
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[0].directionPin1 = H144_GP1;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[0].disablePin = H144_GP5;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
|
||||
// PWM pin
|
||||
engineConfiguration->etbIo[1].controlPin = H144_GP4;
|
||||
// DIR pin
|
||||
engineConfiguration->etbIo[1].directionPin1 = Gpio::H144_GP3;
|
||||
// Disable pin
|
||||
engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
|
||||
// Unused
|
||||
engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
// // PWM pin
|
||||
// engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2;
|
||||
// // DIR pin
|
||||
// engineConfiguration->etbIo[0].directionPin1 = H144_GP1;
|
||||
// // Disable pin
|
||||
// engineConfiguration->etbIo[0].disablePin = H144_GP5;
|
||||
// // Unused
|
||||
// engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned;
|
||||
//
|
||||
// // PWM pin
|
||||
// engineConfiguration->etbIo[1].controlPin = H144_GP4;
|
||||
// // DIR pin
|
||||
// engineConfiguration->etbIo[1].directionPin1 = Gpio::H144_GP3;
|
||||
// // Disable pin
|
||||
// engineConfiguration->etbIo[1].disablePin = Gpio::Unassigned;
|
||||
// // Unused
|
||||
// engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned;
|
||||
// we only have pwm/dir, no dira/dirb
|
||||
engineConfiguration->etb_use_two_wires = false;
|
||||
}
|
||||
|
||||
static void setIgnitionPins() {
|
||||
engineConfiguration->ignitionPins[0] = Gpio::H144_IGN_1;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::H144_IGN_2;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::H144_IGN_3;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::H144_IGN_4;
|
||||
engineConfiguration->ignitionPins[0] = Gpio::MM176_IGN1;
|
||||
engineConfiguration->ignitionPins[1] = Gpio::MM176_IGN2;
|
||||
engineConfiguration->ignitionPins[2] = Gpio::MM176_IGN3;
|
||||
engineConfiguration->ignitionPins[3] = Gpio::MM176_IGN4;
|
||||
}
|
||||
|
||||
static void setupVbatt() {
|
||||
|
@ -78,39 +78,39 @@ static void setupVbatt() {
|
|||
// 33k / 6.8k
|
||||
engineConfiguration->vbattDividerCoeff = (33 + 6.8) / 6.8; // 5.835
|
||||
|
||||
engineConfiguration->vbattAdcChannel = H144_IN_VBATT;
|
||||
engineConfiguration->vbattAdcChannel = MM176_IN_VBATT;
|
||||
|
||||
engineConfiguration->adcVcc = 3.29f;
|
||||
}
|
||||
|
||||
static void setupDefaultSensorInputs() {
|
||||
// trigger inputs, hall
|
||||
engineConfiguration->triggerInputPins[0] = H144_USB1ID;
|
||||
engineConfiguration->triggerInputPins[1] = Gpio::H144_IN_CAM;
|
||||
// engineConfiguration->triggerInputPins[0] = H144_USB1ID;
|
||||
// engineConfiguration->triggerInputPins[1] = Gpio::H144_IN_CAM;
|
||||
engineConfiguration->camInputs[0] = Gpio::Unassigned;
|
||||
|
||||
setTPS1Inputs(H144_IN_TPS, H144_IN_AUX1);
|
||||
|
||||
setPPSInputs(H144_IN_PPS, H144_IN_AUX2);
|
||||
// setTPS1Inputs(H144_IN_TPS, H144_IN_AUX1);
|
||||
//
|
||||
// setPPSInputs(H144_IN_PPS, H144_IN_AUX2);
|
||||
|
||||
// random values to have valid config
|
||||
engineConfiguration->tps1SecondaryMin = 1000;
|
||||
engineConfiguration->tps1SecondaryMax = 0;
|
||||
|
||||
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.hwChannel = H144_IN_MAP3;
|
||||
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
|
||||
|
||||
engineConfiguration->clt.adcChannel = H144_IN_CLT;
|
||||
|
||||
engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
// engineConfiguration->clt.adcChannel = H144_IN_CLT;
|
||||
//
|
||||
// engineConfiguration->iat.adcChannel = H144_IN_IAT;
|
||||
}
|
||||
|
||||
void boardInitHardware() {
|
||||
setHellenEnPin(Gpio::H144_OUT_IO3);
|
||||
setHellenEnPin(Gpio::MM176_EN_PIN);
|
||||
|
||||
// alphaTempPullUp.initPin("a-temp", Gpio::H144_OUT_IO4);
|
||||
// alphaCrankPPullUp.initPin("a-crank-p", Gpio::H144_OUT_IO5);
|
||||
|
@ -162,15 +162,15 @@ void setBoardDefaultConfiguration() {
|
|||
setInjectorPins();
|
||||
setIgnitionPins();
|
||||
setupEtb();
|
||||
engineConfiguration->vvtPins[0] = Gpio::H144_OUT_PWM7;
|
||||
engineConfiguration->vvtPins[1] = Gpio::H144_OUT_PWM8;
|
||||
// engineConfiguration->vvtPins[0] = Gpio::H144_OUT_PWM7;
|
||||
// engineConfiguration->vvtPins[1] = Gpio::H144_OUT_PWM8;
|
||||
|
||||
engineConfiguration->boardUseTempPullUp = true;
|
||||
|
||||
engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO10;
|
||||
engineConfiguration->fanPin = Gpio::H144_OUT_IO11;
|
||||
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO12;
|
||||
engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;
|
||||
// engineConfiguration->mainRelayPin = Gpio::H144_OUT_IO10;
|
||||
// engineConfiguration->fanPin = Gpio::H144_OUT_IO11;
|
||||
// engineConfiguration->fuelPumpPin = Gpio::H144_OUT_IO12;
|
||||
// engineConfiguration->tachOutputPin = Gpio::H144_OUT_IO13;
|
||||
|
||||
// "required" hardware is done - set some reasonable defaults
|
||||
setupDefaultSensorInputs();
|
||||
|
|
|
@ -140,6 +140,7 @@
|
|||
#define MM176_GP7 F15
|
||||
//GP8 = PWR_EN
|
||||
#define MM176_GP8 E10
|
||||
#define MM176_EN_PIN MM176_GP8
|
||||
//GP9 = MUX
|
||||
#define MM176_GP9 F2
|
||||
#define MM176_GP10 I3
|
||||
|
|
Loading…
Reference in New Issue