mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-21 10:13:10 +00:00
19 lines
463 B
C
19 lines
463 B
C
|
#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);
|