olikraus / ucglib

Arduino True Color Library for TFTs and OLEDs
https://github.com/olikraus/ucglib/wiki
Other
261 stars 76 forks source link

ucg_dev_ic contains wrong cmd/data sequence command #50

Open olikraus opened 9 years ago

olikraus commented 9 years ago

The wong code is this: const ucg_pgm_uint8_t ucg_ssd1331_set_pos_dir0_seq[] = { UCGCS(0), /* enable chip / UCG_C10(0x015), UCG_VARX(0,0x0ff, 0), UCGD1(0x07f), / set x position _/ UCG_C10(0x075), UCG_VARY(0,0x0ff, 0), UCGVARY(0,0x0ff, 0), / set y position _/ UCGDATA(), / change to data mode */ UCG_END() };

Correct code should be: const ucg_pgm_uint8_t ucg_ssd1331_set_pos_dir0_seq[] = { UCGCS(0), /* enable chip / UCG_C10(0x015), UCG_VARX(0,0x0ff, 0), UCGA1(0x07f), / set x position _/ UCG_C10(0x075), UCG_VARY(0,0x0ff, 0), UCGVARY(0,0x0ff, 0), / set y position _/ UCGDATA(), / change to data mode */ UCG_END() };

Some speed optimization might be possible: CD line is set too often here