lib/unigraphic/SSD1322.cpp

changeset 17
162fe523c37d
parent 8
55021f3f1929
child 26
86f099bda525
--- a/lib/unigraphic/SSD1322.cpp	Tue Oct 11 21:49:43 2016 +0200
+++ b/lib/unigraphic/SSD1322.cpp	Wed Oct 26 22:41:16 2016 +0200
@@ -53,7 +53,7 @@
 static const uint8_t oledInit[] = {
     SSD1322_CMD_SET_COMMAND_LOCK,            1, 0x12, /* Unlock OLED driver IC*/
     SSD1322_CMD_SET_DISPLAY_OFF,             0,
-    SSD1322_CMD_SET_CLOCK_DIVIDER,           1, 0x91,
+    SSD1322_CMD_SET_CLOCK_DIVIDER,           1, 0x91,//0xF0, //max freq, was 0x91,
     SSD1322_CMD_SET_MULTIPLEX_RATIO,         1, 0x3F, /*duty = 1/64*,64 COMS are enabled*/
     SSD1322_CMD_SET_DISPLAY_OFFSET,          1, 0x00,
     SSD1322_CMD_SET_DISPLAY_START_LINE,      1, 0x00, /*set start line position*/
@@ -364,10 +364,15 @@
 	 DISPLAY_BUFFER_ELEMENTS * sizeof(DISPLAY_BUFFER_TYPE));
   wr_cmd8(SSD1322_CMD_WRITE_RAM);
 
+#ifdef DEVICE_SPI_ASYNCH
+  _CS = 0;
+  _spi.transfer((uint8_t*) _trBuffer, 64*128, (uint8_t*) NULL, 0, _spiEventCb);
+#else
   i = 0;
   for(y=0; y<64; y++) 
     for(x=0; x<128; x++) 
       wr_data8(_trBuffer[i++]);
+#endif
 }
 
 void SSD1322::copy_to_lcd(unsigned char from_col, unsigned char to_col,

mercurial