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

This commit is contained in:
rusefillc 2021-10-03 01:08:35 -04:00
parent 7302eedf7b
commit 58f80b7066
3 changed files with 19 additions and 16 deletions

View File

@ -13,17 +13,13 @@
#include "pch.h" #include "pch.h"
#include "fsio_impl.h" #include "fsio_impl.h"
#include "custom_engine.h" #include "custom_engine.h"
#include "../hellen_meta.h"
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = GPIOG_7; engineConfiguration->injectionPins[0] = H144_LS_1;
engineConfiguration->injectionPins[1] = GPIOG_8; engineConfiguration->injectionPins[1] = H144_LS_2;
engineConfiguration->injectionPins[2] = GPIOD_11; engineConfiguration->injectionPins[2] = H144_LS_3;
engineConfiguration->injectionPins[3] = GPIOD_10; engineConfiguration->injectionPins[3] = H144_LS_4;
//engineConfiguration->injectionPins[4] = GPIOD_9;
//engineConfiguration->injectionPins[5] = GPIOF_12;
//engineConfiguration->injectionPins[6] = GPIOF_13;
//engineConfiguration->injectionPins[7] = GPIOF_14;
// Disable remainder // Disable remainder
for (int i = 4; i < MAX_CYLINDER_COUNT;i++) { for (int i = 4; i < MAX_CYLINDER_COUNT;i++) {

View File

@ -13,19 +13,19 @@
#include "pch.h" #include "pch.h"
#include "fsio_impl.h" #include "fsio_impl.h"
#include "custom_engine.h" #include "custom_engine.h"
#include "../hellen_meta.h"
static void hellenWbo() { static void hellenWbo() {
engineConfiguration->enableAemXSeries = true; engineConfiguration->enableAemXSeries = true;
} }
static void setInjectorPins() { static void setInjectorPins() {
engineConfiguration->injectionPins[0] = GPIOG_7; engineConfiguration->injectionPins[0] = H144_LS_1;
engineConfiguration->injectionPins[1] = GPIOG_8; engineConfiguration->injectionPins[1] = H144_LS_2;
engineConfiguration->injectionPins[2] = GPIOD_11; engineConfiguration->injectionPins[2] = H144_LS_3;
engineConfiguration->injectionPins[3] = GPIOD_10; engineConfiguration->injectionPins[3] = H144_LS_4;
engineConfiguration->injectionPins[4] = GPIOD_9; engineConfiguration->injectionPins[4] = H144_LS_5;
engineConfiguration->injectionPins[5] = GPIOF_12; engineConfiguration->injectionPins[5] = H144_LS_6;
// Disable remainder // Disable remainder
for (int i = 6; i < MAX_CYLINDER_COUNT;i++) { for (int i = 6; i < MAX_CYLINDER_COUNT;i++) {

View File

@ -7,6 +7,13 @@
#pragma once #pragma once
#define H144_LS_1 GPIOG_7
#define H144_LS_2 GPIOG_8
#define H144_LS_3 GPIOD_11
#define H144_LS_4 GPIOD_10
#define H144_LS_5 GPIOD_9
#define H144_LS_6 GPIOF_12
#define H176_LS_1 GPIOG_7 #define H176_LS_1 GPIOG_7
#define H176_OUT_PWM1 GPIOD_13 #define H176_OUT_PWM1 GPIOD_13