trigger signal debug pins - logic level output #2959
This commit is contained in:
parent
7486f5f040
commit
b1f721e20b
|
@ -138,17 +138,11 @@ void stopTriggerInputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
if (isConfigurationChanged(triggerInputPins[i])) {
|
||||
turnOffTriggerInputPin(i, true);
|
||||
}
|
||||
if (isConfigurationChanged(triggerInputDebugPins[i])) {
|
||||
efiSetPadUnused(CONFIG(triggerInputDebugPins[i]));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < CAM_INPUTS_COUNT; i++) {
|
||||
if (isConfigurationChanged(camInputs[i])) {
|
||||
turnOffTriggerInputPin(i, false);
|
||||
}
|
||||
if (isConfigurationChanged(camInputsDebug[i])) {
|
||||
efiSetPadUnused(CONFIG(camInputsDebug[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,18 +152,12 @@ void startTriggerInputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
const char * msg = (i == 0 ? "Trigger #1" : (i == 1 ? "Trigger #2" : "Trigger #3"));
|
||||
turnOnTriggerInputPin(msg, i, true);
|
||||
}
|
||||
if (isConfigurationChanged(triggerInputDebugPins[i])) {
|
||||
efiSetPadMode("trigger debug", CONFIG(triggerInputDebugPins[i]), PAL_MODE_OUTPUT_PUSHPULL);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < CAM_INPUTS_COUNT; i++) {
|
||||
if (isConfigurationChanged(camInputs[i])) {
|
||||
turnOnTriggerInputPin("Cam", i, false);
|
||||
}
|
||||
if (isConfigurationChanged(camInputsDebug[i])) {
|
||||
efiSetPadMode("cam debug", CONFIG(camInputsDebug[i]), PAL_MODE_OUTPUT_PUSHPULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,11 +166,38 @@ void turnOnTriggerInputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
icuTriggerTurnOnInputPins();
|
||||
extiTriggerTurnOnInputPins();
|
||||
|
||||
applyNewTriggerInputPins();
|
||||
applyNewTriggerInputPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
||||
#endif /* (HAL_USE_ICU == TRUE) || (HAL_TRIGGER_USE_PAL == TRUE) */
|
||||
|
||||
|
||||
void stopTriggerDebugPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
for (int i = 0; i < TRIGGER_INPUT_PIN_COUNT; i++) {
|
||||
if (isConfigurationChanged(triggerInputDebugPins[i])) {
|
||||
efiSetPadUnused(CONFIG(triggerInputDebugPins[i]));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < CAM_INPUTS_COUNT; i++) {
|
||||
if (isConfigurationChanged(camInputsDebug[i])) {
|
||||
efiSetPadUnused(CONFIG(camInputsDebug[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void startTriggerDebugPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
for (int i = 0; i < TRIGGER_INPUT_PIN_COUNT; i++) {
|
||||
if (isConfigurationChanged(triggerInputDebugPins[i])) {
|
||||
efiSetPadMode("trigger debug", CONFIG(triggerInputDebugPins[i]), PAL_MODE_OUTPUT_PUSHPULL);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < CAM_INPUTS_COUNT; i++) {
|
||||
if (isConfigurationChanged(camInputsDebug[i])) {
|
||||
efiSetPadMode("cam debug", CONFIG(camInputsDebug[i]), PAL_MODE_OUTPUT_PUSHPULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void applyNewTriggerInputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
#if EFI_PROD_CODE
|
||||
// first we will turn off all the changed pins
|
||||
|
|
|
@ -21,3 +21,5 @@ systime_t chThdSleepUntilWindowed(systime_t prev, systime_t next);
|
|||
|
||||
thread_t *chThdCreateStatic(void *wsp, size_t size,
|
||||
tprio_t prio, tfunc_t pf, void *arg);
|
||||
|
||||
#define PAL_MODE_OUTPUT_PUSHPULL 0
|
||||
|
|
Loading…
Reference in New Issue