29 lines
445 B
C
29 lines
445 B
C
|
#ifndef __INC_ui_H
|
||
|
#define __INC_ui_H
|
||
|
|
||
|
#include "tx_port.h"
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
#define NUM_BUTTONS 6
|
||
|
#define NUM_ENCS 2
|
||
|
#define BUTTON_MIN_PRESS_TIME 50 // ms
|
||
|
#define ENC_MAX_PHASE 50 // ms
|
||
|
|
||
|
typedef enum { UMK_BTN_RELEASED, UMK_ENC_CW, UMK_ENC_CCW } UIMessageKind;
|
||
|
|
||
|
typedef struct {
|
||
|
UIMessageKind kind;
|
||
|
int number;
|
||
|
} UIMessage;
|
||
|
|
||
|
void ui_thread_entry(ULONG _);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif // __INC_ui_H
|