ubitx-v5x/TeensyDSP/TeensyDSP.h

76 lines
2.2 KiB
C

/*
Configuration file for Nextion LCD and Control MCU
The parameter can be set according to the CPU used.
KD8CEC, Ian Lee
-----------------------------------------------------------------------
**********************************************************************/
#include <Arduino.h>
#include "Debug.h"
#include "DSP.h"
#include "Keyer.h"
#include "Nextion.h"
#include "Rig.h"
#include "RigState.h"
#include "Sensors.h"
#include "TR.h"
#include "TS590.h"
//================================================================
//COMMUNICATION SECTION
//================================================================
//================================================================
// FFT and Decode Morse
//================================================================
#define FFTSIZE 64
#define SAMPLE_FREQUENCY 6000
#define SAMPLESIZE (FFTSIZE * 2)
#define DECODE_MORSE_SAMPLESIZE 48
extern uint8_t cwDecodeHz;
extern int magnitudelimit_low;
//================================================================
// EEPROM Section
//================================================================
#define MAX_FORWARD_BUFF_LENGTH 128
#define EEPROM_DSPTYPE 100
#define EEPROM_SMETER_UART 111
#define EEPROM_SMETER_TIME 112
#define EEPROM_CW_FREQ 120
//#define EEPROM_CW_MAG_LIMIT 121
#define EEPROM_CW_MAG_LOW 122
#define EEPROM_CW_NBTIME 126
#define EEPROM_RTTYDECODEHZ 130
//================================================================
// DEFINE for I2C Command
//================================================================
//S-Meter Address
#define I2CMETER_ADDR 0x58 //changed from 0x6A
//VALUE TYPE============================================
//Signal
#define I2CMETER_CALCS 0x59 //Calculated Signal Meter
#define I2CMETER_UNCALCS 0x58 //Uncalculated Signal Meter
//Power
#define I2CMETER_CALCP 0x57 //Calculated Power Meter
#define I2CMETER_UNCALCP 0x56 //UnCalculated Power Meter
//SWR
#define I2CMETER_CALCR 0x55 //Calculated SWR Meter
#define I2CMETER_UNCALCR 0x54 //Uncalculated SWR Meter
// Raduino<=>TeensyDSP data exchange
#define I2CMETER_RIGINF 0x50
// Raduino requests any CAT updates from TeensyDSP
//#define I2CMETER_REQCAT 0x51