Initial commit of base code

This commit is contained in:
2025-05-28 18:16:00 -04:00
commit 65cb6080de
22 changed files with 3852 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#ifndef SERVER_H_
#define SERVER_H_
#include "lwip/ip4_addr.h"
#define STARTFILE 0x7fc6
#define ENDFILE 0x0464
#define DEFAULTHOST "picokb"
#define DEFAULTPASS "password"
typedef struct {
uint16_t header;
char ssid[32+1];
char pass[63+1];
char host[63+1];
bool manual;
ip4_addr_t ip;
ip4_addr_t mask;
ip4_addr_t gw;
uint16_t footer;
} net_config;
void run_http_server();
const char * sendkeys_cgi(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]);
const char * save_wifi(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]);
const char * reboot_cgi(int iIndex, int iNumParams, char *pcParam[], char *pcValue[]);
uint16_t __time_critical_func(ssi_handler)(int iIndex, char *pcInsert, int iInsertLen);
void set_indicator(uint8_t const* buffer);
void urldecode(char *urlstring, char *dest);
bool net_config_load(net_config *wifi);
void net_config_write(net_config *wifi);
#define FLASH_TARGET_OFFSET ((PICO_FLASH_SIZE_BYTES) - FLASH_SECTOR_SIZE)
#endif