AP_Progmem_AVR: prog_char typedef was deprecated in avr-gcc 4.7, add compat def
This commit is contained in:
parent
3e3c0f57ae
commit
6ea38432b9
@ -16,8 +16,12 @@ typedef struct {
|
||||
#define PROGMEM __attribute__(( section(".progmem.data") ))
|
||||
|
||||
#undef PSTR
|
||||
/* need to define prog_char in avr-gcc 4.7 */
|
||||
#if __AVR__ && __GNUC__ == 4 && __GNUC_MINOR__ > 6
|
||||
typedef char prog_char;
|
||||
#endif
|
||||
/* Need const type for progmem - new for avr-gcc 4.6 */
|
||||
#if __AVR__ && __GNUC__ == 4 && __GNUC_MINOR__ > 5
|
||||
#if __AVR__ && __GNUC__ == 4 && __GNUC_MINOR__ > 5
|
||||
#define PSTR(s) (__extension__({static const prog_char __c[] PROGMEM = (s); \
|
||||
(const prog_char_t *)&__c[0]; }))
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user