Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix compile errors on later avr-gcc compilers by making flash memory …

…variables const.
  • Loading branch information...
commit 097d4bac43b90f83d304226ad3afe95a0c71ca6c 1 parent dab6707
@tdicola tdicola authored
View
2  ST7565/ST7565.cpp
@@ -37,7 +37,7 @@ uint8_t is_reversed = 0;
const uint8_t pagemap[] = { 3, 2, 1, 0, 7, 6, 5, 4 };
// a 5x7 font table
-extern uint8_t PROGMEM font[];
+const extern uint8_t PROGMEM font[];
// the memory buffer for the LCD
uint8_t st7565_buffer[1024] = {
View
2  ST7565/examples/gol/gol.pde
@@ -20,7 +20,7 @@ ST7565 glcd(9, 8, 7, 6, 5);
#define LOGO16_GLCD_WIDTH 16
// a bitmap of a 16x16 fruit icon
-static unsigned char __attribute__ ((progmem)) logo16_glcd_bmp[]={
+const static unsigned char __attribute__ ((progmem)) logo16_glcd_bmp[]={
0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0xf8, 0xbe, 0x9f, 0xff, 0xf8, 0xc0, 0xc0, 0xc0, 0x80, 0x00,
0x20, 0x3c, 0x3f, 0x3f, 0x1f, 0x19, 0x1f, 0x7b, 0xfb, 0xfe, 0xfe, 0x07, 0x07, 0x07, 0x03, 0x00, };
View
2  ST7565/examples/st7565lcd/st7565lcd.pde
@@ -16,7 +16,7 @@ ST7565 glcd(9, 8, 7, 6, 5);
#define LOGO16_GLCD_WIDTH 16
// a bitmap of a 16x16 fruit icon
-static unsigned char __attribute__ ((progmem)) logo16_glcd_bmp[]={
+const static unsigned char __attribute__ ((progmem)) logo16_glcd_bmp[]={
0x30, 0xf0, 0xf0, 0xf0, 0xf0, 0x30, 0xf8, 0xbe, 0x9f, 0xff, 0xf8, 0xc0, 0xc0, 0xc0, 0x80, 0x00,
0x20, 0x3c, 0x3f, 0x3f, 0x1f, 0x19, 0x1f, 0x7b, 0xfb, 0xfe, 0xfe, 0x07, 0x07, 0x07, 0x03, 0x00, };
View
2  ST7565/glcdfont.c
@@ -3,7 +3,7 @@
#include <avr/io.h>
#include <avr/pgmspace.h>
-uint8_t font[] PROGMEM = {
+const uint8_t font[] PROGMEM = {
0x0, 0x0, 0x0, 0x0, 0x0, // Ascii 0
0x7C, 0xDA, 0xF2, 0xDA, 0x7C, //ASC(01)
0x7C, 0xD6, 0xF2, 0xD6, 0x7C, //ASC(02)
Please sign in to comment.
Something went wrong with that request. Please try again.