fix(B&W): Avoid having constants in SRAM (#2993)
fix constness to avoid having constants in data segment .... and thus free some precious RAM
This commit is contained in:
@@ -210,7 +210,7 @@ void title(const char * s);
|
||||
|
||||
typedef int choice_t;
|
||||
|
||||
choice_t editChoice(coord_t x, coord_t y, const char *label, const char** values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable = nullptr);
|
||||
choice_t editChoice(coord_t x, coord_t y, const char *label, const char* const* values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable = nullptr);
|
||||
uint8_t editCheckBox(uint8_t value, coord_t x, coord_t y, const char *label, LcdFlags attr, event_t event);
|
||||
swsrc_t editSwitch(coord_t x, coord_t y, swsrc_t value, LcdFlags attr, event_t event);
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ void lcdDrawTextAlignedLeft(coord_t y, const char * s)
|
||||
}
|
||||
|
||||
#if !defined(BOOT)
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char** s,uint8_t idx, LcdFlags flags)
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char *const *s,uint8_t idx, LcdFlags flags)
|
||||
{
|
||||
lcdDrawSizedText(x, y, s[idx], UINT8_MAX, flags);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ void lcdDrawChar(coord_t x, coord_t y, uint8_t c);
|
||||
void lcdDrawChar(coord_t x, coord_t y, uint8_t c, LcdFlags mode);
|
||||
void lcdDrawCenteredText(coord_t y, const char * s, LcdFlags flags = 0);
|
||||
void lcdDrawText(coord_t x, coord_t y, const char * s, LcdFlags mode);
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char** s,uint8_t idx, LcdFlags mode);
|
||||
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char *const *s,uint8_t idx, LcdFlags mode);
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len, LcdFlags mode);
|
||||
void lcdDrawText(coord_t x, coord_t y, const char * s);
|
||||
void lcdDrawSizedText(coord_t x, coord_t y, const char * s, unsigned char len);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#if defined(SPLASH)
|
||||
#define MAXIMUM_SPLASH_IMAGE_SIZE 3072
|
||||
struct {
|
||||
const struct {
|
||||
const uint8_t __magic_prefix[4] = { 'S','P','S',0 };
|
||||
const uint8_t splashdata[MAXIMUM_SPLASH_IMAGE_SIZE] = {
|
||||
#include "bitmaps/212x64/splash.lbm"
|
||||
|
||||
@@ -82,7 +82,7 @@ void title(const char * s)
|
||||
lcdDrawText(0, 0, s, INVERS);
|
||||
}
|
||||
|
||||
choice_t editChoice(coord_t x, coord_t y, const char * label, const char** values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable)
|
||||
choice_t editChoice(coord_t x, coord_t y, const char * label, const char* const* values, choice_t value, choice_t min, choice_t max, LcdFlags attr, event_t event, IsValueAvailable isValueAvailable)
|
||||
{
|
||||
if (label) {
|
||||
drawFieldLabel(x, y, label);
|
||||
|
||||
Reference in New Issue
Block a user