reducing code duplication
This commit is contained in:
parent
af93acc15b
commit
21ea057f70
|
@ -342,8 +342,6 @@ void applyNewHardwareSettings() {
|
||||||
startSmartCsPins();
|
startSmartCsPins();
|
||||||
#endif /* (BOARD_EXT_GPIOCHIPS > 0) */
|
#endif /* (BOARD_EXT_GPIOCHIPS > 0) */
|
||||||
|
|
||||||
enginePins.startPins();
|
|
||||||
|
|
||||||
#if EFI_AUX_SERIAL
|
#if EFI_AUX_SERIAL
|
||||||
startAuxSerialPins();
|
startAuxSerialPins();
|
||||||
#endif /* EFI_AUX_SERIAL */
|
#endif /* EFI_AUX_SERIAL */
|
||||||
|
@ -464,8 +462,14 @@ void stopHardware() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is invoked both on ECU start and configuration change
|
* This method is invoked both on ECU start and configuration change
|
||||||
|
* At the moment we have too many system which handle ECU start and configuration change separately
|
||||||
|
* TODO: move move hardware code here
|
||||||
*/
|
*/
|
||||||
void startHardware() {
|
void startHardware() {
|
||||||
|
#if EFI_ENGINE_CONTROL
|
||||||
|
enginePins.startPins();
|
||||||
|
#endif /* EFI_ENGINE_CONTROL */
|
||||||
|
|
||||||
#if (HAL_USE_PAL && EFI_JOYSTICK)
|
#if (HAL_USE_PAL && EFI_JOYSTICK)
|
||||||
startJoystickPins();
|
startJoystickPins();
|
||||||
#endif /* HAL_USE_PAL && EFI_JOYSTICK */
|
#endif /* HAL_USE_PAL && EFI_JOYSTICK */
|
||||||
|
@ -546,10 +550,6 @@ void initHardware() {
|
||||||
// output pins potentially depend on 'initSmartGpio'
|
// output pins potentially depend on 'initSmartGpio'
|
||||||
initOutputPins();
|
initOutputPins();
|
||||||
|
|
||||||
#if EFI_ENGINE_CONTROL
|
|
||||||
enginePins.startPins();
|
|
||||||
#endif /* EFI_ENGINE_CONTROL */
|
|
||||||
|
|
||||||
#if EFI_MC33816
|
#if EFI_MC33816
|
||||||
initMc33816();
|
initMc33816();
|
||||||
#endif /* EFI_MC33816 */
|
#endif /* EFI_MC33816 */
|
||||||
|
|
Loading…
Reference in New Issue