-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMorseEncoder.h
64 lines (41 loc) · 1.2 KB
/
MorseEncoder.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*++
ITU R-REC-M.1677-1-200910 Morse Encoder
This code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
Description:
ITU R-REC-M.1677-1-200910 International Morse Encoder, as described in
https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1677-1-200910-I!!PDF-E.pdf
Author:
Axel Rietschin - June 27, 2020
Environment:
Any
--*/
#pragma once
//
// Environment-dependent functions supplied by the user
//
extern inline int
MorseEncoder_GetBaseTimeUnitMs();
extern void
MorseEncoder_SetSignalState(int state, int pauseDurationMs);
//
// API functions
//
void
MorseEncoder_TransmitStartOfMessageSymbol();
int
MorseEncoder_TransmitSymbol(int c);
void
MorseEncoder_TransmitString(const char* string);
void
MorseEncoder_TransmitEndOfMessageSymbol();
void
MorseEncoder_TransmitErrorSymbol();
void
MorseEncoder_TransmitUnderstoodSymbol();
void
MorseEncoder_TransmitWaitSymbol();
void
MorseEncoder_TransmitClearToSendSymbol();