Crates.io | small_morse |
lib.rs | small_morse |
version | 0.1.0 |
source | src |
created_at | 2020-06-17 18:27:38.505593 |
updated_at | 2020-06-17 18:27:38.505593 |
description | A simple, no_std morse code API |
homepage | https://github.com/mb64/small_morse |
repository | https://github.com/mb64/small_morse |
max_upload_size | |
id | 254995 |
size | 15,970 |
License: MIT
no_std
Iterator
-based interfaceThere are currently no plans to support decoding of Morse code.
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);
}
}
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.