You wouldn't believe this simple trick that freed 10 kB of RAM!

This commit is contained in:
2017-09-09 03:45:41 +02:00
parent 830ec073bf
commit 8d7419b666
9 changed files with 132 additions and 128 deletions
+2 -2
View File
@@ -760,7 +760,7 @@ do_csi_xterm_screen_cmd(CSI_Data *opts)
// data tables for the DECREPTPARM command response
struct DECREPTPARM_parity { int parity; const char * msg; };
static const struct DECREPTPARM_parity DECREPTPARM_parity_arr[] = {
static const struct DECREPTPARM_parity DECREPTPARM_parity_arr[] ESP_CONST_DATA = {
{PARITY_NONE, "1"},
{PARITY_ODD, "4"},
{PARITY_EVEN, "5"},
@@ -768,7 +768,7 @@ static const struct DECREPTPARM_parity DECREPTPARM_parity_arr[] = {
};
struct DECREPTPARM_baud { int baud; const char * msg; };
static const struct DECREPTPARM_baud DECREPTPARM_baud_arr[] = {
static const struct DECREPTPARM_baud DECREPTPARM_baud_arr[] ESP_CONST_DATA = {
{BIT_RATE_300, "48"},
{BIT_RATE_600, "56"},
{BIT_RATE_1200, "64"},
+3 -3
View File
@@ -12,7 +12,7 @@
#define CODEPAGE_A_BEGIN 35
#define CODEPAGE_A_END 35
static const u16 codepage_A[] =
static const u16 codepage_A[] ESP_CONST_DATA =
{// Unicode ASCII SYM
// %%BEGIN:A%%
0x20a4, // 35 # £
@@ -26,7 +26,7 @@ static const u16 codepage_A[] =
* translates VT100 ACS escape codes to Unicode values.
* Based on rxvt-unicode screen.C table.
*/
static const u16 codepage_0[] =
static const u16 codepage_0[] ESP_CONST_DATA =
{// Unicode ASCII SYM
// %%BEGIN:0%%
0x2666, // 96 ` ♦
@@ -66,7 +66,7 @@ static const u16 codepage_0[] =
#define CODEPAGE_1_BEGIN 33
#define CODEPAGE_1_END 126
static const u16 codepage_1[] =
static const u16 codepage_1[] ESP_CONST_DATA =
{// Unicode ASCII SYM DOS
// %%BEGIN:1%%
0x263A, // 33 ! ☺ (1) - low ASCII symbols from DOS, moved to +32
+1 -1
View File
@@ -22,7 +22,7 @@ static int wifiPassFn(HttpdConnData *connData, int no, char *user, int userLen,
/**
* Application routes
*/
HttpdBuiltInUrl routes[] = {
const HttpdBuiltInUrl routes[] ESP_CONST_DATA = {
// redirect func for the captive portal
ROUTE_CGI_ARG("*", cgiRedirectApClientToHostname, "esp-terminal.ap"),
+1 -1
View File
@@ -4,7 +4,7 @@
#include <esp8266.h>
#include <httpd.h>
extern HttpdBuiltInUrl routes[];
extern const HttpdBuiltInUrl routes[];
/** Broadcast screen state to sockets */
void screen_notifyChange();