Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / drivers / exti.h
blobdbc5be1643edc08016826e0755425da70c6d87f2
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
19 #pragma once
21 #include "drivers/io_types.h"
23 // old EXTI interface, to be replaced
24 typedef struct extiConfig_s {
25 ioTag_t tag;
26 } extiConfig_t;
28 typedef struct extiCallbackRec_s extiCallbackRec_t;
29 typedef void extiHandlerCallback(extiCallbackRec_t *self);
31 struct extiCallbackRec_s {
32 extiHandlerCallback *fn;
35 void EXTIInit(void);
37 void EXTIHandlerInit(extiCallbackRec_t *cb, extiHandlerCallback *fn);
38 #if defined(STM32F7) || defined(STM32H7)
39 void EXTIConfig(IO_t io, extiCallbackRec_t *cb, int irqPriority, ioConfig_t config);
40 #elif defined(AT32F43x)
41 void EXTIConfig(IO_t io, extiCallbackRec_t *cb, int irqPriority, exint_polarity_config_type trigger);
42 #else
43 void EXTIConfig(IO_t io, extiCallbackRec_t *cb, int irqPriority, EXTITrigger_TypeDef trigger);
44 #endif
45 void EXTIRelease(IO_t io);
46 void EXTIEnable(IO_t io, bool enable);