Merge pull request #1350 from odewdney/Development
Reduce PROGMEM warnings
This commit is contained in:
@ -41,6 +41,25 @@
|
||||
#include "HardwareSerial.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef GCC_VERSION2
|
||||
#define GCC_VERSION2 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
||||
#endif
|
||||
|
||||
#if GCC_VERSION2 < 40602 // Test for GCC < 4.6.2
|
||||
#ifdef PROGMEM
|
||||
#define MARLIN_PROGMEM __attribute__((section(".progmem.data")))
|
||||
#ifdef PSTR
|
||||
#undef PSTR
|
||||
#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
|
||||
|
Reference in New Issue
Block a user