proteus -> exti (#1378)
* proteus -> exti * do frankenso pal the same way Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
parent
320b9f74c6
commit
858821ed66
|
@ -24,7 +24,7 @@ jobs:
|
|||
- build-target: frankenso-pal
|
||||
efi-cpu: ARCH_STM32F4
|
||||
efi-board: st_stm32f4
|
||||
target-extra-params: -DHAL_TRIGGER_USE_PAL=TRUE -DHAL_USE_ICU=FALSE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE
|
||||
target-extra-params: -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_ICU_INPUTS=FALSE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE
|
||||
|
||||
- build-target: mre-f4
|
||||
efi-cpu: ARCH_STM32F4
|
||||
|
|
|
@ -24,4 +24,4 @@ endif
|
|||
|
||||
|
||||
# Override DEFAULT_ENGINE_TYPE
|
||||
DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DEFI_FATAL_ERROR_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DUSE_ADC3_VBATT_HACK -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE
|
||||
DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DEFI_FATAL_ERROR_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DUSE_ADC3_VBATT_HACK -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE
|
||||
|
|
|
@ -277,7 +277,7 @@ void initMapDecoder(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
//engine->configurationListeners.registerCallback(applyConfiguration);
|
||||
|
||||
if (engineConfiguration->hasFrequencyReportingMapSensor) {
|
||||
#if HAL_USE_ICU
|
||||
#if EFI_ICU_INPUTS
|
||||
digital_input_s* digitalMapInput = startDigitalCapture("MAP freq", CONFIG(frequencyReportingMapInputPin));
|
||||
|
||||
digitalMapInput->setWidthCallback((VoidInt) digitalMapWidthCallback, NULL);
|
||||
|
|
|
@ -76,6 +76,7 @@ static int turnOnTriggerInputPin(const char *msg, int index, bool isTriggerShaft
|
|||
return 0;
|
||||
|
||||
/* try ICU first */
|
||||
#if EFI_ICU_INPUTS
|
||||
if (icuTriggerTurnOnInputPin(msg, index, isTriggerShaft) >= 0) {
|
||||
if (isTriggerShaft)
|
||||
shaftTriggerType[index] = TRIGGER_ICU;
|
||||
|
@ -83,6 +84,7 @@ static int turnOnTriggerInputPin(const char *msg, int index, bool isTriggerShaft
|
|||
camTriggerType[index] = TRIGGER_ICU;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ... then EXTI */
|
||||
if (extiTriggerTurnOnInputPin(msg, index, isTriggerShaft) >= 0) {
|
||||
|
@ -103,15 +105,19 @@ static void turnOffTriggerInputPin(int index, bool isTriggerShaft) {
|
|||
activeConfiguration.triggerInputPins[index] : activeConfiguration.camInputs[index];
|
||||
|
||||
if (isTriggerShaft) {
|
||||
#if EFI_ICU_INPUTS
|
||||
if (shaftTriggerType[index] == TRIGGER_ICU)
|
||||
icuTriggerTurnOffInputPin(brainPin);
|
||||
#endif
|
||||
if (shaftTriggerType[index] == TRIGGER_EXTI)
|
||||
extiTriggerTurnOffInputPin(brainPin);
|
||||
|
||||
shaftTriggerType[index] = TRIGGER_NONE;
|
||||
} else {
|
||||
#if EFI_ICU_INPUTS
|
||||
if (camTriggerType[index] == TRIGGER_ICU)
|
||||
icuTriggerTurnOffInputPin(brainPin);
|
||||
#endif
|
||||
if (camTriggerType[index] == TRIGGER_EXTI)
|
||||
extiTriggerTurnOffInputPin(brainPin);
|
||||
|
||||
|
|
Loading…
Reference in New Issue