Closed adoble closed 2 years ago
It is intended to return a ProgramWithDefines. The examples which use pio_asm!
use program.program
. I'm not sure there is really any issue here, you changed the API you were calling so you had to change your code to match it.
Thanks for the quick answer.
I guess I was assuming from the README
that the pio_asm!
macro was a drop in substitute for the assemble*
function. Maybe it just is really a case for making the docs clearer here. If you want me to do this, just let me know.
The PIO examples in
rp-rs/rp-hal/rp2040-hal
tend to use the following "pattern" to install the PIO program:Based on my understanding of the
README
file, I tried to repeat this pattern, but instead used thepio_asm!
macro, i.e.:However, I got the following error:
I managed to get it to compile (and load on the RP2040), by changing the installation line to:
I'm not sure if this just requires a change to the
README
or the code needs to be changed to return theProgram
struct instead ofProgramWithDefines
(or maybe I've missed something).