mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 15:23:57 -04:00
AP_RPM: set pin to input before attaching interrupt
this fixes input on AUX6 on CubeBlack
This commit is contained in:
parent
0669619cea
commit
ce1b0fe533
@ -136,6 +136,7 @@ void AP_RPM_Pin::update(void)
|
||||
stm32_gpiosetevent(gpio, true, false, false,
|
||||
state.instance==0?irq_handler0:irq_handler1);
|
||||
#else // other HALs
|
||||
hal.gpio->pinMode(last_pin, HAL_GPIO_INPUT);
|
||||
hal.gpio->attach_interrupt(last_pin, state.instance==0?irq_handler0:irq_handler1,
|
||||
HAL_GPIO_INTERRUPT_RISING);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user