mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
A better workaround for the PSTR warning bug. This seems to work correctly.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@919 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
2dfb44907f
commit
aa2bbe9131
@ -14,6 +14,12 @@
|
||||
//
|
||||
#include <FastSerial.h>
|
||||
|
||||
#undef PROGMEM
|
||||
#define PROGMEM __attribute__(( section(".progmem.data") ))
|
||||
|
||||
#undef PSTR
|
||||
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
|
||||
|
||||
//
|
||||
// Create a FastSerial driver that looks just like the stock Arduino
|
||||
// driver.
|
||||
|
@ -48,6 +48,12 @@ extern "C" {
|
||||
#include "xtoa_fast.h"
|
||||
}
|
||||
|
||||
// workaround for GCC bug c++/34734
|
||||
#undef PROGMEM
|
||||
#define PROGMEM __attribute__(( section(".progmem.data") ))
|
||||
#undef PSTR
|
||||
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
|
||||
|
||||
#define GETBYTE(flag, mask, pnt) ({ \
|
||||
unsigned char __c; \
|
||||
asm ( \
|
||||
|
Loading…
Reference in New Issue
Block a user