test version, issue #633
This commit is contained in:
parent
f83294dd76
commit
731de17c18
|
@ -577,11 +577,15 @@ static void i2c_write_byte(u8x8_t *u8x8, uint8_t b)
|
|||
uint8_t u8x8_byte_sw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
uint8_t *data;
|
||||
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case U8X8_MSG_BYTE_SEND:
|
||||
data = (uint8_t *)arg_ptr;
|
||||
|
||||
if ( arg_int > 32 )
|
||||
for(;;)
|
||||
;
|
||||
|
||||
while( arg_int > 0 )
|
||||
{
|
||||
|
|
|
@ -186,6 +186,12 @@ precalculate as much of possible before the loop is entered.
|
|||
A4: "firstPage/nextPage loop": If the loop is still too slow, try to unroll the loop.
|
||||
See the StateBufferLoop example:
|
||||
https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/StateBufferLoop/StateBufferLoop.ino
|
||||
A5: For SW I2C and AVR architectures: Uncomment
|
||||
#define U8X8_USE_ARDUINO_AVR_SW_I2C_OPTIMIZATION
|
||||
in U8x8lib.h. This will increase speed a lot for I2C on all AVR uC. However the I2C
|
||||
bus is always driven by this implementation. Other I2C devices will not work on
|
||||
the same pins.
|
||||
|
||||
|
||||
Q: How can I generate my own font.
|
||||
A: The font must be available in bdf file format. Then use bdfconv to generate
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
//U8G2_SSD1306_128X64_NONAME_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8);
|
||||
//U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
|
||||
//U8G2_SSD1306_128X64_ALT0_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the "every 2nd line skipped" problem
|
||||
//U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8);
|
||||
U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8);
|
||||
//U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display
|
||||
//U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 16, /* data=*/ 17, /* reset=*/ U8X8_PIN_NONE); // ESP32 Thing, pure SW emulated I2C
|
||||
//U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ 16, /* data=*/ 17); // ESP32 Thing, HW I2C with pin remapping
|
||||
|
@ -439,10 +439,10 @@ void draw(void) {
|
|||
void setup(void) {
|
||||
|
||||
/* U8g2 Project: SSD1306 Test Board */
|
||||
//pinMode(10, OUTPUT);
|
||||
//pinMode(9, OUTPUT);
|
||||
//digitalWrite(10, 0);
|
||||
//digitalWrite(9, 0);
|
||||
pinMode(10, OUTPUT);
|
||||
pinMode(9, OUTPUT);
|
||||
digitalWrite(10, 0);
|
||||
digitalWrite(9, 0);
|
||||
|
||||
/* U8g2 Project: T6963 Test Board */
|
||||
//pinMode(18, OUTPUT);
|
||||
|
|
Loading…
Reference in New Issue