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

This commit is contained in:
rusefi 2023-09-03 23:02:56 -04:00
parent 6a4f514cdd
commit 46ebb1c18c
2 changed files with 7 additions and 3 deletions

View File

@ -62,7 +62,7 @@ pins:
- pin: K15
meta: H144_IN_D_AUX4
function: 'Cam Sensor (2014: yellow)'
class: [event_inputs]
class: event_inputs
ts_name: Cam - K15
- pin: K16
@ -72,13 +72,13 @@ pins:
- pin: K17b
function: Crank Sensor
meta: H144_IN_CRANK
class: [event_inputs]
class: event_inputs
ts_name: Crank - K17 rev B
- pin: K17c
function: "Crank Sensor (2014: pink)"
meta: H144_IN_SENS2
class: [event_inputs]
class: event_inputs
ts_name: Crank - K17 rev C
- pin: K21

View File

@ -185,6 +185,10 @@ public class PinoutLogic {
if (pinIdString.length() == 0) {
throw new IllegalStateException("Unexpected empty ID field");
}
if (!(pinTsName instanceof String))
throw new IllegalStateException("Wrong type: " + pinTsName.getClass() + " while " + pinIdString);
if (!(pinClass instanceof String))
throw new IllegalStateException("Wrong type: " + pinClass.getClass() + " while " + pinIdString);
addPinToList(pinIdString, (String) pinTsName, (String) pinClass);
} else {
throw new IllegalStateException("Unexpected type of ID field: " + pinId.getClass().getSimpleName());