SPMA082 August   2021 TM4C1230C3PM , TM4C1230D5PM , TM4C1230E6PM , TM4C1230H6PM , TM4C1231C3PM , TM4C1231D5PM , TM4C1231D5PZ , TM4C1231E6PM , TM4C1231E6PZ , TM4C1231H6PGE , TM4C1231H6PM , TM4C1231H6PZ , TM4C1232C3PM , TM4C1232D5PM , TM4C1232E6PM , TM4C1232H6PM , TM4C1233C3PM , TM4C1233D5PM , TM4C1233D5PZ , TM4C1233E6PM , TM4C1233E6PZ , TM4C1233H6PGE , TM4C1233H6PM , TM4C1233H6PZ , TM4C1236D5PM , TM4C1236E6PM , TM4C1236H6PM , TM4C1237D5PM , TM4C1237D5PZ , TM4C1237E6PM , TM4C1237E6PZ , TM4C1237H6PGE , TM4C1237H6PM , TM4C1237H6PZ , TM4C123AE6PM , TM4C123AH6PM , TM4C123BE6PM , TM4C123BE6PZ , TM4C123BH6PGE , TM4C123BH6PM , TM4C123BH6PZ , TM4C123BH6ZRB , TM4C123FE6PM , TM4C123FH6PM , TM4C123GE6PM , TM4C123GE6PZ , TM4C123GH6PGE , TM4C123GH6PM , TM4C123GH6PZ , TM4C123GH6ZRB , TM4C1290NCPDT , TM4C1290NCZAD , TM4C1292NCPDT , TM4C1292NCZAD , TM4C1294KCPDT , TM4C1294NCPDT , TM4C1294NCZAD , TM4C1297NCZAD , TM4C1299KCZAD , TM4C1299NCZAD , TM4C129CNCPDT , TM4C129CNCZAD , TM4C129DNCPDT , TM4C129DNCZAD , TM4C129EKCPDT , TM4C129ENCPDT , TM4C129ENCZAD , TM4C129LNCZAD , TM4C129XKCZAD , TM4C129XNCZAD

 

  1.   Trademarks
  2. 1TFT LCD Overview
    1. 1.1 Typical Interfaces
    2. 1.2 Frame Buffer
      1. 1.2.1 Frame Buffer Size Calculation
    3. 1.3 Frame Rate (FPS)
    4. 1.4 Touch Display
  3. 2LCD Controller Overview
    1. 2.1 Block Diagram
      1. 2.1.1 Raster Controller
      2. 2.1.2 LIDD Controller
  4. 3TivaWare Graphics Library (grlib)
    1. 3.1 Graphics Library Structure
      1. 3.1.1 Display Driver Overview
      2. 3.1.2 Low-Level Primitive Graphics API Overview
      3. 3.1.3 Widget API Overview
      4. 3.1.4 Input Driver Overview
  5. 4Display Driver Adaptation
    1. 4.1 Off-Screen Display Drivers
    2. 4.2 Individual Display Driver Functions
      1. 4.2.1 Init
      2. 4.2.2 ColorTranslate
      3. 4.2.3 PixelDraw
      4. 4.2.4 PixelDrawMultiple
      5. 4.2.5 LineDrawH
      6. 4.2.6 LineDrawV
      7. 4.2.7 RectFill
      8. 4.2.8 Flush
  6. 5Fonts
    1. 5.1 Creating Custom Fonts for Different Languages
  7. 6Useful Utilities
    1. 6.1 Pnmtoc
    2. 6.2 mkstringtable and ftrasterize
  8. 7References
  9.   A Appendix A

TivaWare Graphics Library (grlib)

The TivaWare Graphics Library (grlib) offers a compact yet powerful collection of graphics functions which aid with the development of compelling user interfaces on small monochrome or color displays attached to TM4C microcontrollers. The grlib is included in all TivaWare firmware development packages supporting evaluation or development kits that include color displays or via add-on BoosterPack color displays. Latest TivaWare release for these kits can be downloaded from SW-TM4C.

Following installation of the TivaWare package, the graphics library source can be found in the C:\ti\TivaWare_C_Series-2.2.0.295\grlib directory (assuming the installation is in the default location) and various example applications using the library can be found in the below board specific directories:

  • C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\dk-tm4c129x

  • C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl-boostxl-kentec-s1

  • C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c123gxl-boostxl-kentec-s1

Application examples for different kits are shown Table 3-1.

Table 3-1 Application Examples
Example Kit Description
fontview All This example displays the contents of a TivaWare graphics library font on the DK board's LCD touchscreen. By default, the application shows a test font containing ASCII, the Japanese Hiragana and Katakana alphabets, and a group of Korean Hangul characters. If an SDCard is installed and the root directory contains a file named font.bin, this file is opened and used as the display font instead. In this case, the graphics library font wrapper feature is used to access the font from the file system rather than from internal memory.
The font used in this example contains ASCII, Hiragana, Katakana, Korean Jamo and a small number of Hangul syllables and Chinese ideographs. It is intended purely for illustration purposes and is unlikely to be of use in a real-world application.
grlib_demo All This application provides a demonstration of the capabilities of the TivaWare Graphics Library using both primitives and widgets. A series of panels show different features of the library. As each panel is traversed, different capability is presented ranging from printing simple text to drawing primitives: lines, circles and different shapes to advanced widgets creating check box, container, push button, radio button and slider functions.
lang_demo All This application provides a demonstration of the capabilities of the TivaWare Graphics Library's string table functions. Two panels show different implementations of features of the string table functions. For each panel, the bottom provides a forward and back button (when appropriate).
The purpose of the string table and custom fonts is mainly for applications intending to display accented characters and Asian language ideographs. The font library containing the Asian language ideographs would be enormous for embedded applications. The string table and custom fonts allow only the needed characters for the application to be stored in a custom string table and fonts.
scribble All The scribble pad provides a drawing area on the screen. Touching the screen will draw onto the drawing area using a selection of fundamental colors (in other words, the seven colors produced by the three color channels being either fully on or fully off). Each time the screen is touched to start a new drawing, the drawing area is erased and the next color is selected.
grlib_driver_test dk-tm4c129x This application provides a simple, command-line tool to aid in debugging TivaWare Graphics Library display drivers.
The tool is driven via a command line interface provided on UART0. Configure the terminal emulator on your host system 115200bps, 8-N-1.
Commands allow a given low level graphics function to be executed with parameters provided by you.
Commands provide the ability to read and write arbitrary memory locations and registers, and tests displaying test patterns intended to exercise specific display driver functions.
hello_widget dk-tm4c129x A very simple “hello world” example written using the TivaWare Graphics Library widgets. It displays a button which, when pressed, toggles display of the words “Hello World!'' on the screen. This may be used as a starting point for more complex widget-based applications.