Skip to content

Commit

Permalink
2.28.6
Browse files Browse the repository at this point in the history
  • Loading branch information
olikraus committed Apr 25, 2020
1 parent 2dad9c0 commit 1a8cb8d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Description: https://github.com/olikraus/u8g2/wiki

Issue Tracker: https://github.com/olikraus/u8g2/issues

Download (2.28.5): https://github.com/olikraus/U8g2_Arduino/archive/master.zip
Download (2.28.6): https://github.com/olikraus/U8g2_Arduino/archive/master.zip

2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=U8g2
version=2.28.5
version=2.28.6
author=oliver <olikraus@gmail.com>
maintainer=oliver <olikraus@gmail.com>
sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1701, ST7511, ST7565, ST7567, ST7588, ST75256, ST75320, NT7534, IST3020, ST7920, LD7032, KS0108, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel.
Expand Down
47 changes: 42 additions & 5 deletions src/clib/u8x8_d_uc1608.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,11 @@ static const uint8_t u8x8_d_uc1608_dem240064_init_seq[] = {
U8X8_C(0x02f), /* power on, Bit 2 PC2=1 (internal charge pump), Bits 0/1: cap of panel */
U8X8_DLY(50),

U8X8_C(0x040), /* set display start line to 0 */
U8X8_C(0x090), /* no fixed lines */
U8X8_C(0x07f), /* set display start line*/
U8X8_C(0x094), /* fixed lines */
U8X8_C(0x089), /* RAM access control */

//U8X8_CA(0x081, 46), /* set contrast, 46 according to DemoCode.txt */
U8X8_CA(0x081, 80), /* */
U8X8_CA(0x081, 160), /* issue 1164 */

U8X8_C(0x000), /* column low nibble */
U8X8_C(0x010), /* column high nibble */
Expand All @@ -452,9 +451,47 @@ static const uint8_t u8x8_d_uc1608_dem240064_init_seq[] = {
U8X8_END() /* end of sequence */
};

static const uint8_t u8x8_d_uc1608_dem240064_flip0_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x0c8), /* LCD Mapping */
U8X8_C(0x07f), /* set display start line*/
U8X8_C(0x094), /* fixed lines */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_END() /* end of sequence */
};

static const uint8_t u8x8_d_uc1608_dem240064_flip1_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x0c4), /* LCD Mapping */
U8X8_C(0x040), /* set display start line*/
U8X8_C(0x090), /* fixed lines */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_END() /* end of sequence */
};


uint8_t u8x8_d_uc1608_dem240064(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
/* call common procedure first and handle messages there */

/* checking for the flip mode cmd first */
if ( msg == U8X8_MSG_DISPLAY_SET_FLIP_MODE )
{
if ( arg_int == 0 )
{
u8x8_cad_SendSequence(u8x8, u8x8_d_uc1608_dem240064_flip0_seq);
u8x8->x_offset = u8x8->display_info->default_x_offset;
}
else
{
u8x8_cad_SendSequence(u8x8, u8x8_d_uc1608_dem240064_flip1_seq);
u8x8->x_offset = u8x8->display_info->flipmode_x_offset;
}
return 1;
}
/* call the common procedure, this now leads to the effect, that the flip code is executed again */
/* maybe we should paste the common code here to avoid this */


if ( u8x8_d_uc1608_common(u8x8, msg, arg_int, arg_ptr) == 0 )
{
/* msg not handled, then try here */
Expand Down

0 comments on commit 1a8cb8d

Please sign in to comment.