aboutsummaryrefslogtreecommitdiffstats
path: root/src/fsm/cw.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fsm/cw.h')
-rw-r--r--src/fsm/cw.h68
1 files changed, 5 insertions, 63 deletions
diff --git a/src/fsm/cw.h b/src/fsm/cw.h
index 3c09441..0cbb29c 100644
--- a/src/fsm/cw.h
+++ b/src/fsm/cw.h
@@ -22,6 +22,9 @@
* SOFTWARE.
*/
+#ifndef __CW_H_
+#define __CW_H_
+
#include <stdint.h>
#include <stddef.h>
@@ -37,69 +40,8 @@ void cw_push_message(const char* text, int dit_duration, int frequency);
// Write the waveform into the buffer (stereo)
size_t cw_fill_buffer(int16_t *buf, size_t bufsize);
-// Return 1 if the CW generator has completed transmission
+// Return 1 if the CW generator is running
int cw_busy(void);
-const uint8_t cw_mapping[60] = { // {{{
- // Read bits from right to left
-
- 0b110101, //+ ASCII 43
- 0b110101, //, ASCII 44
- 0b1011110, //- ASCII 45
-
- 0b1010101, //., ASCII 46
- 0b110110, // / ASCII 47
-
- 0b100000, // 0, ASCII 48
- 0b100001, // 1
- 0b100011,
- 0b100111,
- 0b101111,
- 0b111111,
- 0b111110,
- 0b111100,
- 0b111000,
- 0b110000, // 9, ASCII 57
-
- // The following are mostly invalid, but
- // required to fill the gap in ASCII between
- // numerals and capital letters
- 0b10, // :
- 0b10, // ;
- 0b10, // <
- 0b10, // =
- 0b10, // >
- 0b1110011, // ?
- 0b1101001, //@
-
- 0b101, // A ASCII 65
- 0b11110,
- 0b11010,
- 0b1110,
- 0b11,
- 0b11011,
- 0b1100,
- 0b11111,
- 0b111,
- 0b10001,
- 0b1010,
- 0b11101,
- 0b100, //M
- 0b110,
- 0b1000,
- 0b11001,
- 0b10100,
- 0b1101,
- 0b1111,
- 0b10,
- 0b1011,
- 0b10111,
- 0b1001,
- 0b10110,
- 0b10010,
- 0b11100, // Z
-
- 0b101010, //Start, ASCII [
- 0b1010111, // SK , ASCII '\'
-}; //}}}
+#endif // __CW_H_