Skip to content

Commit 37c407b

Browse files
committed
Patch from Landon Fuller adds const to PROGMEM, required for newer avr-gcc
1 parent 9096da2 commit 37c407b

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include <avr/eeprom.h>
22

33
/* Link layer ipv6 address will become fe80::2 */
4-
uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02};
5-
uint8_t default_server_name[16] PROGMEM = "huginn";
6-
uint8_t default_domain_name[30] PROGMEM = "localhost";
4+
const uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02};
5+
const uint8_t default_server_name[16] PROGMEM = "huginn";
6+
const uint8_t default_domain_name[30] PROGMEM = "localhost";
77
uint8_t eemem_mac_address[8] EEMEM = {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02};
88
uint8_t eemem_server_name[16] EEMEM = "huginn";
99
uint8_t eemem_domain_name[30] EEMEM = "localhost";
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include <avr/eeprom.h>
22

33
/* Link layer ipv6 address will become fe80::1 */
4-
uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
5-
uint8_t default_server_name[16] PROGMEM = "muninn";
6-
uint8_t default_domain_name[30] PROGMEM = "localhost";
4+
const uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
5+
const uint8_t default_server_name[16] PROGMEM = "muninn";
6+
const uint8_t default_domain_name[30] PROGMEM = "localhost";
77
uint8_t eemem_mac_address[8] EEMEM = {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
88
uint8_t eemem_server_name[16] EEMEM = "muninn";
99
uint8_t eemem_domain_name[30] EEMEM = "localhost";

platform/avr-atmega128rfa1/apps/raven-webserver/httpd-fs/makefsdata.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include <avr/eeprom.h>
22

33
/* Link layer ipv6 address will become fe80::ff:fe:1 */
4-
uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x01};
5-
uint8_t default_server_name[16] PROGMEM = "ATMEGA128rfa1";
6-
uint8_t default_domain_name[30] PROGMEM = "localhost";
4+
const uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x01};
5+
const uint8_t default_server_name[16] PROGMEM = "ATMEGA128rfa1";
6+
const uint8_t default_domain_name[30] PROGMEM = "localhost";
77
uint8_t eemem_mac_address[8] EEMEM = {0x02, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x01};
88
uint8_t eemem_server_name[16] EEMEM = "ATMEGA128rfa1";
99
uint8_t eemem_domain_name[30] EEMEM = "localhost";

platform/avr-atmega128rfa1/apps/raven-webserver/httpd-fsdata.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
/* Link layer ipv6 address will become fe80::ff:fe:1 */
7-
uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x01};
8-
uint8_t default_server_name[16] PROGMEM = "ATMEGA128rfa1";
9-
uint8_t default_domain_name[30] PROGMEM = "localhost";
7+
const uint8_t default_mac_address[8] PROGMEM = {0x02, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x01};
8+
const uint8_t default_server_name[16] PROGMEM = "ATMEGA128rfa1";
9+
const uint8_t default_domain_name[30] PROGMEM = "localhost";
1010
uint8_t eemem_mac_address[8] EEMEM = {0x02, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x01};
1111
uint8_t eemem_server_name[16] EEMEM = "ATMEGA128rfa1";
1212
uint8_t eemem_domain_name[30] EEMEM = "localhost";

platform/avr-raven/apps/raven-webserver/httpd-fs/makefsdata.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include <avr/eeprom.h>
22

33
/* Link layer ipv6 address will become fe80::11:22ff:fe33:4455 */
4-
uint8_t default_mac_address[8] PROGMEM = {0x02, 0x11, 0x22, 0xff, 0xfe, 0x33, 0x44, 0x55};
5-
uint8_t default_server_name[16] PROGMEM = "Contiki-Raven";
6-
uint8_t default_domain_name[30] PROGMEM = "localhost";
4+
const uint8_t default_mac_address[8] PROGMEM = {0x02, 0x11, 0x22, 0xff, 0xfe, 0x33, 0x44, 0x55};
5+
const uint8_t default_server_name[16] PROGMEM = "Contiki-Raven";
6+
const uint8_t default_domain_name[30] PROGMEM = "localhost";
77
uint8_t eemem_mac_address[8] EEMEM = {0x02, 0x11, 0x22, 0xff, 0xfe, 0x33, 0x44, 0x55};
88
uint8_t eemem_server_name[16] EEMEM = "Contiki-Raven";
99
uint8_t eemem_domain_name[30] EEMEM = "localhost";

platform/avr-raven/apps/raven-webserver/httpd.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ generate_header(void *hstr)
307307
#endif
308308
}
309309
/*---------------------------------------------------------------------------*/
310-
char http_htm[10] PROGMEM ="text/html";
311-
char http_css[ 9] PROGMEM ="text/css";
312310
const char httpd_mime_htm[] HTTPD_STRING_ATTR = "text/html";
313311
const char httpd_mime_css[] HTTPD_STRING_ATTR = "text/css";
314312
const char httpd_mime_png[] HTTPD_STRING_ATTR = "image/png";

0 commit comments

Comments
 (0)