Pico Led Controller 1.0.3
A project to control LEDs using Raspberry Pi Pico W
Loading...
Searching...
No Matches
led_controller.h
Go to the documentation of this file.
1#ifndef _LED_CONTROLLER_H
2#define _LED_CONTROLLER_H
3
4#include <stdint.h>
5#include <pico/stdlib.h>
6
7#include <pico/cyw43_arch.h>
8#include <pico/multicore.h>
9#include <boards/pico_w.h>
10#include <hardware/pio.h>
11#include <hardware/gpio.h>
12#include <hardware/clocks.h>
13#include <hardware/timer.h>
14
15#include "blink_codes.h"
16#include "ntp.h"
17
18#define WS2812_PIN 2
19#define LIGHT_TOGGLE_PIN 15
20#define MODE_BUTTON_PIN 16
21#define STOP_BUTTON_PIN 17
22#define IS_RGBW false
23#define DEBOUNCE_TIME_US 250000 // 250ms
24
28void connect_to_wifi();
29
33void gpio_button_irq_handler(uint gpio, uint32_t events);
34
44
50enum init_result_t init();
51
55void run_loop();
56
57#endif
void gpio_button_irq_handler(uint gpio, uint32_t events)
GPIO button interrupt handler.
init_result_t
Init result enum.
@ STDIO_INIT_FAILURE
@ WIFI_INIT_FAILURE
@ INIT_SUCCESS
void connect_to_wifi()
Connect to WiFi.
void run_loop()
Run loop.
enum init_result_t init()
Init.