#ifndef __H2201_BUTTONS_H__
#define __H2201_BUTTONS_H__

#define H2201_BUTTONS_TAG "H2201_BUTTONS"

#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_GLITCH_NS 10000
#define ROTARY_HIGH_LIMIT 1
#define ROTARY_LOW_LIMIT  -1

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

#define BUTTON_PRESS_EVENT 1
#define ENCODER_UP_EVENT 2
#define ENCODER_DOWN_EVENT 3

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__*/