vail-adapter/keyers.h

31 lines
649 B
C
Raw Normal View History

2022-05-22 21:55:22 -06:00
#pragma once
#define MAX_KEYER_QUEUE 5
typedef enum {
PADDLE_DIT = 0,
2022-05-28 15:18:28 -06:00
PADDLE_DAH = 1,
2022-05-22 21:55:22 -06:00
PADDLE_STRAIGHT,
} Paddle;
class Transmitter {
public:
virtual void BeginTx();
virtual void EndTx();
};
class Keyer {
public:
2022-05-28 15:18:28 -06:00
virtual void SetOutput(Transmitter *output);
2022-05-22 21:55:22 -06:00
virtual void Reset();
2022-06-26 10:55:28 -06:00
virtual void SetDitDuration(unsigned int d);
2022-05-22 21:55:22 -06:00
virtual void Release();
virtual bool TxClosed();
virtual bool TxClosed(int relay);
virtual void Tx(int relay, bool closed);
virtual void Key(Paddle key, bool pressed);
virtual void Tick(unsigned int millis);
};
Keyer *GetKeyerByNumber(int n, Transmitter *output);