Skip to content

Commit

Permalink
Add PIO versioning for WS2812 and WS2812 parallel programs; comment o…
Browse files Browse the repository at this point in the history
…ut NeoPicoLEDAddon loading
  • Loading branch information
Fortinbra committed Jan 4, 2025
1 parent be13ff7 commit 4dcb01e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions lib/NeoPico/src/generated/ws2812.pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#define ws2812_wrap_target 0
#define ws2812_wrap 3
#define ws2812_pio_version 0

#define ws2812_T1 2
#define ws2812_T2 5
Expand All @@ -33,6 +34,10 @@ static const struct pio_program ws2812_program = {
.instructions = ws2812_program_instructions,
.length = 4,
.origin = -1,
.pio_version = ws2812_pio_version,
#if PICO_PIO_VERSION > 0
.used_gpio_ranges = 0x0
#endif
};

static inline pio_sm_config ws2812_program_get_default_config(uint offset) {
Expand Down Expand Up @@ -65,6 +70,7 @@ static inline void ws2812_program_init(PIO pio, uint sm, uint offset, uint pin,

#define ws2812_parallel_wrap_target 0
#define ws2812_parallel_wrap 3
#define ws2812_parallel_pio_version 0

#define ws2812_parallel_T1 2
#define ws2812_parallel_T2 5
Expand All @@ -84,6 +90,10 @@ static const struct pio_program ws2812_parallel_program = {
.instructions = ws2812_parallel_program_instructions,
.length = 4,
.origin = -1,
.pio_version = ws2812_parallel_pio_version,
#if PICO_PIO_VERSION > 0
.used_gpio_ranges = 0x0
#endif
};

static inline pio_sm_config ws2812_parallel_program_get_default_config(uint offset) {
Expand Down
2 changes: 1 addition & 1 deletion src/gp2040aux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void GP2040Aux::setup() {

// Setup Add-ons
addons.LoadAddon(new DisplayAddon(), CORE1_LOOP);
addons.LoadAddon(new NeoPicoLEDAddon(), CORE1_LOOP);
// addons.LoadAddon(new NeoPicoLEDAddon(), CORE1_LOOP);
addons.LoadAddon(new PlayerLEDAddon(), CORE1_LOOP);
addons.LoadAddon(new BoardLedAddon(), CORE1_LOOP);
addons.LoadAddon(new BuzzerSpeakerAddon(), CORE1_LOOP);
Expand Down

0 comments on commit 4dcb01e

Please sign in to comment.