AlphaX few bytes of progress

This commit is contained in:
rusefillc 2022-01-10 01:47:06 -05:00
parent 9625820272
commit 4537561214
3 changed files with 19 additions and 0 deletions

View File

@ -15,6 +15,10 @@
#include "custom_engine.h"
#include "hellen_meta.h"
static OutputPin alphaEn;
static OutputPin alphaTachPullUp;
static OutputPin alphaTempPullUp;
static void setInjectorPins() {
engineConfiguration->injectionPins[0] = H144_LS_1;
engineConfiguration->injectionPins[1] = H144_LS_2;
@ -85,6 +89,13 @@ static void setupDefaultSensorInputs() {
engineConfiguration->auxTempSensor2.adcChannel = EFI_ADC_NONE;
}
void boardInitHardware() {
alphaEn.initPin("a-EN", H144_OUT_IO3);
alphaEn.setValue(1);
alphaTachPullUp.initPin("a-tach", H144_OUT_IO1);
}
void setBoardConfigOverrides(void) {
setHellen144LedPins();
setupVbatt();

View File

@ -157,6 +157,9 @@ void onBurnRequest() {
incrementGlobalConfigurationVersion();
}
// Weak link a stub so that every board doesn't have to implement this function
__attribute__((weak)) void boardOnConfigurationChange(engine_configuration_s *previousConfiguration) { }
/**
* this is the top-level method which should be called in case of any changes to engine configuration
* online tuning of most values in the maps does not count as configuration change, but 'Burn' command does
@ -172,6 +175,8 @@ void incrementGlobalConfigurationVersion() {
applyNewHardwareSettings();
boardOnConfigurationChange(&activeConfiguration);
/**
* All these callbacks could be implemented as listeners, but these days I am saving RAM
*/

View File

@ -469,6 +469,9 @@ void startHardware() {
#endif /* EFI_CAN_SUPPORT */
}
// Weak link a stub so that every board doesn't have to implement this function
__attribute__((weak)) void boardInitHardware() { }
void initHardware() {
#if HAL_USE_PAL && EFI_PROD_CODE
efiExtiInit();