issue #1250, codechange, codebuild
This commit is contained in:
parent
9da8cbdf93
commit
bd0dc90873
|
@ -814,6 +814,7 @@ uint8_t u8x8_d_ssd1309_128x64_noname2(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int
|
|||
uint8_t u8x8_d_sh1106_128x64_noname(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_sh1106_128x64_vcomh0(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_sh1106_128x64_winstar(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_sh1106_128x32_visionox(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); // located in ssd1306_128x32
|
||||
uint8_t u8x8_d_sh1106_72x40_wise(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_sh1106_64x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
uint8_t u8x8_d_sh1107_64x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
|
||||
|
|
|
@ -250,3 +250,74 @@ uint8_t u8x8_d_ssd1306_128x32_winstar(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int
|
|||
}
|
||||
return u8x8_d_ssd1306_128x32_generic(u8x8, msg, arg_int, arg_ptr);
|
||||
}
|
||||
|
||||
|
||||
/*=============================================*/
|
||||
/* visionox 132x32 OLED, https://github.com/olikraus/u8g2/issues/1250 */
|
||||
|
||||
|
||||
static const uint8_t u8x8_d_sh1106_128x32_visionox_init_seq[] = {
|
||||
|
||||
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
||||
|
||||
U8X8_C(0xAE),
|
||||
U8X8_CA(0xD5, 0x91),
|
||||
U8X8_CA(0xA8, 0x1F),
|
||||
U8X8_CA(0xD3, 0x10),
|
||||
U8X8_C(0x40),
|
||||
U8X8_CA(0xAD, 0x8B),
|
||||
U8X8_C(0x33),
|
||||
U8X8_C(0xA1),
|
||||
U8X8_C(0xC8),
|
||||
U8X8_CA(0xDA, 0x12),
|
||||
U8X8_CA(0x81, 0xAF),
|
||||
U8X8_CA(0xD9, 0x1F),
|
||||
U8X8_CA(0xDB, 0x25),
|
||||
U8X8_C(0xA4),
|
||||
U8X8_C(0xA6),
|
||||
|
||||
U8X8_END_TRANSFER(), /* disable chip */
|
||||
U8X8_END() /* end of sequence */
|
||||
};
|
||||
|
||||
static const u8x8_display_info_t u8x8_d_sh1106_128x32_visionox_display_info =
|
||||
{
|
||||
/* chip_enable_level = */ 0,
|
||||
/* chip_disable_level = */ 1,
|
||||
|
||||
/* post_chip_enable_wait_ns = */ 20,
|
||||
/* pre_chip_disable_wait_ns = */ 10,
|
||||
/* reset_pulse_width_ms = */ 100, /* SSD1306: 3 us */
|
||||
/* post_reset_wait_ms = */ 100, /* far east OLEDs need much longer setup time */
|
||||
/* sda_setup_time_ns = */ 50, /* SSD1306: 15ns, but cycle time is 100ns, so use 100/2 */
|
||||
/* sck_pulse_width_ns = */ 50, /* SSD1306: 20ns, but cycle time is 100ns, so use 100/2, AVR: below 70: 8 MHz, >= 70 --> 4MHz clock */
|
||||
/* sck_clock_hz = */ 4000000UL, /* since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns, increased to 8MHz (issue 215) */
|
||||
/* spi_mode = */ 0, /* active high, rising edge */
|
||||
/* i2c_bus_clock_100kHz = */ 4,
|
||||
/* data_setup_time_ns = */ 40,
|
||||
/* write_pulse_width_ns = */ 150, /* SSD1306: cycle time is 300ns, so use 300/2 = 150 */
|
||||
/* tile_width = */ 16,
|
||||
/* tile_hight = */ 4,
|
||||
/* default_x_offset = */ 2,
|
||||
/* flipmode_x_offset = */ 2,
|
||||
/* pixel_width = */ 128,
|
||||
/* pixel_height = */ 32
|
||||
};
|
||||
|
||||
|
||||
uint8_t u8x8_d_sh1106_128x32_visionox(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
if ( msg == U8X8_MSG_DISPLAY_SETUP_MEMORY )
|
||||
{
|
||||
u8x8_d_helper_display_setup_memory(u8x8, &u8x8_d_sh1106_128x32_visionox_display_info);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( msg == U8X8_MSG_DISPLAY_INIT )
|
||||
{
|
||||
u8x8_d_helper_display_init(u8x8);
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_sh1106_128x32_visionox_init_seq);
|
||||
}
|
||||
|
||||
return u8x8_d_ssd1306_128x32_generic(u8x8, msg, arg_int, arg_ptr);
|
||||
}
|
||||
|
|
|
@ -328,6 +328,24 @@ struct controller controller_list[] =
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
|
||||
"", /* is_generate_u8g2_class= */ 1,
|
||||
{
|
||||
{ "128x32_visionox" },
|
||||
{ NULL }
|
||||
}
|
||||
},
|
||||
{
|
||||
"sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
|
||||
"", /* is_generate_u8g2_class= */ 1,
|
||||
{
|
||||
{ "128x32_visionox" },
|
||||
{ NULL }
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"ssd1306", 8, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
|
||||
"", /* is_generate_u8g2_class= */ 1,
|
||||
|
|
Loading…
Reference in New Issue