morse_codec

Module encoder

source
Expand description

Morse code encoder to turn text into morse code text or signals.

The encoder takes &str literals or character bytes and turns them into a fixed length char array. Then client code can encode these characters to morse code either character by character, from slices, or all in one go.
Encoded morse code can be retrieved as morse character arrays ie. [‘.’,‘-’,‘.’] or Signal Duration Multipliers SDMArray to calculate individual signal durations by the client code.

This module is designed to be no_std compliant so it also should work on embedded platforms.

Structs§

Enums§

  • Signal Duration Multiplier can be 1x (short), 3x (long) or 7x (word space). SDM signals are either High, or Low which corresponds to electrically closed active signals or spaces inbetween them.

Type Aliases§

  • Signal Duration Multipliers are arrays of u8 values which can be used to multiply by a short signal duration constant to calculate durations of all signals in a letter or message. This makes it easier to write code that plays audio signals with lenghts of these durations or create visual representations of morse code.