api-interrupt-mgr.h 463 B

12345678910111213141516171819
  1. #pragma once
  2. #include "flipper_v2.h"
  3. typedef void (*InterruptCallback)(void*, void*);
  4. typedef enum {
  5. InterruptTypeComparatorTrigger = 0,
  6. } InterruptType;
  7. typedef struct {
  8. InterruptCallback callback;
  9. InterruptType type;
  10. void* context;
  11. bool ready;
  12. } InterruptCallbackItem;
  13. bool api_interrupt_init();
  14. void api_interrupt_add(InterruptCallback callback, InterruptType type, void* context);
  15. void api_interrupt_remove(InterruptCallback callback);