forked from DualTachyon/radtel-rt-890-oefw
-
Notifications
You must be signed in to change notification settings - Fork 1
/
misc.h
100 lines (86 loc) · 2.29 KB
/
misc.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* Copyright 2023 Dual Tachyon
* https://github.com/DualTachyon
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MISC_H
#define MISC_H
#include <stdbool.h>
#include <stdint.h>
enum SCREEN_Mode_t {
SCREEN_MAIN = 0,
SCREEN_MENU,
SCREEN_SETTING,
};
typedef enum SCREEN_Mode_t SCREEN_Mode_t;
enum IDLE_Mode_t {
IDLE_MODE_OFF = 0,
IDLE_MODE_DUAL_STANDBY,
IDLE_MODE_NOAA,
IDLE_MODE_SAVE,
};
typedef enum IDLE_Mode_t IDLE_Mode_t;
enum PTT_Lock_t {
PTT_LOCK_VOX = 0x01U,
PTT_LOCK_BATTERY = 0x02U,
PTT_LOCK_INCOMING = 0x04U,
PTT_LOCK_BUSY = 0x10U,
};
typedef enum PTT_Lock_t PTT_Lock_t;
enum {
BUSY_LOCK_OFF = 0U,
BUSY_LOCK_CARRIER,
BUSY_LOCK_CSS,
BUSY_LOCK_INVALID,
};
enum {
RADIO_MODE_QUIET = 0U,
RADIO_MODE_INCOMING,
RADIO_MODE_RX,
RADIO_MODE_TX,
};
extern SCREEN_Mode_t gScreenMode;
extern uint8_t gTxCodeType;
extern uint8_t gFskDataReceived;
extern bool gDataDisplay;
extern bool gDTMF_InputMode;
extern uint8_t gDTMF_WriteIndex;
extern bool gFrequencyDetectMode;
extern bool gEnableBlink;
extern bool gRedrawScreen;
extern bool gScannerMode;
extern bool gSaveMode;
extern bool gReceptionMode;
extern bool gReceivingAudio;
extern bool gMonitorMode;
extern bool gEnableLocalAlarm;
extern bool gSendTone;
extern bool KEY_SideKeyLongPressed;
extern PTT_Lock_t gPttLock;
extern bool gSignalFound;
extern bool gBlinkGreen;
extern uint8_t gRadioMode;
extern IDLE_Mode_t gIdleMode;
extern uint8_t gRxLinkCounter;
extern uint8_t gNOAA_ChannelNow;
extern uint8_t gNOAA_ChannelNext;
extern uint8_t gTailToneCounter;
extern uint16_t gNoToneCounter;
extern uint8_t gSettingsCount;
extern bool gFrequencyReverse;
extern char gString[32];
extern char gBigString[40];
extern uint32_t SFLASH_Offsets[20];
extern uint32_t SFLASH_FontOffsets[32];
extern uint8_t gFlashBuffer[8192];
#endif