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: hx8340bs.h
- Revision:
- 12:d0978272a340
- Parent:
- 10:69571adcfad5
- Child:
- 20:4bdca8d8dadc
diff -r aeceefc5f9f2 -r d0978272a340 hx8340bs.h --- a/hx8340bs.h Tue Dec 11 16:50:09 2012 +0000 +++ b/hx8340bs.h Tue Dec 11 18:11:14 2012 +0000 @@ -96,8 +96,9 @@ * or produce garbage. * * \param oritentation The display orientation, landscape is default. + * \param colors The correct color depth to use for the pixel data. */ - virtual void Initialize( orientation_t orientation = LANDSCAPE ); + virtual void Initialize( orientation_t orientation = LANDSCAPE, colordepth_t colors = RGB16 ); /** Puts the display to sleep. * @@ -173,7 +174,7 @@ * order to account for different color depth used by the controller. * \param color The color of the pixel. */ - virtual void SetPixelColor( unsigned short color ); + virtual void SetPixelColor( unsigned int color ); private: void serializeByte( unsigned char data );