FIX ISO15693 emulation (#3444)

* furi hal gpio: allow enabling interrupt without handler
* signal reader: explicitly enable and disable gpio interrupt

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich 2024-02-14 02:37:04 +00:00 committed by GitHub
parent 25a280c818
commit 3d9a6a41db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -228,6 +228,7 @@ void signal_reader_start(SignalReader* instance, SignalReaderCallback callback,
/* We need the EXTI to be configured as interrupt generating line, but no ISR registered */
furi_hal_gpio_init(
instance->pin, GpioModeInterruptRiseFall, instance->pull, GpioSpeedVeryHigh);
furi_hal_gpio_enable_int_callback(instance->pin);
/* Set DMAMUX request generation signal ID on specified DMAMUX channel */
LL_DMAMUX_SetRequestSignalID(
@ -309,6 +310,8 @@ void signal_reader_stop(SignalReader* instance) {
furi_hal_interrupt_set_isr(SIGNAL_READER_DMA_GPIO_IRQ, NULL, NULL);
furi_hal_gpio_disable_int_callback(instance->pin);
// Deinit DMA Rx pin
LL_DMA_DeInit(SIGNAL_READER_DMA_GPIO_DEF);
// Deinit DMA Sync timer

View file

@ -215,11 +215,8 @@ void furi_hal_gpio_enable_int_callback(const GpioPin* gpio) {
FURI_CRITICAL_ENTER();
uint8_t pin_num = furi_hal_gpio_get_pin_num(gpio);
if(gpio_interrupt[pin_num].callback) {
const uint32_t exti_line = GET_EXTI_LINE(gpio->pin);
LL_EXTI_EnableIT_0_31(exti_line);
}
const uint32_t exti_line = GET_EXTI_LINE(gpio->pin);
LL_EXTI_EnableIT_0_31(exti_line);
FURI_CRITICAL_EXIT();
}