Sfoglia il codice sorgente

Fix pgmspace macros for printf_P functions

teensy4-core
PaulStoffregen 10 anni fa
parent
commit
6cacb912ae
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. +6
    -6
      teensy3/avr/pgmspace.h

+ 6
- 6
teensy3/avr/pgmspace.h Vedi File

@@ -45,12 +45,12 @@ typedef uint32_t prog_uint32_t;
#define strspn_P(str, chrs) strspn((str), (chrs))
#define strstr_P(a, b) strstr((a), (b))
#define sprintf_P(s, ...) sprintf((s), __VA_ARGS__)
#define vfprintf_P(s, ...) vfprintf((s), __VA_ARGS__)
#define printf_P(...) printf(__VA_ARGS__)
#define snprintf_P(s, n, ...) ((s), (n), __VA_ARGS__)
#define vsprintf_P(s, ...) ((s),__VA_ARGS__)
#define vsnprintf_P(s, n, ...) ((s), (n),__VA_ARGS__)
#define fprintf_P(s, ...) ((s), __VA_ARGS__)
#define vfprintf_P(fp, s, ...) vfprintf((fp), (s), __VA_ARGS__)
#define printf_P(f, ...) printf((f), __VA_ARGS__)
#define snprintf_P(s, n, f, ...) snprintf((s), (n), (f), __VA_ARGS__)
#define vsprintf_P(s, f, ...) vsprintf((s), (f), __VA_ARGS__)
#define vsnprintf_P(s, n, f, ...) vsnprintf((s), (n), (f), __VA_ARGS__)
#define fprintf_P(fp, f, ...) fprintf((fp), (f), __VA_ARGS__)

#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#define pgm_read_word(addr) (*(const unsigned short *)(addr))

Loading…
Annulla
Salva