Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6289

SDK • Re: Difference between sm_config_set_out_pins() and pio_sm_set_out_pins()

$
0
0
However, I'm sort of confused on when or how you want to use pio_sm_set_out_pins(). Won't any registers set by pio_sm_set_out_pins() get blown away if you call pio_sm_init()?
Yes.

Normally, you want a series of sm_config_set_xxx() calls to set up the initial configuration (which the compiler will usually be able to magic away into a single instruction), followed by pio_sm_init() to use it.

However, sometimes you want to change the configuration while the SM is running, and that's when you want the pio_sm_set_xxx() functions.

Statistics: Posted by arg001 — Thu Dec 21, 2023 10:33 pm



Viewing all articles
Browse latest Browse all 6289

Latest Images

Trending Articles



Latest Images