Expand description
Rust library for live decoding and encoding of morse code messages. Supports multiple embedded devices and operating systems by being no_std.
You can create messages by sending individual high and low signals in milliseconds to decoder, from the keyboard, mouse clicks, or a button connected to some embedded device.
Use the encoder to turn your messages or characters into morse code strings or create a sequence of signals from the encoder to drive an external component such as an LED, step motor or speaker.
§Features
- Decoder
- Encoder
UTF-8 is not supported at the moment, but can be implemented behind a feature flag in the future.
The lib is no_std outside testing to make sure it will work on embedded devices as well as operating systems.
Modules§
- Live decoder for morse code that converts morse code to ASCII characters. Supports real-time decoding of incoming signals and decoding prepared morse signals.
- Morse code encoder to turn text into morse code text or signals.
- Message struct to hold decoded message or message to be encoded.
Enums§
- Building block of morse characters.
Constants§
- Maximum number of characters in a mapping set of morse code to letters.
- If a decoding error happens, we put this character as a placeholder.
- Default international morse code characters. It includes English language letters, numbers and punctuation marks.
- We use this character to fill message arrays so when we encounter this char it actually means there’s no character there.
- Char version of the FILLER_BYTE coz why not? It’s mainly used while generating bytes from &str slices. A char which is utf-8 by default in Rust, can be more than one byte, turning chars into bytes if they’re ascii makes the code stable.
- Internal representation of morse characters. It’s an array of length CHARACTER_SET_LENGTH.
- This corresponds to empty character ’ ’ which is the default character
Type Aliases§
- Client code can use this type to construct a different character mapping to morse code and construct the decoder or encoder with this custom character set.