This is a port of Henning Kralsen's UTFT library for Arduino/chipKIT to mbed, refactored to make full use of C inheritance and access control, in order to reduce work when implementing new drivers and at the same time make the code more readable and easier to maintain. As of now supported are SSD1289 (16-bit interface), HX8340-B (serial interface) and ST7735 (serial interface). Drivers for other controllers will be added as time and resources to acquire the displays to test the code permit.
Fork of TFTLCD by
Diff: ssd1289.cpp
- Revision:
- 17:866f2a851dd7
- Parent:
- 16:4ccc2fa2cfec
- Child:
- 18:b934d95cc380
--- a/ssd1289.cpp Wed Dec 12 07:17:31 2012 +0000 +++ b/ssd1289.cpp Wed Dec 12 18:08:41 2012 +0000 @@ -71,23 +71,23 @@ { switch ( _orientation ) { - case LANDSCAPE: + case LANDSCAPE: // uder test WriteCmdData( 0x01, 0x2B3F ); // driver output control // 0x293F 0x2B3F 0x2D3F 0x2F3F 0x693F 0x6B3F 0x6D3F 0x6F3F wait_ms( 1 ); - WriteCmdData( 0x11, 0x6030 ); // entry mode // 0x6040 0x6048 0x6050 0x6058 0x6060 0x6068 + WriteCmdData( 0x11, 0x6068 ); // entry mode // 0x6040 0x6048 0x6050 0x6058 0x6060 0x6068 break; - case PORTRAIT_REV: + case PORTRAIT_REV: // works WriteCmdData( 0x01, 0x693F ); // driver output control wait_ms( 1 ); WriteCmdData( 0x11, 0x6070 ); // entry mode break; - case LANDSCAPE_REV: - WriteCmdData( 0x11, 0x60A8 ); // entry mode + case LANDSCAPE_REV: // uder test + WriteCmdData( 0x11, 0x6068 ); // entry mode break; - case PORTRAIT: + case PORTRAIT: // works default: WriteCmdData( 0x01, 0x2B3F ); // driver output control wait_ms( 1 ); @@ -99,23 +99,23 @@ { switch ( _orientation ) { - case LANDSCAPE: + case LANDSCAPE: // uder test WriteCmdData( 0x01, 0x293F ); // driver output control // 0x293F 0x2B3F 0x2D3F 0x2F3F 0x693F 0x6B3F 0x6D3F 0x6F3F wait_ms( 1 ); - WriteCmdData( 0x11, 0x4048 ); // entry mode // 0x4040 0x4048 0x4050 0x4058 0x4060 0x4068 + WriteCmdData( 0x11, 0x4068 ); // entry mode // 0x4040 0x4048 0x4050 0x4058 0x4060 0x4068 break; - case PORTRAIT_REV: + case PORTRAIT_REV: // works WriteCmdData( 0x01, 0x693F ); // driver output control wait_ms( 1 ); WriteCmdData( 0x11, 0x4070 ); // entry mode break; - case LANDSCAPE_REV: + case LANDSCAPE_REV: // uder test WriteCmdData( 0x11, 0x4068 ); // entry mode break; - case PORTRAIT: + case PORTRAIT: // works default: WriteCmdData( 0x01, 0x2B3F ); // driver output control wait_ms( 1 );