0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 22:31:25 +03:00

69 lines
2.0 KiB
C
Raw Normal View History

2023-09-09 08:03:56 +01:00
/* 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 APP_SCANNER_H
#define APP_SCANNER_H
#include "dcs.h"
#include "driver/keyboard.h"
2023-10-07 15:12:53 +01:00
enum SCAN_CssState_e
{
SCAN_CSS_STATE_OFF = 0,
SCAN_CSS_STATE_SCANNING,
SCAN_CSS_STATE_FOUND,
SCAN_CSS_STATE_FAILED
2023-09-09 08:03:56 +01:00
};
2023-10-07 15:12:53 +01:00
typedef enum SCAN_CssState_e SCAN_CssState_t;
2023-09-09 08:03:56 +01:00
2023-10-07 15:12:53 +01:00
enum {
2023-10-05 23:58:55 +01:00
SCAN_REV = -1,
SCAN_OFF = 0,
SCAN_FWD = +1
2023-09-09 08:03:56 +01:00
};
2023-10-07 15:12:53 +01:00
enum SCAN_edit_state_e {
SCAN_EDIT_STATE_NONE = 0,
SCAN_EDIT_STATE_BUSY,
SCAN_EDIT_STATE_DONE
};
typedef enum SCAN_edit_state_e SCAN_edit_state_t;
2023-10-08 17:14:13 +01:00
extern dcs_code_type_t gScanCssResultType;
extern uint8_t gScanCssResultCode;
2023-10-08 20:23:37 +01:00
extern bool g_flag_start_scan;
extern bool g_flag_stop_scan;
extern bool g_scan_single_frequency;
2023-10-07 15:12:53 +01:00
extern SCAN_edit_state_t gScannerEditState;
extern uint8_t gScanChannel;
extern uint32_t gScanFrequency;
extern bool gScanPauseMode;
extern SCAN_CssState_t gScanCssState;
2023-10-08 20:23:37 +01:00
extern volatile bool g_schedule_scan_listen;
extern volatile uint16_t g_scan_pause_delay_in_10ms;
extern uint8_t gScanProgressIndicator;
extern uint8_t gScanHitCount;
extern bool gScanUseCssResult;
2023-10-08 20:23:37 +01:00
extern int8_t g_scan_state_dir;
extern bool bScanKeepFrequency;
2023-09-09 08:03:56 +01:00
2023-10-08 20:23:37 +01:00
void SCANNER_ProcessKeys(key_code_t Key, bool key_pressed, bool key_held);
2023-09-09 08:03:56 +01:00
void SCANNER_Start(void);
void SCANNER_Stop(void);
#endif