Updated to whatever I was doing...

kc4upr
Rob French 9 months ago
parent 449cd17a7e
commit ed99cbe7d8
  1. 5
      ubitx_20/ubitx.h
  2. 25
      ubitx_20/ubitx_keyer.cpp

@ -214,7 +214,10 @@ extern byte I2C_LCD_SECOND_ADDRESS; //only using Dual LCD Mode
#define ENC_A (A0)
#define ENC_B (A1)
#define FBUTTON (A2)
#define PTT (A3)
#define PTT (A3) // 8?
#define DIGITAL_KEY (A3) // 8?
#define DIGITAL_DOT (12)
#define DIGITAL_DASH (11)
#define ANALOG_KEYER (A6)
#define ANALOG_SPARE (A7)
#define ANALOG_SMETER (A7) //by KD8CEC

@ -20,6 +20,8 @@ extern unsigned long sideTone;
extern int cwSpeed;
extern volatile bool inTx;
//extern volatile int ubitx_mode;
extern char isUSB;
extern char cwMode;
extern volatile unsigned char keyerControl;
extern volatile unsigned char keyerState;
@ -54,6 +56,18 @@ extern bool txCAT;
#define MODE_CWR 3
#define ubitx_mode (cwMode == 0 ? (isUSB == 0) : ((cwMode == 1) + 2))
/* KC4UPR: Temporary holding ground for definitions etc that may need to get moved to other files. */
//#define DIGITAL_PTT (A3)
//#define DIGITAL_DOT (D11)
//#define DIGITAL_DASH (D12)
/*
Arduino Pin MC Pin Interrupt Mask
A3/D17 PC3 PCINT[11] PCMSK1/bit 3
D11 PB3 PCINT[3] PCMSK0/bit 3
D12 PB4 PCINT[4] PCMSK0/bit 4
*/
/**
* Starts transmitting the carrier with the sidetone
* It assumes that we have called cwTxStart and not called cwTxStop
@ -271,7 +285,13 @@ ISR(TIMER1_OVF_vect) {
void Connect_Interrupts(void) {
keyerControl = 0;
cli();
PCMSK0 |- 0b00011000; // turn on dot/dash pins PB3/PB4, physical D11/D12
PCMSK1 |= 0b00001000; // turn on PTT and Handkey pin PC3, physical A3
PCICR |= 0b00000011; // turn on ports B and C
TIMSK1 |= (1<<TOIE1);
sei();
}
@ -334,8 +354,3 @@ void sendmsg(char *str) {
delay(650);
stopTx();
}

Loading…
Cancel
Save