This commit is contained in:
olikraus 2017-01-18 23:32:44 +01:00
parent 408366876e
commit 770fe6c89a
3 changed files with 18 additions and 2 deletions

View File

@ -149,6 +149,15 @@ extern "C" {
# define U8X8_PROGMEM PROGMEM
#endif
#if defined(ESP8266)
uint8_t u8x8_pgm_read_esp(const uint8_t * addr); /* u8x8_8x8.c */
# define U8X8_FONT_SECTION(name) __attribute__((section(".text." name)))
# define u8x8_pgm_read(adr) u8x8_pgm_read_esp(adr)
# define U8X8_PROGMEM
#endif
#ifndef U8X8_FONT_SECTION
# define U8X8_FONT_SECTION(name)
#endif

View File

@ -37,7 +37,14 @@
#include "u8x8.h"
#if defined(ESP8266)
uint8_t u8x8_pgm_read_esp(const uint8_t * addr)
{
uint32_t bytes;
bytes = *(uint32_t*)((uint32_t)addr & ~3);
return ((uint8_t*)&bytes)[(uint32_t)addr & 3];
}
#endif
void u8x8_SetFont(u8x8_t *u8x8, const uint8_t *font_8x8)

View File

@ -1,2 +1,2 @@
# without 'v' prefix
echo -n "2.12.6"
echo -n "2.13.0"