![]() |
Pico Led Controller 1.0.3
A project to control LEDs using Raspberry Pi Pico W
|
#include <stdio.h>
#include "lwip/apps/httpd.h"
Go to the source code of this file.
Functions | |
const char * | cgi_onboard_led_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI onboard LED handler. More... | |
const char * | cgi_led_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI LED handler. More... | |
const char * | cgi_led_mode_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI LED mode handler. More... | |
const char * | cgi_led_color_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI LED color handler. More... | |
const char * | cgi_led_brightness_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI LED strip brightness handler. More... | |
const char * | cgi_favicon_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI favicon handler. More... | |
const char * | cgi_m_icon_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI m icon handler. More... | |
const char * | cgi_manifest_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI manifest handler. More... | |
const char * | cgi_data_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI data handler. More... | |
const char * | cgi_timestamp_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) |
CGI timestamp handler. More... | |
void | cgi_init () |
Initialize CGI handlers. More... | |
Variables | |
static const tCGI | cgi_handlers [] |
CGI handlers. More... | |
const char* cgi_data_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI data handler.
Function handles CGI requests for the data.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
const char* cgi_favicon_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI favicon handler.
Function handles CGI requests for the favicon.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
void cgi_init | ( | ) |
Initialize CGI handlers.
Function initializes the CGI handling and respective handlers.
Definition at line 289 of file cgi.c.
References cgi_handlers.
const char* cgi_led_brightness_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI LED strip brightness handler.
Function handles CGI requests for the LED strip brightness change.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
Definition at line 220 of file cgi.c.
References light_state_t::brightness, light_state_t::color, light_state_t::light_mode, light_state, MODE_STATIC, NUM_PIXELS, light_state_t::previous_brightness, set_light_color(), light_state_t::state, and turn_off_all().
const char* cgi_led_color_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI LED color handler.
Function handles CGI requests for the LED strip color.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
Definition at line 134 of file cgi.c.
References COLOR_BLUE, COLOR_CYAN, COLOR_GREEN, COLOR_MAGENTA, COLOR_ORANGE, COLOR_PINK, COLOR_PURPLE, COLOR_RED, COLOR_TURQUOISE, COLOR_WHITE, COLOR_YELLOW, light_state, set_light_color(), and light_state_t::state.
const char* cgi_led_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI LED handler.
Function handles CGI requests for the LED strip.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
Definition at line 39 of file cgi.c.
References light_state_t::brightness, light_state, NUM_PIXELS, light_state_t::previous_brightness, light_state_t::state, toggle_light_state(), and turn_off_all().
const char* cgi_led_mode_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI LED mode handler.
Function handles CGI requests for the LED strip mode.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
Definition at line 69 of file cgi.c.
References light_state, MODE_BREATHING, MODE_FADE, MODE_FLASHING, MODE_LOADING, MODE_RAINBOW_CYCLE, MODE_RAINBOW_WHEEL, MODE_STATIC, MODE_WAVE, set_light_mode(), and light_state_t::state.
const char* cgi_m_icon_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI m icon handler.
Function handles CGI requests for the m icon.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
const char* cgi_manifest_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI manifest handler.
Function handles CGI requests for the manifest.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
const char* cgi_onboard_led_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
const char* cgi_timestamp_handler | ( | int | iIndex, |
int | iNumParams, | ||
char * | pcParam[], | ||
char * | pcValue[] | ||
) |
CGI timestamp handler.
Function handles CGI requests for the timestamp.
iIndex | index of the CGI handler |
iNumParams | number of parameters |
pcParam | array of parameters |
pcValue | array of values |
|
static |
CGI handlers.
Array of CGI handlers with endpoint and handler function.
Definition at line 120 of file cgi.h.
Referenced by cgi_init().