hc12
Driver for the hc-12 radio transceiver serial module.
This module can be configured using AT commands while the SET pin is pulled low. This driver takes an OutputPin, Serial Port and DelayMs from embedded-hal and offers a somewhat convenient interface to interact with the hc12 module.
The driver uses type-state programming to discriminate between the operation states of the hc12: Idle, Sleeping, Configuration.
Datasheet: https://www.elecrow.com/download/HC-12.pdf
Example
let hc12 = new;
let mut hc12 = hc12.into_configuration_mode.debugless_unwrap;
let mut buffer = ;
let ok = hc12.is_ok;
assert!;
let version = hc12.get_version;
assert_eq!;
let params = hc12.get_parameters.unwrap;
assert_eq!;
let mut hc12 = hc12.into_normal_mode.debugless_unwrap;
hc12.write_buffer.unwrap;
let = hc12.release;
(^: see hc12::test::usage_from_readme)