endail / hx711-pico-c

Implementation of single and multiple HX711 use via RP2040's state machine
https://endail.github.io/hx711-pico-c/
MIT License
35 stars 7 forks source link

Can these PIO/SM funcs be condensed into one? #43

Closed endail closed 1 year ago

endail commented 1 year ago

https://github.com/endail/hx711-pico-c/blob/1b634c3bd4e65b52ca3437721fa77f1268befcc8/src/hx711.c#L91-L103

ie. does removing a program also stop and unclaim it? It would seem obvious enough that it does.

endail commented 1 year ago

https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/hardware_pio/include/hardware/pio.h#L546-L550

https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/hardware_pio/pio.c#L39-L43

https://github.com/raspberrypi/pico-sdk/blob/master/src/rp2_common/hardware_pio/pio.c#L134-L141

endail commented 1 year ago

When using multiple state machines to one PIO program, the answer is no.