-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_if.h
executable file
·84 lines (61 loc) · 2.1 KB
/
user_if.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef USER_IF_H
#define USER_IF_H
#include "ff.h"
#include "defines.h"
#if BOARD_REV == 1 || BOARD_REV == 2
// BLE RESET on PB15
#define BacklightON() GPIO_SetBits(GPIOB, GPIO_Pin_15); LCDBackTimer = LCDBackTimeout;
#define BacklightOFF() GPIO_ResetBits(GPIOB, GPIO_Pin_15); LCDBackTimer = 0;
#endif
#if BOARD_REV == 3
#define BacklightON() LCDBackTimer = LCDBackTimeout;
#define BacklightOFF() LCDBackTimer = 0;
#endif
extern uint16_t LCDBackTimer;
void init_Clickwheel(void);
void Clickwheel_IRQ (void);
int8_t clickwheel_read4(void);
// Clickwheel Counter
volatile int8_t enc_delta; // -128 ... 127
static int8_t last;
int8_t ClickState;
volatile uint8_t key_state; // debounced and inverted key state:
// bit = 1: key pressed
volatile uint8_t key_press; // key press detect
volatile uint8_t key_rpt; // key long press and repeat
int8_t ClickWheelState(void);
void ENC_Button_IRQ(void);
uint8_t get_ENCBTN_press(uint8_t key_mask);
uint8_t get_ENCBTN_rpt(uint8_t key_mask);
uint8_t get_ENCBTN_state( uint8_t key_mask );
uint8_t get_ENCBTN_short(uint8_t key_mask);
uint8_t get_ENCBTN_long(uint8_t key_mask);
int32_t wheel_val; // Clickwheel position
char NumBuf[20]; // for itoa etc. function
extern uint32_t pk_treshold;
extern uint16_t bladecnt;
extern uint8_t PGA_gain;
extern uint16_t autogain;
extern uint16_t rpm_updaterate;
extern uint16_t logging;
// SD-Card logging
FRESULT fr;
FATFS fs;
FIL fil;
extern uint32_t samplerate;
extern float peakIdcsList[];
void Callback1(unsigned char);
void manageMenu(void);
void FFTDisplayMenu(void);
void StatusMenu(void);
void InfoMenu(void);
void DisplayZoomMenu(void);
void DetectionTrshMenu(void);
void NoOfBladesMenu(void);
void EnbDisBacklightMenu(void);
void BacklightTimeoutMenu(void);
void PGAGainMenu(void);
void AGCOnOffMenu(void);
void LoggingMenu(void);
#define MENU_ENTRIES 21 // Anzahl Menuzeilen OHNE Root!
#endif // USER_IF_H