Skip to content

Commit efbf7be

Browse files
committed
code updates, issue #2711
1 parent a7d232c commit efbf7be

File tree

4 files changed

+92
-1
lines changed

4 files changed

+92
-1
lines changed

ChangeLog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ https://github.com/olikraus/u8g2 ChangeLog
353353
* SSD1320 128x72 (issue 2565)
354354
* Gulim Korean Font (issue 2653)
355355
* drawHB function (issue 2656)
356-
* ST7305 200x200 (issue 2661)
356+
* ST7305 200x200 and 168x384 (issue 2661)
357357
* Added Celsius and Fahrenheit 8451/$2103, 8457$2109 to "e" fonts (issue 2701)
358358
* Update t0 font, added symbols and font size 30/40 (issue 2447)
359359

csrc/u8x8.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@ uint8_t u8x8_d_t6963_128x64_alt(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void
966966
uint8_t u8x8_d_t6963_160x80(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
967967
uint8_t u8x8_d_t6963_256x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
968968
uint8_t u8x8_d_t6963_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
969+
uint8_t u8x8_d_t6963_128x160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
969970
uint8_t u8x8_d_ssd1316_128x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
970971
uint8_t u8x8_d_ssd1316_96x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
971972
uint8_t u8x8_d_ssd1317_96x96(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);

csrc/u8x8_d_t6963.c

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,4 +642,86 @@ uint8_t u8x8_d_t6963_128x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a
642642
}
643643

644644

645+
/*=============================================*/
646+
647+
static const u8x8_display_info_t u8x8_t6963_128x160_display_info =
648+
{
649+
/* chip_enable_level = */ 1,
650+
/* chip_disable_level = */ 0,
651+
652+
/* post_chip_enable_wait_ns = */ 10, /* T6963 Datasheet p30 */
653+
/* pre_chip_disable_wait_ns = */ 100, /* T6963 Datasheet p30 */
654+
/* reset_pulse_width_ms = */ 1,
655+
/* post_reset_wait_ms = */ 6,
656+
/* sda_setup_time_ns = */ 20,
657+
/* sck_pulse_width_ns = */ 140,
658+
/* sck_clock_hz = */ 1000000UL, /* since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns */
659+
/* spi_mode = */ 0,
660+
/* i2c_bus_clock_100kHz = */ 4,
661+
/* data_setup_time_ns = */ 80,
662+
/* write_pulse_width_ns = */ 80,
663+
/* tile_width = */ 16,
664+
/* tile_height = */ 20,
665+
/* default_x_offset = */ 0,
666+
/* flipmode_x_offset = */ 0,
667+
/* pixel_width = */ 128,
668+
/* pixel_height = */ 160
669+
};
670+
671+
/* 128x160 */
672+
static const uint8_t u8x8_d_t6963_128x160_init_seq[] = {
673+
U8X8_DLY(100),
674+
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
675+
U8X8_DLY(100),
676+
677+
U8X8_AAC(0x00,0x00,0x021), /* low, high, set cursor pos */
678+
U8X8_AAC(0x00,0x00,0x022), /* low, high, set offset */
679+
U8X8_AAC(0x00,0x00,0x040), /* low, high, set text home */
680+
U8X8_AAC(128/8,0x00,0x041), /* low, high, set text columns */
681+
U8X8_AAC(0x00,0x00,0x042), /* low, high, graphics home */
682+
U8X8_AAC(128/8,0x00,0x043), /* low, high, graphics columns */
683+
U8X8_DLY(2), /* delay 2ms */
684+
// mode set
685+
// 0x080: Internal CG, OR Mode
686+
// 0x081: Internal CG, EXOR Mode
687+
// 0x083: Internal CG, AND Mode
688+
// 0x088: External CG, OR Mode
689+
// 0x089: External CG, EXOR Mode
690+
// 0x08B: External CG, AND Mode
691+
U8X8_C(0x080), /* mode register: OR Mode, Internal Character Mode */
692+
// display mode
693+
// 0x090: Display off
694+
// 0x094: Graphic off, text on, cursor off, blink off
695+
// 0x096: Graphic off, text on, cursor on, blink off
696+
// 0x097: Graphic off, text on, cursor on, blink on
697+
// 0x098: Graphic on, text off, cursor off, blink off
698+
// 0x09a: Graphic on, text off, cursor on, blink off
699+
// ...
700+
// 0x09c: Graphic on, text on, cursor off, blink off
701+
// 0x09f: Graphic on, text on, cursor on, blink on
702+
U8X8_C(0x090), /* All Off */
703+
U8X8_AAC(0x00,0x00,0x024), /* low, high, set adr pointer */
704+
705+
U8X8_DLY(100),
706+
U8X8_END_TRANSFER(), /* disable chip */
707+
U8X8_DLY(100),
708+
};
709+
710+
uint8_t u8x8_d_t6963_128x160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
711+
{
712+
switch(msg)
713+
{
714+
case U8X8_MSG_DISPLAY_SETUP_MEMORY:
715+
u8x8_d_helper_display_setup_memory(u8x8, &u8x8_t6963_128x160_display_info);
716+
break;
717+
case U8X8_MSG_DISPLAY_INIT:
718+
u8x8_d_helper_display_init(u8x8);
719+
u8x8_cad_SendSequence(u8x8, u8x8_d_t6963_128x160_init_seq);
720+
break;
721+
default:
722+
return u8x8_d_t6963_common(u8x8, msg, arg_int, arg_ptr);
723+
}
724+
return 1;
725+
}
726+
645727

tools/codebuild/codebuild.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,6 +2231,14 @@ struct controller controller_list[] =
22312231
{ NULL }
22322232
}
22332233
},
2234+
{
2235+
"t6963", 16, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
2236+
"Not tested", /* is_generate_u8g2_class= */ 1,
2237+
{
2238+
{ "128x160" },
2239+
{ NULL }
2240+
}
2241+
},
22342242
{
22352243
"ssd1320", 20, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
22362244
"", /* is_generate_u8g2_class= */ 1,

0 commit comments

Comments
 (0)