GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
Hardware displays. More...
#include <backends/gp_backend.h>
Go to the source code of this file.
Data Structures | |
struct | gp_backend_display_model |
A display model description. More... | |
Enumerations | |
enum | gp_backend_display_model_ids { GP_WAVESHARE_7_5_V2 = 0 , GP_WAVESHARE_3_7 = 1 , GP_WEACT_2_13_BW = 2 , GP_GMG12864 = 3 } |
Supported displays. More... | |
Functions | |
gp_backend * | gp_backend_display_init (enum gp_backend_display_model_ids model) |
Initializes a hardware display. | |
Variables | |
const struct gp_backend_display_model | gp_backend_display_models [] |
NULL-terminated array of display model names indexed by enum gp_backend_display_model_ids. | |
Hardware displays.
Hardware display backends support various displays connected to hardware GPIO e.g. SPI e-ink RPi Hat. These displays are coupled with Linux input driver so that you can get a computer with a keyboard, mouse and display just by connecting display to GPIOs as well as USB keyboard and/or mouse.
In order to start an application with a hardware display backend display:$display_name string has to be passed to the display init function. This is usually done on a commandline by passing the -b option.
SPI displays need spidev userspace SPI driver and a few GPIOs for additional signaling. The default RPi GPIO mapping is compatible with WaveShare e-ink display hats.
RPi GPIO Map
Display | GPIO | Display SPI | GPIO |
---|---|---|---|
Reset | 17 | MOSI | 10 |
Data/Cmd | 25 | MISO | 9 |
Power | 18 | SCLK | 11 |
Bussy | 24 | CS0 | 8 |
Definition in file gp_display.h.
Supported displays.
Definition at line 47 of file gp_display.h.
gp_backend * gp_backend_display_init | ( | enum gp_backend_display_model_ids | model | ) |
Initializes a hardware display.
The backend uses Linux input devices for keyboard and mouse support.
model | A display model. |