diff --git a/stub.c b/stub.c new file mode 100644 index 0000000000000000000000000000000000000000..81c586f281bb41e62ccd97600c5c40e5b71185ab --- /dev/null +++ b/stub.c @@ -0,0 +1,27 @@ +#include "pico/stdlib.h" +#include "hardware/pio.h" +#include "ws2812.pio.h" + +#define IS_RGBW true +#define WS2812_PIN 28 + +#define BUTTON_1_PIN 20 +#define BUTTON_2_PIN 21 +#define BUTTON_3_PIN 22 + +static inline void put_pixel(uint32_t pixel_grb) { + pio_sm_put_blocking(pio0, 0, pixel_grb << 8u); +} + +static inline uint32_t urgb_u32(uint8_t r, uint8_t g, uint8_t b) { + return + ((uint32_t) (r) << 8) | + ((uint32_t) (g) << 16) | + (uint32_t) (b); +} + +int main() { + + // Write this method to make the 3 buttons toggle the ws2812 between red, green and blue + +} \ No newline at end of file