Fork of Silabs MemoryLCD library

Dependents:   demoUI whrmDemoUI Host_Software_MAX32664GWEB_HR_EXTENDED Host_Software_MAX32664GWEC_SpO2_HR-_EXTE ... more

C++ library for Sharp Microelectronics 1.28 inch LCD TFT, LS013B7DH03, SPI bus. Forked from Silicon Labs MemoryLCD display driver.

Revision:
2:2f10f00fe56c
Parent:
0:a0faa86660d4
Child:
12:ca0bcb4777e9
--- a/LS013B7DH03.cpp	Wed Mar 18 10:58:34 2015 -0500
+++ b/LS013B7DH03.cpp	Tue Apr 14 15:25:58 2015 -0400
@@ -53,7 +53,7 @@
 
 	//Save pointer to spi peripheral
 	_spi = spi;
-	_internalCallback.attach(this, &LS013B7DH03::_cbHandler);
+	_internalEventCallback.attach(this, &LS013B7DH03::_cbHandler);
 
 	//Initialize
 	_spi->set_dma_usage((DMAUsage)DMA_USAGE_NEVER);
@@ -64,7 +64,7 @@
 	_rowCount = 0;
 
 	//Start toggling the EXTCOM pin
-	_displayToggler.attach(this, &LS013B7DH03::toggle, 0.008f);
+	//_displayToggler.attach(this, &LS013B7DH03::toggle, 0.008f);
 }
 
 /**
@@ -168,7 +168,7 @@
 				_cmd[1] = (uint8_t)SWAP8(_rowCount + 1);
 				memcpy((void*)&(_cmd[2]), (const void*)&(_pixelBuffer[_rowCount*(DISPLAY_WIDTH/DISPLAY_BUFFER_TYPE_SIZE)]), DISPLAY_WIDTH / DISPLAY_BUFFER_TYPE_SIZE * sizeof(DISPLAY_BUFFER_TYPE));
 
-				if(_spi->transfer((uint8_t*)_cmd, (2 + (DISPLAY_WIDTH / DISPLAY_BUFFER_TYPE_SIZE * sizeof(DISPLAY_BUFFER_TYPE))) , (uint8_t*)NULL, 0, &_internalCallback) != 0) {
+				if(_spi->transfer((uint8_t*)_cmd, (2 + (DISPLAY_WIDTH / DISPLAY_BUFFER_TYPE_SIZE * sizeof(DISPLAY_BUFFER_TYPE))) , (uint8_t*)NULL, 0, _internalEventCallback, SPI_EVENT_COMPLETE) != 0) {
 					// SPI is busy, with another transaction. This means the data to the LCD has been corrupted, so fail here.
 					_state = DONE;
 
@@ -189,7 +189,7 @@
 		// Done sending!
 		_cmd[1] = 0xFF;
 		_state = TRANSFERS_DONE;
-		if(_spi->transfer((uint8_t*)_cmd, 2, (uint8_t*)NULL, 0, &_internalCallback) != 0) {
+		if(_spi->transfer((uint8_t*)_cmd, 2, (uint8_t*)NULL, 0, _internalEventCallback, SPI_EVENT_COMPLETE) != 0) {
 			// SPI is busy, with another transaction. This means the data to the LCD has been corrupted, so fail here.
 			_state = DONE;
 
@@ -201,7 +201,7 @@
 	else if (_state == WAIT_CLEAR)
 	{
 		_state = TRANSFERS_DONE;
-		if(_spi->transfer((uint8_t*)_cmd, 2, (uint8_t*)NULL, 0, &_internalCallback) != 0) {
+		if(_spi->transfer((uint8_t*)_cmd, 2, (uint8_t*)NULL, 0, _internalEventCallback, SPI_EVENT_COMPLETE) != 0) {
 			// SPI is busy, with another transaction. This means the data to the LCD has been corrupted, so fail here.
 			_state = DONE;