From 42a29169f0eda7403740b03795ca759fe76d6a8e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 11 Mar 2012 20:58:39 +1100 Subject: [PATCH] SITL: added pgm_read_byte_far() --- libraries/Desktop/include/avr/pgmspace.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/Desktop/include/avr/pgmspace.h b/libraries/Desktop/include/avr/pgmspace.h index dd13ee03a0..55bc8a5a16 100644 --- a/libraries/Desktop/include/avr/pgmspace.h +++ b/libraries/Desktop/include/avr/pgmspace.h @@ -36,6 +36,7 @@ extern char *strncpy_P(char *dest, PGM_P src, size_t n); extern void *memcpy_P(void *dest, PGM_P src, size_t n); static inline uint8_t pgm_read_byte(PGM_P s) { return (uint8_t)*s; } + static inline uint8_t pgm_read_byte_far(const void *s) { return *(const uint8_t *)s; } static inline uint16_t pgm_read_word(const void *s) { return *(const uint16_t *)s; } #define GETBYTE(flag, mask, pnt) ({ \