steering-wheel/Core/Inc/ui.h

29 lines
452 B
C
Raw Normal View History

2023-03-07 20:13:28 +01:00
#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
2023-04-11 21:32:14 +02:00
#define BUTTON_MIN_INTERVAL 50 // ms
#define ENC_MAX_PHASE 50 // ms
2023-03-07 20:13:28 +01:00
typedef enum { UMK_BTN_PRESSED, UMK_ENC_CW, UMK_ENC_CCW } ButtonMessageKind;
2023-03-07 20:13:28 +01:00
typedef struct {
ButtonMessageKind kind;
2023-03-07 20:13:28 +01:00
int number;
} ButtonMessage;
2023-03-07 20:13:28 +01:00
void ui_thread_entry(ULONG _);
#ifdef __cplusplus
}
#endif
#endif // __INC_ui_H