ubitx-v5x/TeensyDSP/TeensyDSP.h

66 lines
1.9 KiB
C
Raw Normal View History

2018-08-03 22:23:20 -04:00
/*
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 "Nextion.h"
#include "Sensors.h"
#include "TR.h"
2018-08-03 22:23:20 -04:00
//================================================================
//COMMUNICATION SECTION
//================================================================
//================================================================
// FFT and Decode Morse
2018-08-03 22:23:20 -04:00
//================================================================
2018-08-03 22:23:20 -04:00
#define FFTSIZE 64
#define SAMPLE_FREQUENCY 6000
2018-08-03 22:23:20 -04:00
#define SAMPLESIZE (FFTSIZE * 2)
#define DECODE_MORSE_SAMPLESIZE 48
extern uint8_t cwDecodeHz;
extern int magnitudelimit_low;
//================================================================
// EEPROM Section
2018-08-03 22:23:20 -04:00
//================================================================
2018-08-03 22:23:20 -04:00
#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
2018-08-03 22:23:20 -04:00
//================================================================
2018-08-03 22:23:20 -04:00
//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