Thanks very much for your feedback. I've looked, but I can't seem to find any reference to the function to which you refer.
FYI: I'm developing under Windows using VSCode, and my installation may be a bit old (hasn't been updated recently), though I don't think that should have much bearing on whether or not it should work...
Here is my initialization code, which seems to be complete based on the documentation I've seen so far:
I'm going through the SDK documentation to try to find references to the function you noted, but so far have found nothing...
Thanks also for your comments about the code - I'll leave the optimizations for the second pass. I just want to get the code working to start.
FYI: I'm developing under Windows using VSCode, and my installation may be a bit old (hasn't been updated recently), though I don't think that should have much bearing on whether or not it should work...
Here is my initialization code, which seems to be complete based on the documentation I've seen so far:
Code:
% c-sdk {// this is a raw helper function for use by the user which sets up the GPIO outputs, and configures the SM to output on specific pinsvoid pulse_gen_program_init(PIO pio, uint sm, uint offset, uint pin, uint pinCount) { for (int pCfg = pin; pCfg < pin + pinCount; pCfg++ ) pio_gpio_init(pio, pCfg); pio_sm_set_consecutive_pindirs(pio, sm, pin, pinCount, true); pio_sm_config c = pulse_gen_program_get_default_config(offset); sm_config_set_set_pins(&c, pin, pinCount); pio_sm_init(pio, sm, offset, &c);}%}
Thanks also for your comments about the code - I'll leave the optimizations for the second pass. I just want to get the code working to start.
Statistics: Posted by sdutempl — Tue Jun 25, 2024 3:41 am