From ded601e54f76eed876f3ed33ebf9e6fcae4a6487 Mon Sep 17 00:00:00 2001 From: rusefi Date: Tue, 13 Sep 2022 18:13:58 -0400 Subject: [PATCH] h154 --- .../hellen154hyundai/board_configuration.cpp | 22 ++++++++++++++++++- firmware/config/boards/hellen_meta.h | 2 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp b/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp index a1d76db4fc..442ef38c98 100644 --- a/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen154hyundai/board_configuration.cpp @@ -118,7 +118,27 @@ void setBoardConfigOverrides() { efiSetPadMode("ETB FIX1", H144_OUT_PWM5, PAL_MODE_INPUT_ANALOG); efiSetPadMode("ETB FIX2", H144_OUT_IO13, PAL_MODE_INPUT_ANALOG); } - } + } else if (engine->engineState.hellenBoardId == BOARD_ID_154hyundai_c) { + //ETB1 + // PWM pin + engineConfiguration->etbIo[0].controlPin = H144_OUT_PWM2; + // DIR pin + engineConfiguration->etbIo[0].directionPin1 = H144_OUT_PWM3; + // Disable pin + engineConfiguration->etbIo[0].disablePin = H144_OUT_IO12; + // Unused + engineConfiguration->etbIo[0].directionPin2 = Gpio::Unassigned; + + //ETB2 + // PWM pin + engineConfiguration->etbIo[1].controlPin = H144_OUT_PWM4; + // DIR pin + engineConfiguration->etbIo[1].directionPin1 = H144_OUT_PWM5; + // Disable pin + engineConfiguration->etbIo[1].disablePin = H144_OUT_IO13; + // Unused + engineConfiguration->etbIo[1].directionPin2 = Gpio::Unassigned; +} } /** diff --git a/firmware/config/boards/hellen_meta.h b/firmware/config/boards/hellen_meta.h index 4ffd4f436e..bf15dbc8ea 100644 --- a/firmware/config/boards/hellen_meta.h +++ b/firmware/config/boards/hellen_meta.h @@ -7,6 +7,8 @@ #pragma once +#define BOARD_ID_154hyundai_c 10 + void hellenWbo(); void setHellen144LedPins();