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 RADIO_H
|
|
|
|
#define RADIO_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
2023-09-09 09:01:52 +01:00
|
|
|
|
2023-10-02 10:05:15 +01:00
|
|
|
#include "frequencies.h"
|
2023-11-02 21:44:53 +00:00
|
|
|
#include "settings.h"
|
2023-09-09 08:03:56 +01:00
|
|
|
|
2023-11-02 10:00:51 +00:00
|
|
|
extern vfo_info_t g_vfo_info[2];
|
|
|
|
|
2023-10-08 20:23:37 +01:00
|
|
|
extern vfo_info_t *g_tx_vfo;
|
|
|
|
extern vfo_info_t *g_rx_vfo;
|
|
|
|
extern vfo_info_t *g_current_vfo;
|
2023-09-09 08:03:56 +01:00
|
|
|
|
2023-10-08 20:23:37 +01:00
|
|
|
extern dcs_code_type_t g_selected_code_type;
|
|
|
|
extern dcs_code_type_t g_current_code_type;
|
|
|
|
extern uint8_t g_selected_code;
|
2023-09-09 08:03:56 +01:00
|
|
|
|
2023-10-08 20:23:37 +01:00
|
|
|
extern vfo_state_t g_vfo_state[2];
|
2023-09-09 08:03:56 +01:00
|
|
|
|
2023-11-06 18:52:18 +00:00
|
|
|
bool RADIO_channel_valid(uint16_t ChNum, bool bCheckScanList, uint8_t RadioNum);
|
2023-10-09 17:01:26 +01:00
|
|
|
uint8_t RADIO_FindNextChannel(uint8_t ChNum, scan_state_dir_t Direction, bool bCheckScanList, uint8_t RadioNum);
|
2023-10-19 20:03:12 +01:00
|
|
|
void RADIO_InitInfo(vfo_info_t *p_vfo, const uint8_t ChannelSave, const uint32_t Frequency);
|
2023-10-17 11:05:41 +01:00
|
|
|
void RADIO_configure_channel(const unsigned int VFO, const unsigned int configure);
|
2023-11-02 14:38:03 +00:00
|
|
|
#ifdef ENABLE_VOX
|
|
|
|
void RADIO_enable_vox(unsigned int level);
|
|
|
|
#endif
|
2023-11-09 05:59:50 +00:00
|
|
|
void RADIO_ConfigureSquelch(vfo_info_t *p_vfo);
|
|
|
|
void RADIO_ConfigureTXPower(vfo_info_t *p_vfo);
|
2023-11-10 07:31:50 +00:00
|
|
|
void RADIO_apply_offset(vfo_info_t *p_vfo, const bool set_pees);
|
2023-10-16 06:43:42 +01:00
|
|
|
void RADIO_select_vfos(void);
|
2023-10-17 11:05:41 +01:00
|
|
|
void RADIO_setup_registers(bool switch_to_function_foreground);
|
2023-09-14 09:56:30 +01:00
|
|
|
#ifdef ENABLE_NOAA
|
2023-09-09 08:03:56 +01:00
|
|
|
void RADIO_ConfigureNOAA(void);
|
|
|
|
#endif
|
2023-10-15 11:24:20 +01:00
|
|
|
void RADIO_enableTX(const bool fsk_tx);
|
2023-09-09 08:03:56 +01:00
|
|
|
|
2023-10-30 21:48:29 +00:00
|
|
|
void RADIO_set_vfo_state(vfo_state_t State);
|
2023-09-09 09:01:52 +01:00
|
|
|
void RADIO_PrepareTX(void);
|
2023-10-31 22:02:54 +00:00
|
|
|
void RADIO_enable_CxCSS_tail(void);
|
2023-09-09 09:01:52 +01:00
|
|
|
void RADIO_PrepareCssTX(void);
|
2023-10-18 11:31:30 +01:00
|
|
|
void RADIO_tx_eot(void);
|
2023-09-09 08:03:56 +01:00
|
|
|
|
|
|
|
#endif
|