only:hellen154hyundai
This commit is contained in:
rusefi 2023-12-07 12:20:43 -05:00
parent f8d26eeb2f
commit 282e8b54a1
5 changed files with 17 additions and 10 deletions

View File

@ -164,7 +164,7 @@ static Gpio OUTPUTS[] = {
Gpio::H144_IGN_4, // Coil 4
Gpio::H144_OUT_PWM8, // MIL
Gpio::H144_OUT_PWM7, // low side? Tacho unused CAN tachometer right?
Gpio::F14, // X8 AuxLS1
Gpio::H_SPI1_SCK, // X8 AuxLS1
};
int getBoardMetaOutputsCount() {

View File

@ -1,12 +1,15 @@
meta: config/boards/hellen_meta.h
pins:
- pin: X1
function: GND
type: gnd
- pin: X2
# H_SPI1_CS2
id: B7
# H_SPI1_CS2 rev C, else on rev D
meta: H_SPI1_CS2
class: outputs
type: ls
ts_name: X2 AuxLS3
function: AuxLS3
@ -14,6 +17,7 @@ pins:
# H144_OUT_PWM6
id: D14
class: outputs
type: ls
ts_name: X3 AuxLS2
function: AuxLS2
@ -40,9 +44,10 @@ pins:
ts_name: X7 Digital2
- pin: X8
# H144_LS_8
id: F14
# H_SPI1_SCK on rev C and XXX on rev D?
meta: H_SPI1_SCK
class: outputs
type: ls
ts_name: X8 AuxLS1
function: AuxLS1, also K48 on main connector

View File

@ -64,7 +64,7 @@ void configureHellenMegaAccCS2Pin() {
static OutputPin cs2pin;
if (!initialized) {
initialized = true;
cs2pin.initPin("mm-CS2", H_SPI1_CS2);
cs2pin.initPin("mm-CS2", Gpio::H_SPI1_CS2);
cs2pin.setValue(1);
}
}

View File

@ -214,9 +214,9 @@ void detectHellenBoardType();
#define H_SPI1_MOSI Gpio::B5
#define H_SPI1_MISO Gpio::B4
#define H_SPI1_SCK Gpio::B3
#define H_SPI1_SCK B3
#define H_SPI1_CS1 Gpio::B6
#define H_SPI1_CS2 Gpio::B7
#define H_SPI1_CS2 B7
// looks like same pins 144 and 176
#define H_SPI2_MOSI Gpio::B15
@ -234,7 +234,7 @@ static void setHellenSdCardSpi1NoCS() {
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1;
engineConfiguration->spi1mosiPin = H_SPI1_MOSI;
engineConfiguration->spi1misoPin = H_SPI1_MISO;
engineConfiguration->spi1sckPin = H_SPI1_SCK;
engineConfiguration->spi1sckPin = Gpio::H_SPI1_SCK;
engineConfiguration->is_enabled_spi_1 = true;
}

View File

@ -59,7 +59,7 @@ public class PinoutLogic {
String className = listPin.getPinClass();
ArrayList<String> classList = names.get(className);
if (classList == null) {
throw new IllegalStateException("Class not found: " + className);
throw new IllegalStateException(boardName + ": Class not found: " + className + " for " + id);
}
PinType listPinType = PinType.find(className);
String pinType = listPinType.getPinType();
@ -67,6 +67,8 @@ public class PinoutLogic {
Objects.requireNonNull(enumList, "Enum for " + pinType);
Map.Entry<String, Value> kv = find(enumList, id);
if (kv == null) {
if (id.toLowerCase().contains("gpio"))
throw new IllegalStateException(boardName + ": Not found looks like legacy 'Gpio::' notation " + id + " in " + className);
throw new IllegalStateException(boardName + ": Not found " + id + " in " + className);
}