Files
H2201_Audio_Mixer/ESP32/main/H2201_buttons.h
Martijn Scheepers fb9e8daaf6 Basic volume control
2022-05-12 13:36:21 +02:00

40 lines
906 B
C

#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 MASTER_VOLUME_BUTTON 35
#define TELEPHONE_VOLUME_BUTTON 34
#define PC_VOLUME_BUTTON 39
#define BLUETOOTH_VOLUME_BUTTON 36
#define MASTER_VOLUME_0DB 0x39
#define TELEPHONE_VOLUME_0DB 0x06
#define PC_VOLUME_0DB 0x05
#define BLUETOOTH_VOLUME_0DB 0x39
#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__*/