Browse Source

fixed PROGMEM declaration for desktop build

master
Andrew Tridgell 14 years ago
parent
commit
28ebca1bf6
  1. 6
      libraries/AP_Common/AP_Common.h

6
libraries/AP_Common/AP_Common.h

@ -77,8 +77,14 @@ typedef struct {
// has an equivalent effect but avoids the warnings, which otherwise // has an equivalent effect but avoids the warnings, which otherwise
// make finding real issues difficult. // make finding real issues difficult.
// //
#if DESKTOP_BUILD
# undef PROGMEM
# define PROGMEM __attribute__(())
#else
# undef PROGMEM # undef PROGMEM
# define PROGMEM __attribute__(( section(".progmem.data") )) # define PROGMEM __attribute__(( section(".progmem.data") ))
#endif
# undef PSTR # undef PSTR
# define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); \ # define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); \
(prog_char_t *)&__c[0];})) (prog_char_t *)&__c[0];}))

Loading…
Cancel
Save