mirror of https://github.com/rusefi/rusefi.git
F407-Discovery status LED conflicts for GPIO fix #5705
This commit is contained in:
parent
06414cc595
commit
fdfae2724e
|
@ -26,7 +26,8 @@ static void setCanFrankensoDefaults() {
|
|||
}
|
||||
|
||||
Gpio getWarningLedPin() {
|
||||
return Gpio::D13; // orange LED on discovery
|
||||
// open question if we need those LEDs at all? shall those be configurable?
|
||||
return Gpio::Unassigned;
|
||||
}
|
||||
|
||||
Gpio getCommsLedPin() {
|
||||
|
@ -34,7 +35,8 @@ Gpio getCommsLedPin() {
|
|||
}
|
||||
|
||||
Gpio getRunningLedPin() {
|
||||
return Gpio::D12; // green LED on discovery
|
||||
// open question if we need those LEDs at all? shall those be configurable?
|
||||
return Gpio::Unassigned;
|
||||
}
|
||||
|
||||
#if EFI_HIP_9011
|
||||
|
|
|
@ -227,13 +227,18 @@ static systime_t timeOfPreviousReport = (systime_t) -1;
|
|||
static OutputPin* leds[] = { &enginePins.warningLedPin, &enginePins.runningLedPin,
|
||||
&enginePins.errorLedPin, &enginePins.communicationLedPin, &enginePins.checkEnginePin };
|
||||
|
||||
void initWarningRunningPins() {
|
||||
#if EFI_PROD_CODE
|
||||
// open question if we need warningLedPin and runningLedPin at all!
|
||||
enginePins.warningLedPin.initPin("led: warning status", getWarningLedPin(), LED_PIN_MODE, true);
|
||||
enginePins.runningLedPin.initPin("led: running status", getRunningLedPin(), LED_PIN_MODE, true);
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
static void initStatusLeds() {
|
||||
enginePins.communicationLedPin.initPin("led: comm status", getCommsLedPin(), LED_PIN_MODE, true);
|
||||
// checkEnginePin is already initialized by the time we get here
|
||||
|
||||
enginePins.warningLedPin.initPin("led: warning status", getWarningLedPin(), LED_PIN_MODE, true);
|
||||
enginePins.runningLedPin.initPin("led: running status", getRunningLedPin(), LED_PIN_MODE, true);
|
||||
}
|
||||
|
||||
static bool isTriggerErrorNow() {
|
||||
|
|
|
@ -679,6 +679,7 @@ void commonEarlyInit() {
|
|||
// one-time start-up
|
||||
void initRealHardwareEngineController() {
|
||||
commonInitEngineController();
|
||||
initWarningRunningPins();
|
||||
|
||||
#if EFI_LOGIC_ANALYZER
|
||||
if (engineConfiguration->isWaveAnalyzerEnabled) {
|
||||
|
|
|
@ -17,6 +17,7 @@ void initRealHardwareEngineController();
|
|||
void commonEarlyInit();
|
||||
void commonInitEngineController();
|
||||
void initStartStopButton();
|
||||
void initWarningRunningPins();
|
||||
|
||||
void initDataStructures();
|
||||
|
||||
|
|
Loading…
Reference in New Issue