This driver requires a serial port, 2 output pins, and 1 input pin. It drives an ebyte E32 LoRa module. I tested so far with an E32-433T30D and an E32-868T20D. According to the datasheet, the differences between the modules are minor, but do check the datasheet: chapter 11 "E32 series" lists some differences. For example, E32-170T30D only supports baud rates up to 9.6k. Please report or PR if you find something that doesn't work.
```rust // aux: InputPin // m0: OutputPin // m1: OutputPin // serial: Serial port let ebyte = Ebyte::new(serial, aux, m0, m1, delay).unwrap(); let modeldata = ebyte.readmodeldata().unwrap(); let mut params = ebyte.readparameters().unwrap();
rprintln!("{:#?}", model_data); rprintln!("{:#?}", params);
params.air_rate = AirBaudRate::Bps300; params.channel = 23;
ebyte .set_parameters(¶ms, Persistence::Temporary) .unwrap();
let params = ebyte.read_parameters().unwrap(); rprintln!("{:#?}", params);
loop { delaytim5.delayms(5000u32); rprintln!("Sending it!"); ebyte.write_buffer(b"it").unwrap(); led.toggle(); } ```
clap::ValueEnum
for the enums inside ebyte_e32::parameters::Parameters
. This disables no_std
, but one can make nice CLIs and GUIs with this: ebyte-e32-ui