#ifndef __H2201_BUTTONS_H__
#define __H2201_BUTTONS_H__

#define BUTTON_1 36
#define BUTTON_2 39
#define BUTTON_3 34
#define BUTTON_4 35

#define ROTARY_A_GPIO 27
#define ROTARY_B_GPIO 32
//#define ROTARY_STEP_SIZE 100000
//#define ROTARY_MAX 8388608
//#define ROTARY_MAX 1000
//#define ROTARY_MIN 0
#define ROTARY_GLITCH_US 10

#define SHIFT_CLOCK 19
#define SHIFT_DATA 18
#define SHIFT_LATCH 5

typedef struct {
    int unit;  // the PCNT unit that originated an interrupt
    uint32_t status; // information on the event type that caused the interrupt
} pcnt_evt_t;

void H2201_shiftregister_init(void);
bool H2201_dipswitch_read(int sw);
void H2201_buttons_init(void);
void H2201_encoder_init(void);

#endif /* __H2201_BUTTONS_H__*/