42 lines
691 B
C
42 lines
691 B
C
/*
|
|
* userio.h: reacting when you fiddle with buttons, switches, and knobs
|
|
*
|
|
* file creation: 20231016 1505
|
|
*/
|
|
|
|
#ifndef _INC_USERIO_H
|
|
#define _INC_USERIO_H
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#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];
|
|
|
|
|
|
|
|
void userio_parse();
|
|
|
|
uint8_t userio_get_mode();
|
|
int16_t userio_get_btn();
|
|
|
|
uint8_t userio_get_set1_limit();
|
|
|
|
int16_t userio_get_btn_held();
|
|
void userio_set_btn_override();
|
|
|
|
|
|
|
|
#endif /* _INC_USERIO_H */ |