This commit is contained in:
kraus
2018-03-25 08:39:25 +02:00
parent dc4e0de61c
commit 7e711b0bc7
5 changed files with 21 additions and 10 deletions
+1 -1
View File
@@ -8,5 +8,5 @@ Description: https://github.com/olikraus/u8g2/wiki
Issue Tracker: https://github.com/olikraus/u8g2/issues
Download (2.22.6): https://github.com/olikraus/U8g2_Arduino/archive/master.zip
Download (2.22.7): https://github.com/olikraus/U8g2_Arduino/archive/master.zip
+1 -1
View File
@@ -1,5 +1,5 @@
name=U8g2
version=2.22.6
version=2.22.7
author=oliver <olikraus@gmail.com>
maintainer=oliver <olikraus@gmail.com>
sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1701, ST7565, ST7567, ST7588, ST75256, NT7534, IST3020, ST7920, LD7032, KS0108, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel.
+4 -4
View File
@@ -121,9 +121,9 @@ class U8G2 : public Print
u8g2_SetDisplayRotation(&u8g2, u8g2_cb); }
void begin(void) {
bool begin(void) {
/* note: call to u8x8_utf8_init is not required here, this is done in the setup procedures before */
initDisplay(); clearDisplay(); setPowerSave(0); }
initDisplay(); clearDisplay(); setPowerSave(0); return 1;}
void beginSimple(void) {
/* does not clear the display and does not wake up the display */
@@ -132,14 +132,14 @@ class U8G2 : public Print
#ifdef U8X8_USE_PINS
/* use U8X8_PIN_NONE if a pin is not required */
void begin(uint8_t menu_select_pin, uint8_t menu_next_pin, uint8_t menu_prev_pin, uint8_t menu_up_pin = U8X8_PIN_NONE, uint8_t menu_down_pin = U8X8_PIN_NONE, uint8_t menu_home_pin = U8X8_PIN_NONE) {
bool begin(uint8_t menu_select_pin, uint8_t menu_next_pin, uint8_t menu_prev_pin, uint8_t menu_up_pin = U8X8_PIN_NONE, uint8_t menu_down_pin = U8X8_PIN_NONE, uint8_t menu_home_pin = U8X8_PIN_NONE) {
setMenuSelectPin(menu_select_pin);
setMenuNextPin(menu_next_pin);
setMenuPrevPin(menu_prev_pin);
setMenuUpPin(menu_up_pin);
setMenuDownPin(menu_down_pin);
setMenuHomePin(menu_home_pin);
begin(); }
return begin(); }
#endif
/* u8g2 */
+13 -4
View File
@@ -191,19 +191,19 @@ class U8X8 : public Print
void setPowerSave(uint8_t is_enable) {
u8x8_SetPowerSave(&u8x8, is_enable); }
void begin(void) {
initDisplay(); clearDisplay(); setPowerSave(0); }
bool begin(void) {
initDisplay(); clearDisplay(); setPowerSave(0); return 1; }
#ifdef U8X8_USE_PINS
/* use U8X8_PIN_NONE if a pin is not required */
void begin(uint8_t menu_select_pin, uint8_t menu_next_pin, uint8_t menu_prev_pin, uint8_t menu_up_pin = U8X8_PIN_NONE, uint8_t menu_down_pin = U8X8_PIN_NONE, uint8_t menu_home_pin = U8X8_PIN_NONE) {
bool begin(uint8_t menu_select_pin, uint8_t menu_next_pin, uint8_t menu_prev_pin, uint8_t menu_up_pin = U8X8_PIN_NONE, uint8_t menu_down_pin = U8X8_PIN_NONE, uint8_t menu_home_pin = U8X8_PIN_NONE) {
setMenuSelectPin(menu_select_pin);
setMenuNextPin(menu_next_pin);
setMenuPrevPin(menu_prev_pin);
setMenuUpPin(menu_up_pin);
setMenuDownPin(menu_down_pin);
setMenuHomePin(menu_home_pin);
begin(); }
return begin(); }
#endif
void setFlipMode(uint8_t mode) {
@@ -230,6 +230,9 @@ class U8X8 : public Print
void draw2x2Glyph(uint8_t x, uint8_t y, uint8_t encoding) {
u8x8_Draw2x2Glyph(&u8x8, x, y, encoding); }
void draw1x2Glyph(uint8_t x, uint8_t y, uint8_t encoding) {
u8x8_Draw1x2Glyph(&u8x8, x, y, encoding); }
void drawString(uint8_t x, uint8_t y, const char *s) {
u8x8_DrawString(&u8x8, x, y, s); }
@@ -238,9 +241,15 @@ class U8X8 : public Print
void draw2x2String(uint8_t x, uint8_t y, const char *s) {
u8x8_Draw2x2String(&u8x8, x, y, s); }
void draw1x2String(uint8_t x, uint8_t y, const char *s) {
u8x8_Draw1x2String(&u8x8, x, y, s); }
void draw2x2UTF8(uint8_t x, uint8_t y, const char *s) {
u8x8_Draw2x2UTF8(&u8x8, x, y, s); }
void draw1x2UTF8(uint8_t x, uint8_t y, const char *s) {
u8x8_Draw1x2UTF8(&u8x8, x, y, s); }
uint8_t getUTF8Len(const char *s) {
return u8x8_GetUTF8Len(&u8x8, s); }
+2
View File
@@ -90,6 +90,7 @@ static const uint8_t u8x8_d_sh1106_72x40_flip0_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x0a1), /* segment remap a0/a1*/
U8X8_C(0x0c8), /* c0: scan dir normal, c8: reverse */
U8X8_CA(0x0d3, 12), /* display offset, 0.42 OLED */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_END() /* end of sequence */
};
@@ -98,6 +99,7 @@ static const uint8_t u8x8_d_sh1106_72x40_flip1_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x0a0), /* segment remap a0/a1*/
U8X8_C(0x0c0), /* c0: scan dir normal, c8: reverse */
U8X8_CA(0x0d3, 24), /* What is the correct offset in flip 1 mode? */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_END() /* end of sequence */
};