#pragma once


#include <inttypes.h>

typedef void (*rotaryCallback)(void *arg);

typedef struct rotaryPins
{
    uint8_t PIN1;
    uint8_t PIN2;
    uint8_t BUT;
    uint32_t ioMask;
    rotaryCallback CWCallback;
    rotaryCallback CCWCallback;
    rotaryCallback buttonCallback;
    uint64_t lastButtonCall;
    void *arg;
}rotaryPins;


#define GPIO_INPUT_PIN_SEL  ((1ULL<<VOLUME1_PIN1) | (1ULL<<VOLUME1_PIN2))  

#define ESP_INTR_FLAG_DEFAULT 0

#include "freertos/FreeRTOS.h"
#include "esp_attr.h"

static void printStatus(void* arg);

void registerInterrupt(rotaryPins *rot);