issue #208
This commit is contained in:
parent
65d6fd92d1
commit
9da21ce23a
|
@ -150,6 +150,9 @@ class U8X8 : public Print
|
|||
|
||||
void clearDisplay(void) {
|
||||
u8x8_ClearDisplay(&u8x8); }
|
||||
|
||||
void fillDisplay(void) {
|
||||
u8x8_FillDisplay(&u8x8); }
|
||||
|
||||
void setPowerSave(uint8_t is_enable) {
|
||||
u8x8_SetPowerSave(&u8x8, is_enable); }
|
||||
|
|
|
@ -46,7 +46,7 @@ static const uint8_t u8x8_d_ssd1329_128x96_nhd_init_seq[] = {
|
|||
U8X8_C(0x0ae), /* display off */
|
||||
U8X8_CA(0x0b3, 0x091), /* set display clock divide ratio/oscillator frequency (set clock as 135 frames/sec) */
|
||||
U8X8_CA(0x0a8, 0x03f), /* multiplex ratio: 0x03f * 1/64 duty */
|
||||
U8X8_CA(0x0a2, 0x04c), /* display offset, shift mapping ram counter */
|
||||
U8X8_CA(0x0a2, 0x000), /* display offset, shift mapping ram counter */
|
||||
U8X8_CA(0x0a1, 0x000), /* display start line */
|
||||
U8X8_CA(0x0ad, 0x002), /* master configuration: disable embedded DC-DC, enable internal VCOMH */
|
||||
U8X8_CA(0x0a0, 0x052), /* remap configuration, horizontal address increment (bit 2 = 0), enable nibble remap (upper nibble is left, bit 1 = 1) */
|
||||
|
|
|
@ -154,7 +154,6 @@ void u8x8_ClearLine(u8x8_t *u8x8, uint8_t line)
|
|||
{
|
||||
uint8_t buf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
u8x8_tile_t tile;
|
||||
uint8_t h;
|
||||
if ( line < u8x8->display_info->tile_height )
|
||||
{
|
||||
tile.x_pos = 0;
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
//U8X8_SSD1306_128X64_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
|
||||
//U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 6, /* dc=*/ 4, /* reset=*/ 12); // Arduboy (DevKit)
|
||||
//U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy 10 (Production, Kickstarter Edition)
|
||||
//U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
|
||||
U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
|
||||
//U8X8_SSD1306_128X64_NONAME_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8);
|
||||
//U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 2, /* data=*/ 0, /* reset=*/ U8X8_PIN_NONE); // Digispark ATTiny85
|
||||
//U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // OLEDs without Reset of the Display
|
||||
|
@ -188,7 +188,6 @@ void loop(void)
|
|||
u8x8.print("github.com/");
|
||||
u8x8.setCursor(0,2);
|
||||
u8x8.print("olikraus/u8g2");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(2000);
|
||||
u8x8.setCursor(0,3);
|
||||
u8x8.print("Tile size:");
|
||||
|
@ -196,7 +195,6 @@ void loop(void)
|
|||
u8x8.print("x");
|
||||
u8x8.print((int)u8x8.getRows());
|
||||
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(2000);
|
||||
|
||||
pre();
|
||||
|
@ -205,7 +203,6 @@ void loop(void)
|
|||
u8x8.setCursor(3,2);
|
||||
u8x8.print(i);
|
||||
u8x8.print(" ");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(200);
|
||||
}
|
||||
|
||||
|
@ -214,7 +211,6 @@ void loop(void)
|
|||
{
|
||||
draw_bar(c, 1);
|
||||
draw_bar(c-1, 0);
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(50);
|
||||
}
|
||||
draw_bar(u8x8.getCols()-1, 0);
|
||||
|
@ -227,7 +223,6 @@ void loop(void)
|
|||
{
|
||||
draw_ascii_row(r, (r-1+d)*u8x8.getCols() + 32);
|
||||
}
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(800);
|
||||
}
|
||||
|
||||
|
@ -236,7 +231,6 @@ void loop(void)
|
|||
{
|
||||
draw_bar(c-1, 1);
|
||||
draw_bar(c, 0);
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(50);
|
||||
}
|
||||
draw_bar(0, 0);
|
||||
|
@ -244,16 +238,23 @@ void loop(void)
|
|||
pre();
|
||||
u8x8.drawString(0, 2, "Small");
|
||||
u8x8.draw2x2String(0, 5, "Big");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(3000);
|
||||
|
||||
|
||||
pre();
|
||||
u8x8.fillDisplay();
|
||||
for( r = 0; r < u8x8.getRows(); r++ )
|
||||
{
|
||||
u8x8.clearLine(r);
|
||||
delay(100);
|
||||
}
|
||||
delay(1000);
|
||||
|
||||
pre();
|
||||
u8x8.print("print \\n\n");
|
||||
delay(500);
|
||||
u8x8.println("println");
|
||||
delay(500);
|
||||
u8x8.println("done");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(1500);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue