small_morse 0.1.0

A simple, no_std morse code API
Documentation
  • Coverage
  • 100%
    13 out of 13 items documented1 out of 2 items with examples
  • Size
  • Source code size: 15.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • mb64/small_morse
    6 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mb64

Morse code generation library for Rust

License: MIT

Features

  • Supports no_std
  • Easy Iterator-based interface
  • Letters, numbers, and punctuation all fully supported
  • Support for Farnsworth delays (longer delays between letters and words to help learn morse code)

There are currently no plans to support decoding of Morse code.

Example

fn wait_for(duration: u8) {
    // ...
}
fn beep_for(duration: u8) {
    // ...
}

for action in small_morse::encode("Hello in morse code!") {
    if action.state == small_morse::State::On {
        beep_for(action.duration);
    } else {
        wait_for(action.duration);
    }
}

Intended use

The natural extension to your simple embedded project of blinking an LED is to blink it in morse code. The goal of this library is to make it easy to emit morse code from any environment, and with any type of output.