355 |
355 |
356 void SSD1322::copy_to_lcd(void) |
356 void SSD1322::copy_to_lcd(void) |
357 { |
357 { |
358 unsigned int x, y; |
358 unsigned int x, y; |
359 unsigned int i; |
359 unsigned int i; |
360 set_row_address(0); |
360 |
361 set_column_address(0); |
361 pixel_buffer_mutex.lock(); |
362 |
|
363 memcpy((void*)_trBuffer, |
362 memcpy((void*)_trBuffer, |
364 (const void*)_pixelBuffer, |
363 (const void*)_pixelBuffer, |
365 DISPLAY_BUFFER_ELEMENTS * sizeof(DISPLAY_BUFFER_TYPE)); |
364 DISPLAY_BUFFER_ELEMENTS * sizeof(DISPLAY_BUFFER_TYPE)); |
366 |
365 pixel_buffer_mutex.unlock(); |
|
366 |
|
367 set_row_address(0); |
|
368 set_column_address(0); |
367 wr_cmd8(SSD1322_CMD_WRITE_RAM); |
369 wr_cmd8(SSD1322_CMD_WRITE_RAM); |
368 |
370 |
369 #ifdef DEVICE_SPI_ASYNCH |
371 #ifdef DEVICE_SPI_ASYNCH |
370 _CS = 0; |
372 _CS = 0; |
371 _spi.transfer((uint8_t*) _trBuffer, 64*128, (uint8_t*) NULL, 0, _spiEventCb); |
373 _spi.transfer((uint8_t*) _trBuffer, 64*128, (uint8_t*) NULL, 0, _spiEventCb); |