FL-262 Interrupt manager (#270)
* interrupt manager * init interrupt manager * add usage to lf-rfid app * check ready flag * move interrupts code to target hal * fix path
This commit is contained in:
19
core/api-hal/api-interrupt-mgr.h
Normal file
19
core/api-hal/api-interrupt-mgr.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include "flipper_v2.h"
|
||||
|
||||
typedef void (*InterruptCallback)(void*, void*);
|
||||
|
||||
typedef enum {
|
||||
InterruptTypeComparatorTrigger = 0,
|
||||
} InterruptType;
|
||||
|
||||
typedef struct {
|
||||
InterruptCallback callback;
|
||||
InterruptType type;
|
||||
void* context;
|
||||
bool ready;
|
||||
} InterruptCallbackItem;
|
||||
|
||||
bool api_interrupt_init();
|
||||
void api_interrupt_add(InterruptCallback callback, InterruptType type, void* context);
|
||||
void api_interrupt_remove(InterruptCallback callback);
|
Reference in New Issue
Block a user