kopia lustrzana https://github.com/OpenRTX/OpenRTX
Made "static" all the variables local to each translation unit
rodzic
e54234f968
commit
24c4a25b2d
|
@ -64,8 +64,8 @@ typedef struct
|
|||
}
|
||||
state_t;
|
||||
|
||||
extern uint32_t freq_steps[];
|
||||
extern size_t n_freq_steps;
|
||||
extern const uint32_t freq_steps[];
|
||||
extern const size_t n_freq_steps;
|
||||
|
||||
enum TunerMode
|
||||
{
|
||||
|
|
|
@ -32,11 +32,13 @@
|
|||
|
||||
state_t state;
|
||||
pthread_mutex_t state_mutex;
|
||||
long long int lastUpdate = 0;
|
||||
static long long int lastUpdate = 0;
|
||||
|
||||
// Commonly used frequency steps, expressed in Hz
|
||||
uint32_t freq_steps[] = { 1000, 5000, 6250, 10000, 12500, 15000, 20000, 25000, 50000, 100000 };
|
||||
size_t n_freq_steps = sizeof(freq_steps) / sizeof(freq_steps[0]);
|
||||
const uint32_t freq_steps[] = { 1000, 5000, 6250, 10000, 12500, 15000,
|
||||
20000, 25000, 50000, 100000 };
|
||||
const size_t n_freq_steps = sizeof(freq_steps) / sizeof(freq_steps[0]);
|
||||
|
||||
|
||||
void state_init()
|
||||
{
|
||||
|
|
|
@ -24,18 +24,16 @@
|
|||
#include <OpMode_FM.hpp>
|
||||
#include <OpMode_M17.hpp>
|
||||
|
||||
pthread_mutex_t *cfgMutex; // Mutex for incoming config messages
|
||||
static pthread_mutex_t *cfgMutex; // Mutex for incoming config messages
|
||||
static const rtxStatus_t *newCnf; // Pointer for incoming config messages
|
||||
static rtxStatus_t rtxStatus; // RTX driver status
|
||||
static float rssi; // Current RSSI in dBm
|
||||
static bool reinitFilter; // Flag for RSSI filter re-initialisation
|
||||
|
||||
const rtxStatus_t *newCnf; // Pointer for incoming config messages
|
||||
rtxStatus_t rtxStatus; // RTX driver status
|
||||
|
||||
float rssi; // Current RSSI in dBm
|
||||
bool reinitFilter; // Flag for RSSI filter re-initialisation
|
||||
|
||||
OpMode *currMode; // Pointer to currently active opMode handler
|
||||
OpMode noMode; // Empty opMode handler for opmode::NONE
|
||||
OpMode_FM fmMode; // FM mode handler
|
||||
OpMode_M17 m17Mode; // M17 mode handler
|
||||
static OpMode *currMode; // Pointer to currently active opMode handler
|
||||
static OpMode noMode; // Empty opMode handler for opmode::NONE
|
||||
static OpMode_FM fmMode; // FM mode handler
|
||||
static OpMode_M17 m17Mode; // M17 mode handler
|
||||
|
||||
void rtx_init(pthread_mutex_t *m)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "ADC1_MDx.h"
|
||||
|
||||
pthread_mutex_t adcMutex;
|
||||
static pthread_mutex_t adcMutex;
|
||||
|
||||
void adc1_init()
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "ADC1_Mod17.h"
|
||||
|
||||
pthread_mutex_t adcMutex;
|
||||
static pthread_mutex_t adcMutex;
|
||||
|
||||
void adc1_init()
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ StreamHandler Dma2_Stream0_hdl = Dma2_Stream0::init(10, DataSize::_16BIT, false)
|
|||
StreamHandler Dma2_Stream1_hdl = Dma2_Stream1::init(10, DataSize::_16BIT, false);
|
||||
StreamHandler Dma2_Stream2_hdl = Dma2_Stream2::init(10, DataSize::_16BIT, false);
|
||||
|
||||
struct streamCtx *AdcContext[3];
|
||||
static struct streamCtx *AdcContext[3];
|
||||
|
||||
static constexpr AdcPeriph periph[] =
|
||||
{
|
||||
|
|
|
@ -29,17 +29,17 @@
|
|||
#include "HR_C6000.h"
|
||||
#include "AT1846S.h"
|
||||
|
||||
const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
static const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
|
||||
static gdxCalibration_t calData; // Calibration data
|
||||
Band currRxBand = BND_NONE; // Current band for RX
|
||||
Band currTxBand = BND_NONE; // Current band for TX
|
||||
uint16_t apcVoltage = 0; // APC voltage for TX output power control
|
||||
static Band currRxBand = BND_NONE; // Current band for RX
|
||||
static Band currTxBand = BND_NONE; // Current band for TX
|
||||
static uint16_t apcVoltage = 0; // APC voltage for TX output power control
|
||||
|
||||
enum opstatus radioStatus; // Current operating status
|
||||
static enum opstatus radioStatus; // Current operating status
|
||||
|
||||
HR_C6000& C6000 = HR_C6000::instance(); // HR_C5000 driver
|
||||
AT1846S& at1846s = AT1846S::instance(); // AT1846S driver
|
||||
static HR_C6000& C6000 = HR_C6000::instance(); // HR_C5000 driver
|
||||
static AT1846S& at1846s = AT1846S::instance(); // AT1846S driver
|
||||
|
||||
void radio_init(const rtxStatus_t *rtxState)
|
||||
{
|
||||
|
|
|
@ -32,17 +32,17 @@
|
|||
|
||||
static const freq_t IF_FREQ = 49950000; // Intermediate frequency: 49.95MHz
|
||||
|
||||
const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
static const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
|
||||
static md3x0Calib_t calData; // Calibration data
|
||||
bool isVhfBand = false; // True if rtx stage is for VHF band
|
||||
uint8_t vtune_rx = 0; // Tuning voltage for RX input filter
|
||||
uint8_t txpwr_lo = 0; // APC voltage for TX output power control, low power
|
||||
uint8_t txpwr_hi = 0; // APC voltage for TX output power control, high power
|
||||
static bool isVhfBand = false; // True if rtx stage is for VHF band
|
||||
static uint8_t vtune_rx = 0; // Tuning voltage for RX input filter
|
||||
static uint8_t txpwr_lo = 0; // APC voltage for TX output power control, low power
|
||||
static uint8_t txpwr_hi = 0; // APC voltage for TX output power control, high power
|
||||
|
||||
enum opstatus radioStatus; // Current operating status
|
||||
static enum opstatus radioStatus; // Current operating status
|
||||
|
||||
HR_C5000& C5000 = HR_C5000::instance(); // HR_C5000 driver
|
||||
static HR_C5000& C5000 = HR_C5000::instance(); // HR_C5000 driver
|
||||
|
||||
/*
|
||||
* Parameters for RSSI voltage (mV) to input power (dBm) conversion.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <MCP4551.h>
|
||||
#include "../audio/MAX9814.h"
|
||||
|
||||
enum opstatus radioStatus; // Current operating status
|
||||
static enum opstatus radioStatus; // Current operating status
|
||||
extern mod17Calib_t mod17CalData; // Calibration data
|
||||
|
||||
|
||||
|
|
|
@ -31,20 +31,20 @@
|
|||
#include "AT1846S.h"
|
||||
|
||||
|
||||
const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
static const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
|
||||
static mduv3x0Calib_t calData; // Calibration data
|
||||
Band currRxBand = BND_NONE; // Current band for RX
|
||||
Band currTxBand = BND_NONE; // Current band for TX
|
||||
uint8_t txpwr_lo = 0; // APC voltage for TX output power control, low power
|
||||
uint8_t txpwr_hi = 0; // APC voltage for TX output power control, high power
|
||||
uint8_t rxModBias = 0; // VCXO bias for RX
|
||||
uint8_t txModBias = 0; // VCXO bias for TX
|
||||
static Band currRxBand = BND_NONE; // Current band for RX
|
||||
static Band currTxBand = BND_NONE; // Current band for TX
|
||||
static uint8_t txpwr_lo = 0; // APC voltage for TX output power control, low power
|
||||
static uint8_t txpwr_hi = 0; // APC voltage for TX output power control, high power
|
||||
static uint8_t rxModBias = 0; // VCXO bias for RX
|
||||
static uint8_t txModBias = 0; // VCXO bias for TX
|
||||
|
||||
enum opstatus radioStatus; // Current operating status
|
||||
static enum opstatus radioStatus; // Current operating status
|
||||
|
||||
HR_C6000& C6000 = HR_C6000::instance(); // HR_C5000 driver
|
||||
AT1846S& at1846s = AT1846S::instance(); // AT1846S driver
|
||||
static HR_C6000& C6000 = HR_C6000::instance(); // HR_C5000 driver
|
||||
static AT1846S& at1846s = AT1846S::instance(); // AT1846S driver
|
||||
|
||||
void radio_init(const rtxStatus_t *rtxState)
|
||||
{
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
#include "AT1846S.h"
|
||||
#include "SA8x8.h"
|
||||
|
||||
const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
static const rtxStatus_t *config; // Pointer to data structure with radio configuration
|
||||
|
||||
Band currRxBand = BND_NONE; // Current band for RX
|
||||
Band currTxBand = BND_NONE; // Current band for TX
|
||||
enum opstatus radioStatus; // Current operating status
|
||||
static Band currRxBand = BND_NONE; // Current band for RX
|
||||
static Band currTxBand = BND_NONE; // Current band for TX
|
||||
static enum opstatus radioStatus; // Current operating status
|
||||
|
||||
AT1846S& at1846s = AT1846S::instance(); // AT1846S driver
|
||||
static AT1846S& at1846s = AT1846S::instance(); // AT1846S driver
|
||||
|
||||
|
||||
void radio_init(const rtxStatus_t *rtxState)
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include <string.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
void *frameBuffer = NULL; /* Pointer to framebuffer */
|
||||
bool inProgress; /* Flag to signal when rendering is in progress */
|
||||
static void *frameBuffer = NULL; /* Pointer to framebuffer */
|
||||
static bool inProgress; /* Flag to signal when rendering is in progress */
|
||||
|
||||
/*
|
||||
* SDL main loop syncronization
|
||||
|
|
Ładowanie…
Reference in New Issue