ubitx-v5d-xcvr/ubitx_iop/ubitx_iop.h
Rob French 519a208508 Fixes to get it running, working for the most part (currently using DGU
mode on 40 meter FT8, so it can't be all bad).  Filters added, although
not currently selectable (til I get the rotary encoder added).
2020-05-27 22:45:37 -05:00

73 lines
1.4 KiB
C

//======================================================================
// ubitx_iop.h
//======================================================================
#ifndef __ubitx_iop_h__
#define __ubitx_iop_h__
#include "config.h"
#include "audio.h"
#include "cat.h"
#include "eeprom.h"
#include "keyer.h"
#define PTT_KEY_OUT_PIN 2
// comment this out to disable debugging code
//#define DEBUG
#if defined(DEBUG)
#define USBDEBUG(x) USBSERIAL.print("IOP: "); USBSERIAL.println(x);
#else
#define USBDEBUG(x)
#endif
//enum RigMode {
// MODE_SSB = 0,
// MODE_DIGI = 1,
// MODE_CW = 2,
//};
enum TxState {
TX_OFF = 0,
TX_MIC,
TX_LINE,
TX_CAT,
TX_KEYER,
};
//extern RigMode rigMode;
extern bool keyerKeyDown;
//======================================================================
// Keying functions.
//
// These are simple functions to assert the key line from the IOP to the
// Raduino.
//======================================================================
inline void initKeyLine()
{
pinMode(PTT_KEY_OUT_PIN, OUTPUT);
digitalWrite(PTT_KEY_OUT_PIN, HIGH);
}
inline void setKeyDown()
{
digitalWrite(PTT_KEY_OUT_PIN, LOW);
}
inline void setKeyUp()
{
digitalWrite(PTT_KEY_OUT_PIN, HIGH);
}
//======================================================================
#endif
//======================================================================
// EOF
//======================================================================