export board-specific macro for stm32 pins based on board yaml #3298
This commit is contained in:
parent
441549d3e6
commit
618d13e673
|
@ -26,18 +26,18 @@ static const brain_pin_e injPins[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const brain_pin_e ignPins[] = {
|
static const brain_pin_e ignPins[] = {
|
||||||
GPIOD_4,
|
PROTEUS_HS_1,
|
||||||
GPIOD_3,
|
PROTEUS_HS_2,
|
||||||
GPIOC_9,
|
PROTEUS_HS_3,
|
||||||
GPIOC_8,
|
PROTEUS_HS_4,
|
||||||
GPIOC_7,
|
PROTEUS_HS_5,
|
||||||
GPIOG_8,
|
PROTEUS_HS_6,
|
||||||
GPIOG_7,
|
PROTEUS_HS_7,
|
||||||
GPIOG_6,
|
PROTEUS_HS_8,
|
||||||
GPIOG_5,
|
PROTEUS_HS_9,
|
||||||
GPIOG_4,
|
PROTEUS_HS_10,
|
||||||
GPIOG_3,
|
PROTEUS_HS_11,
|
||||||
GPIOG_2,
|
PROTEUS_HS_12,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void setInjectorPins() {
|
static void setInjectorPins() {
|
||||||
|
@ -108,13 +108,11 @@ static void setupDefaultSensorInputs() {
|
||||||
// trigger inputs
|
// trigger inputs
|
||||||
#if VR_HW_CHECK_MODE
|
#if VR_HW_CHECK_MODE
|
||||||
// set_trigger_input_pin 0 PE7
|
// set_trigger_input_pin 0 PE7
|
||||||
// GPIOE_7: "VR 1"
|
engineConfiguration->triggerInputPins[0] = PROTEUS_VR_1;
|
||||||
engineConfiguration->triggerInputPins[0] = GPIOE_7;
|
engineConfiguration->camInputs[0] = PROTEUS_VR_2;
|
||||||
// GPIOE_8: "VR 2"
|
|
||||||
engineConfiguration->camInputs[0] = GPIOE_8;
|
|
||||||
#else
|
#else
|
||||||
// Digital channel 1 as default - others not set
|
// Digital channel 1 as default - others not set
|
||||||
engineConfiguration->triggerInputPins[0] = GPIOC_6;
|
engineConfiguration->triggerInputPins[0] = PROTEUS_DIGITAL_1;
|
||||||
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
engineConfiguration->camInputs[0] = GPIO_UNASSIGNED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -27,3 +27,27 @@
|
||||||
#define PROTEUS_LS_10 GPIOB_6
|
#define PROTEUS_LS_10 GPIOB_6
|
||||||
#define PROTEUS_LS_11 GPIOB_7
|
#define PROTEUS_LS_11 GPIOB_7
|
||||||
#define PROTEUS_LS_12 GPIOB_8
|
#define PROTEUS_LS_12 GPIOB_8
|
||||||
|
|
||||||
|
// pin 2/black35
|
||||||
|
#define PROTEUS_HS_1 GPIOD_4
|
||||||
|
|
||||||
|
// pin 1/black35
|
||||||
|
#define PROTEUS_HS_2 GPIOD_3
|
||||||
|
|
||||||
|
// pin 22/black35
|
||||||
|
#define PROTEUS_HS_3 GPIOC_9
|
||||||
|
#define PROTEUS_HS_4 GPIOC_8
|
||||||
|
#define PROTEUS_HS_5 GPIOC_7
|
||||||
|
#define PROTEUS_HS_6 GPIOG_8
|
||||||
|
#define PROTEUS_HS_7 GPIOG_7
|
||||||
|
#define PROTEUS_HS_8 GPIOG_6
|
||||||
|
#define PROTEUS_HS_9 GPIOG_5
|
||||||
|
#define PROTEUS_HS_10 GPIOG_4
|
||||||
|
#define PROTEUS_HS_11 GPIOG_3
|
||||||
|
#define PROTEUS_HS_12 GPIOG_2
|
||||||
|
|
||||||
|
|
||||||
|
#define PROTEUS_VR_1 GPIOE_7
|
||||||
|
#define PROTEUS_VR_2 GPIOE_8
|
||||||
|
|
||||||
|
#define PROTEUS_DIGITAL_1 GPIOC_6
|
||||||
|
|
|
@ -540,19 +540,19 @@ void proteusBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
engineConfiguration->ignitionPins[0] = GPIOD_4;// "Ign 1"
|
engineConfiguration->ignitionPins[0] = PROTEUS_HS_1;
|
||||||
engineConfiguration->ignitionPins[1] = GPIOD_3;// "Ign 2"
|
engineConfiguration->ignitionPins[1] = PROTEUS_HS_2;
|
||||||
engineConfiguration->ignitionPins[2] = GPIOC_8;// "Ign 4"
|
engineConfiguration->ignitionPins[2] = PROTEUS_HS_4;
|
||||||
engineConfiguration->ignitionPins[3] = GPIOC_7;// "Ign 5"
|
engineConfiguration->ignitionPins[3] = PROTEUS_HS_5;
|
||||||
engineConfiguration->ignitionPins[4] = GPIOG_8;// "Ign 6"
|
engineConfiguration->ignitionPins[4] = PROTEUS_HS_6;
|
||||||
engineConfiguration->ignitionPins[5] = GPIOG_7;// "Ign 7"
|
engineConfiguration->ignitionPins[5] = PROTEUS_HS_7;
|
||||||
|
|
||||||
engineConfiguration->ignitionPins[6] = GPIOD_15;// "Highside 3" # pin 13/black35
|
engineConfiguration->ignitionPins[6] = GPIOD_15;// "Highside 3" # pin 13/black35
|
||||||
engineConfiguration->ignitionPins[7] = GPIOC_9;// "Ign 3"
|
engineConfiguration->ignitionPins[7] = PROTEUS_HS_3;
|
||||||
engineConfiguration->ignitionPins[8] = GPIOG_5;// "Ign 9"
|
engineConfiguration->ignitionPins[8] = PROTEUS_HS_9;
|
||||||
engineConfiguration->ignitionPins[9] = GPIOG_6;// "Ign 8"
|
engineConfiguration->ignitionPins[9] = PROTEUS_HS_8;
|
||||||
engineConfiguration->ignitionPins[10] = GPIOA_9;// "Highside 1" # pin 2/black35
|
engineConfiguration->ignitionPins[10] = PROTEUS_HS_1;
|
||||||
engineConfiguration->ignitionPins[11] = GPIOG_2;// "Ign 12"
|
engineConfiguration->ignitionPins[11] = PROTEUS_HS_12;
|
||||||
|
|
||||||
engineConfiguration->fsioOutputPins[0] = GPIOE_2;// "Lowside 16" # pin 23/black35
|
engineConfiguration->fsioOutputPins[0] = GPIOE_2;// "Lowside 16" # pin 23/black35
|
||||||
engineConfiguration->fsioOutputPins[1] = GPIOG_14;// "Lowside 7"
|
engineConfiguration->fsioOutputPins[1] = GPIOG_14;// "Lowside 7"
|
||||||
|
|
|
@ -754,9 +754,9 @@ void setMiataNB2_ProteusEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE)
|
||||||
|
|
||||||
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
|
|
||||||
engineConfiguration->ignitionPins[0] = GPIOD_4; // "Ign 1" # pin 35/black35
|
engineConfiguration->ignitionPins[0] = PROTEUS_HS_1;
|
||||||
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
engineConfiguration->ignitionPins[1] = GPIO_UNASSIGNED;
|
||||||
engineConfiguration->ignitionPins[2] = GPIOC_9; // "Ign 3" # pin 22/black35
|
engineConfiguration->ignitionPins[2] = PROTEUS_HS_3;
|
||||||
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
engineConfiguration->ignitionPins[3] = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
|
||||||
|
|
Loading…
Reference in New Issue