mirror of https://github.com/rusefi/rusefi-1.git
Output pin init/deinit needs a linked list #1803
This commit is contained in:
parent
fbdd1b0cb0
commit
dfbbdff4b1
|
@ -63,15 +63,17 @@ RegisteredOutputPin::RegisteredOutputPin(const char *name, short pinOffset,
|
|||
}
|
||||
|
||||
void RegisteredOutputPin::unregister() {
|
||||
#if EFI_PROD_CODE
|
||||
brain_pin_e curPin = *(brain_pin_e *) ((void *) (&((char*)&activeConfiguration)[pinOffset]));
|
||||
brain_pin_e newPin = *(brain_pin_e *) ((void *) (&((char*) engineConfiguration)[pinOffset]));
|
||||
|
||||
pin_output_mode_e curMode = *(pin_output_mode_e *) ((void *) (&((char*)&activeConfiguration)[pinOffset]));
|
||||
pin_output_mode_e newMode = *(pin_output_mode_e *) ((void *) (&((char*) engineConfiguration)[pinOffset]));
|
||||
pin_output_mode_e curMode = *(pin_output_mode_e *) ((void *) (&((char*)&activeConfiguration)[pinModeOffset]));
|
||||
pin_output_mode_e newMode = *(pin_output_mode_e *) ((void *) (&((char*) engineConfiguration)[pinModeOffset]));
|
||||
|
||||
if (curPin != newPin || curMode != newMode) {
|
||||
unregisterOutput(curPin);
|
||||
}
|
||||
#endif // EFI_PROD_CODE
|
||||
}
|
||||
|
||||
EnginePins::EnginePins() :
|
||||
|
|
Loading…
Reference in New Issue