diff options
-rw-r--r-- | drivers/oled/oled_driver.c | 3 | ||||
-rw-r--r-- | tmk_core/common/progmem.h | 11 |
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index cb50c38c4..ce5c23cc4 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c | |||
@@ -23,9 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
23 | #include <string.h> | 23 | #include <string.h> |
24 | 24 | ||
25 | #include "progmem.h" | 25 | #include "progmem.h" |
26 | #ifndef __AVR__ | ||
27 | # define memcpy_P(des, src, len) memcpy(des, src, len) | ||
28 | #endif | ||
29 | 26 | ||
30 | // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf | 27 | // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf |
31 | // for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf | 28 | // for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf |
diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index a06d0f940..be8485117 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h | |||
@@ -4,7 +4,12 @@ | |||
4 | # include <avr/pgmspace.h> | 4 | # include <avr/pgmspace.h> |
5 | #else | 5 | #else |
6 | # define PROGMEM | 6 | # define PROGMEM |
7 | # define pgm_read_byte(p) *((unsigned char*)(p)) | 7 | # define memcpy_P(dest, src, n) memcpy(dest, src, n) |
8 | # define pgm_read_word(p) *((uint16_t*)(p)) | 8 | # define pgm_read_byte(address_short) *((uint8_t*)(address_short)) |
9 | # define pgm_read_dword(p) *((uint32_t*)(p)) | 9 | # define pgm_read_word(address_short) *((uint16_t*)(address_short)) |
10 | # define pgm_read_dword(address_short) *((uint32_t*)(address_short)) | ||
11 | # define pgm_read_ptr(address_short) *((void*)(address_short)) | ||
12 | # define strcmp_P(s1, s2) strcmp(s1, s2) | ||
13 | # define strcpy_P(dest, src) strcpy(dest, src) | ||
14 | # define strlen_P(src) strlen(src) | ||
10 | #endif | 15 | #endif |