void applyNewHardwareSettings(void) { #if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__) applyNewTriggerInputPins(); #endif /* EFI_SHAFT_POSITION_INPUT */ // all 'stop' methods need to go before we begin starting pins enginePins.stopInjectionPins(); enginePins.stopIgnitionPins(); #if EFI_CAN_SUPPORT || defined(__DOXYGEN__) stopCanPins(); #endif /* EFI_CAN_SUPPORT */ #if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__) bool etbRestartNeeded = isETBRestartNeeded(); if (etbRestartNeeded) { stopETBPins(); } #endif /* EFI_ELECTRONIC_THROTTLE_BODY */ #if EFI_VEHICLE_SPEED || defined(__DOXYGEN__) stopVSSPins(); #endif /* EFI_VEHICLE_SPEED */ stopAuxPins(); if (engineConfiguration->bc.is_enabled_spi_1 != activeConfiguration.bc.is_enabled_spi_1) stopSpi(SPI_DEVICE_1); if (engineConfiguration->bc.is_enabled_spi_2 != activeConfiguration.bc.is_enabled_spi_2) stopSpi(SPI_DEVICE_2); if (engineConfiguration->bc.is_enabled_spi_3 != activeConfiguration.bc.is_enabled_spi_3) stopSpi(SPI_DEVICE_3); unregisterPin(engineConfiguration->bc.HD44780_rs, activeConfiguration.bc.HD44780_rs); unregisterPin(engineConfiguration->bc.HD44780_e, activeConfiguration.bc.HD44780_e); unregisterPin(engineConfiguration->bc.HD44780_db4, activeConfiguration.bc.HD44780_db4); unregisterPin(engineConfiguration->bc.HD44780_db5, activeConfiguration.bc.HD44780_db5); unregisterPin(engineConfiguration->bc.HD44780_db6, activeConfiguration.bc.HD44780_db6); unregisterPin(engineConfiguration->bc.HD44780_db7, activeConfiguration.bc.HD44780_db7); unregisterPin(engineConfiguration->bc.clutchUpPin, activeConfiguration.bc.clutchUpPin); enginePins.unregisterPins(); enginePins.startInjectionPins(); enginePins.startIgnitionPins(); #if EFI_CAN_SUPPORT || defined(__DOXYGEN__) startCanPins(); #endif /* EFI_CAN_SUPPORT */ #if EFI_ELECTRONIC_THROTTLE_BODY || defined(__DOXYGEN__) if (etbRestartNeeded) { startETBPins(); } #endif /* EFI_ELECTRONIC_THROTTLE_BODY */ #if EFI_VEHICLE_SPEED || defined(__DOXYGEN__) startVSSPins(); #endif /* EFI_VEHICLE_SPEED */ startAuxPins(); adcConfigListener(engine); }
void initVehicleSpeed(Logging *l) { logger = l; addConsoleAction("speedinfo", speedInfo); startVSSPins(); }