2023-10-19 16:20:41 -07:00
|
|
|
/*
|
|
|
|
* userio.h: reacting when you fiddle with buttons, switches, and knobs
|
|
|
|
*
|
|
|
|
* file creation: 20231016 1505
|
|
|
|
*/
|
|
|
|
|
2023-10-21 19:45:15 -07:00
|
|
|
#ifndef _INC_USERIO_H
|
|
|
|
#define _INC_USERIO_H
|
|
|
|
|
2023-10-19 16:20:41 -07:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-21 19:45:15 -07:00
|
|
|
#define MODE_CONT 0
|
|
|
|
#define MODE_CONT_TARGET 3072 // (4096 * (1 - (1 / 4)))
|
|
|
|
|
|
|
|
#define MODE_FUN 1
|
|
|
|
#define MODE_FUN_TARGET 2731 // (4096 * (1 - (1 / 3)))
|
|
|
|
|
|
|
|
#define MODE_DIODE 2
|
|
|
|
#define MODE_DIODE_TARGET 2048 // (4096 * 1 - ((1 / 2)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern uint8_t knob[2];
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-19 16:20:41 -07:00
|
|
|
void userio_parse();
|
2023-10-21 19:45:15 -07:00
|
|
|
|
|
|
|
uint8_t userio_get_mode();
|
2023-10-22 00:40:01 -07:00
|
|
|
int16_t userio_get_btn();
|
2023-10-21 19:45:15 -07:00
|
|
|
|
2023-10-31 08:22:27 -07:00
|
|
|
uint8_t userio_get_set1_limit();
|
|
|
|
|
2023-10-31 19:50:30 -07:00
|
|
|
int16_t userio_get_btn_held();
|
|
|
|
void userio_set_btn_override();
|
|
|
|
|
2023-10-21 19:45:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* _INC_USERIO_H */
|