|  | Pico Led Controller 1.0.3
                 A project to control LEDs using Raspberry Pi Pico W | 
#include "cgi.h"#include <stdio.h>#include "lwip/apps/httpd.h"#include "pico/cyw43_arch.h"#include "hardware/adc.h"#include "light_state.h"#include "blink.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. | |
| const char * | cgi_led_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI LED handler. | |
| const char * | cgi_led_mode_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI LED mode handler. | |
| const char * | cgi_led_color_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI LED color handler. | |
| const char * | cgi_led_brightness_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI LED strip brightness handler. | |
| const char * | cgi_favicon_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI favicon handler. | |
| const char * | cgi_m_icon_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI m icon handler. | |
| const char * | cgi_manifest_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI manifest handler. | |
| const char * | cgi_data_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI data handler. | |
| const char * | cgi_timestamp_handler (int iIndex, int iNumParams, char *pcParam[], char *pcValue[]) | 
| CGI timestamp handler. | |
| void | cgi_init () | 
| Initialize CGI handlers. | |
| 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 | 
Definition at line 277 of file cgi.c.
| 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 | 
Definition at line 259 of file cgi.c.
| 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.
Referenced by init().
| 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 | 
Definition at line 265 of file cgi.c.
| 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 | 
Definition at line 271 of file cgi.c.
| const char * cgi_onboard_led_handler | ( | int | iIndex, | 
| int | iNumParams, | ||
| char * | pcParam[], | ||
| char * | pcValue[] | ||
| ) | 
CGI onboard LED handler.
Function handles CGI requests for the onboard LED.
| iIndex | index of the CGI handler | 
| iNumParams | number of parameters | 
| pcParam | array of parameters | 
| pcValue | array of values | 
Definition at line 12 of file cgi.c.
| 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 | 
Definition at line 283 of file cgi.c.