small_morse

Crates.iosmall_morse
lib.rssmall_morse
version0.1.0
sourcesrc
created_at2020-06-17 18:27:38.505593
updated_at2020-06-17 18:27:38.505593
descriptionA simple, no_std morse code API
homepagehttps://github.com/mb64/small_morse
repositoryhttps://github.com/mb64/small_morse
max_upload_size
id254995
size15,970
Mark Barbone (mb64)

documentation

https://docs.rs/small_morse

README

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.

Commit count: 7

cargo fmt