mirror of https://github.com/ArduPilot/ardupilot
fastserial: allow vprintf() to build without assembler
This commit is contained in:
parent
88668dd2d1
commit
cb8f8ec083
|
@ -54,6 +54,15 @@ extern "C" {
|
||||||
#undef PSTR
|
#undef PSTR
|
||||||
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
|
#define PSTR(s) (__extension__({static prog_char __c[] PROGMEM = (s); &__c[0];}))
|
||||||
|
|
||||||
|
#if DESKTOP_BUILD
|
||||||
|
#define GETBYTE(flag, mask, pnt) ({ \
|
||||||
|
unsigned char __c; \
|
||||||
|
__c = ((flag) & (mask)) \
|
||||||
|
? pgm_read_byte(pnt) : *pnt; \
|
||||||
|
pnt++; \
|
||||||
|
__c; \
|
||||||
|
})
|
||||||
|
#else
|
||||||
#define GETBYTE(flag, mask, pnt) ({ \
|
#define GETBYTE(flag, mask, pnt) ({ \
|
||||||
unsigned char __c; \
|
unsigned char __c; \
|
||||||
asm ( \
|
asm ( \
|
||||||
|
@ -68,15 +77,7 @@ extern "C" {
|
||||||
); \
|
); \
|
||||||
__c; \
|
__c; \
|
||||||
})
|
})
|
||||||
/*
|
#endif
|
||||||
#define GETBYTE(flag, mask, pnt) ({ \
|
|
||||||
unsigned char __c; \
|
|
||||||
__c = ((flag) & (mask)) \
|
|
||||||
? pgm_read_byte(pnt) : *pnt; \
|
|
||||||
pnt++; \
|
|
||||||
__c; \
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define FL_ZFILL 0x01
|
#define FL_ZFILL 0x01
|
||||||
#define FL_PLUS 0x02
|
#define FL_PLUS 0x02
|
||||||
|
|
Loading…
Reference in New Issue