Removing compiler warnings for progmem

This commit is contained in:
odewdney
2015-01-11 18:14:21 +00:00
parent 652895d656
commit 538859669d
7 changed files with 20 additions and 18 deletions

View File

@ -46,16 +46,17 @@
#if GCC_VERSION2 < 40602 // Test for GCC < 4.6.2
#ifdef PROGMEM
#undef PROGMEM
#define PROGMEM __attribute__((section(".progmem.data"))) // Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734#c4
#define MARLIN_PROGMEM __attribute__((section(".progmem.data")))
#ifdef PSTR
#undef PSTR
#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source
#define PSTR(s) (__extension__({static const prog_char __c[] MARLIN_PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source
#endif
#endif
#endif
#endif
#include "MarlinSerial.h"
#ifndef cbi