It was really eye opening to me how much Rust’s language-level features (as opposed to std library features) really unlock the ability to do in an embedded/driver/kernel context with zero abstraction and overhead.
The most annoying part was making it generic over the MCU’s hardware. I ended up with function prototypes 20+ lines long with all the insidiously pervasive generic constraints tacked on a propagating everywhere but I think I would just rip those out and use &dyn instead as I don’t think it was worth the effort and hit to ergonomics it took to avoid the dynamic dispatch.
I asked around to see if anyone would be interested if I published the code at the time but didn’t really get any interest; I think I can still have it on my code server somewhere if someone would benefit from it.
[0]: at the time, these were the cheapest and most available with breakout boards going for a couple of dollars from the Chinese web. Adafruit has them for $10 but you can find them on the usual Asian sites for a dollar or two a piece, which is great because you can’t have too many!
———
Do note that there are a number of restrictions on how you can transmit on the ISM bands, which the LoRa transceivers use, at least in both the USA/Canada and EU. They notably do allow encrypted payloads, which isn’t allowed for a lot of the other free-for-all frequencies such as the HAM radio frequencies.