parent
f6d2f47bd1
commit
57ac71a814
|
@ -809,5 +809,5 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 20190408;
|
||||
return 20190409;
|
||||
}
|
||||
|
|
|
@ -260,11 +260,11 @@ void stopSpi(spi_device_e device) {
|
|||
}
|
||||
|
||||
void applyNewHardwareSettings(void) {
|
||||
// all 'stop' methods need to go before we begin starting pins
|
||||
|
||||
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
|
||||
applyNewTriggerInputPins();
|
||||
stopTriggerInputPins();
|
||||
#endif /* EFI_SHAFT_POSITION_INPUT */
|
||||
|
||||
// all 'stop' methods need to go before we begin starting pins
|
||||
|
||||
enginePins.stopInjectionPins();
|
||||
enginePins.stopIgnitionPins();
|
||||
|
@ -293,8 +293,6 @@ void applyNewHardwareSettings(void) {
|
|||
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);
|
||||
|
@ -306,6 +304,9 @@ void applyNewHardwareSettings(void) {
|
|||
|
||||
enginePins.unregisterPins();
|
||||
|
||||
#if EFI_SHAFT_POSITION_INPUT || defined(__DOXYGEN__)
|
||||
startTriggerInputPins();
|
||||
#endif /* EFI_SHAFT_POSITION_INPUT */
|
||||
|
||||
enginePins.startInjectionPins();
|
||||
enginePins.startIgnitionPins();
|
||||
|
|
|
@ -13,5 +13,7 @@
|
|||
|
||||
void turnOnTriggerInputPins(Logging *sharedLogger);
|
||||
void applyNewTriggerInputPins(void);
|
||||
void startTriggerInputPins(void);
|
||||
void stopTriggerInputPins(void);
|
||||
|
||||
#endif /* CRANK_INPUT_H_ */
|
||||
|
|
|
@ -173,11 +173,7 @@ void stopTriggerInputPins(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void applyNewTriggerInputPins(void) {
|
||||
// first we will turn off all the changed pins
|
||||
stopTriggerInputPins();
|
||||
|
||||
// then we will enable all the changed pins
|
||||
void startTriggerInputPins(void) {
|
||||
for (int i = 0; i < TRIGGER_SUPPORTED_CHANNELS; i++) {
|
||||
if (CONFIGB(triggerInputPins)[i]
|
||||
!= activeConfiguration.bc.triggerInputPins[i]) {
|
||||
|
@ -193,4 +189,11 @@ void applyNewTriggerInputPins(void) {
|
|||
rememberPrimaryChannel();
|
||||
}
|
||||
|
||||
void applyNewTriggerInputPins(void) {
|
||||
// first we will turn off all the changed pins
|
||||
stopTriggerInputPins();
|
||||
// then we will enable all the changed pins
|
||||
startTriggerInputPins();
|
||||
}
|
||||
|
||||
#endif /* EFI_SHAFT_POSITION_INPUT && HAL_USE_ICU */
|
||||
|
|
Loading…
Reference in New Issue