Display Library for 16-bit color graphic displays for Raspberry PI PICO

May 16, 2026 ยท View on GitHub

Cppcheck Donate

Table of contents

Overview

  • Name : displaylib_16bit_PICO
  • Description :
  1. C++ Library to support 16-bit color graphic displays for the Raspberry PI PICO.
  2. Graphics class included.
  3. Bitmaps supported.
  4. Polymorphic print class included to print many data types.
  5. Multiple displays supported, see supported-devices, new components can be easily added.
  6. 16 fonts included.
  7. URL project github link
  • Author: Gavin Lyons

  • Developed on Toolchain:

  1. Raspberry pi PICO RP2040
  2. SDK(2.2.0) C++20
  3. compiler G++ for arm-none-eabi((15:10.3-2021.07-4)
  4. CMAKE(VERSION 3.18) , VScode(1.84.2)
  5. Linux Mint 22.1

Documentation

Supported devices

Component nameTypeInterfaceReadme URL link
ST778916 bit Colour Graphic TFT LCDSPI HW & SWReadme
ST773516 bit Colour Graphic TFT LCDSPI HW & SWReadme
SSD133116 bit Colour Graphic OLEDSPI HW & SWReadme
ILI934116 bit Colour Graphic TFT LCDSPI HW & SWReadme
GC9A0116 bit Colour Graphic TFT LCDSPI HW & SWReadme
GC9D0116 bit Colour Graphic TFT LCDSPI HW & SWReadme
GC910716 bit Colour Graphic TFT LCDSPI HW & SWReadme

API Documentation

The application programming interface html documentation is at link hosted on github pages and generated by Doxygen. Detailed project overview images are available there.

Fonts

The font system readme is in the 'doc' folder at link.

Bitmaps

Bitmap readme is in the 'doc' folder at link.

Software

Advanced Graphics

There is an advanced graphics modes in library. Standard graphics supports drawing lines, pixels rectangles, triangles, circles and rounded rectangles. Advanced graphics supports drawing polygons, dot grid, quadrilaterals, arcs, ellipses and lines at an angle.

It is ON by default. If you don't want these 'advanced' functions and want to save memory space: Simply comment out line 19 #define ADVANCED_GRAPHICS_ENABLE in displaylib_16_graphics.hpp. This will disable advanced graphics mode. If this is disabled some examples and demos may not work fully or even compile.

Advanced buffer mode

Advanced buffer mode. There is advanced buffer mode where the code writes to a global screen buffer instead of the VRAM of display. It is off by default more details at readme, which is in the 'doc' folder at link.

Test

There are multiple examples for each device, User picks the one they want by editing the: CMakeLists.txt :: add_executable(${PROJECT_NAME} section. Comment in one path and one path ONLY. See displays readme's for more details.

Print

The print class can print integers, floats, characters, character arrays and C++ std::strings. It can also format floating point numbers to a number of decimal places. and format integers in different base number systems. Support for other data types can be added.

File system

Class Hierarchy:

image link

Error Codes

Most functions that return a value, return a enum. Zero for success and a positive number for an error code. Error messages are outputted to console at 38400 baud.

Notes

Projects using library

  • Super-Mario-Pico: A Super Mario Bros demo game for the Raspberry Pi Pico that uses this library to drive a 16-bit TFT display.

Older versions

  • This repository before version 2.0.0 was originally called ST7735_TFT_PICO and just supported st7735. This older version is available in releases as 1.7.2.