Hi
The project below is my first foray into embedded using rust.
It is a no-std library for interacting with the hx711 load cell amplifier IC (SparkFun Load Cell Amplifier - HX711 - SEN-13879 - SparkFun Electronics)
The library is meant to provide two modes: an interrupt based mode in which load cell readings are only read when they are ready, and a polling mode, where the main loop will need to ask the IC if it has data ready.
I much prefer interrupt based-code, but it was a struggle to interface it in here, and would love some guidance on how to re-structure it so that the library has more control of the IRQ routine, rather than the user needing to hold a mutex to the object, and then call read()
on it during the interrupt.
Also, of course I am looking for feedback that will guide me to be more idiomatically rusty.
The library is below:
Many thanks in advance.