libpynq (release 5EWC0-2023 version 0.2.6 of 2025-11-10 09:56)
Loading...
Searching...
No Matches
display.c
Go to the documentation of this file.
1#include <display.h>
2void display_init(display_t *display){};
3void display_destroy(display_t *display){};
4void displayDrawPixel(display_t *display, uint16_t x, uint16_t y,
5 uint16_t color){
6#ifdef TRACE_DISPLAY
7printf("dp %d %d %d\n",x,y,color);
8#endif
9};
10void displayDrawFillRect(display_t *display, uint16_t x1, uint16_t y1,
11 uint16_t x2, uint16_t y2, uint16_t color){
12#ifdef TRACE_DISPLAY
13printf("dfr %d %d %d %d %d\n",x1,y1,x2,y2,color);
14#endif
15};
16void displayFillScreen(display_t *display, uint16_t color){
17};
18void displayDrawLine(display_t *display, uint16_t x1, uint16_t y1, uint16_t x2,
19 uint16_t y2, uint16_t color){
20#ifdef TRACE_DISPLAY
21printf("dl %d %d %d %d %d\n",x1,y1,x2,y2,color);
22#endif
23};
24void displayDrawRect(display_t *display, uint16_t x1, uint16_t y1, uint16_t x2,
25 uint16_t y2, uint16_t color){
26#ifdef TRACE_DISPLAY
27printf("dr %d %d %d %d %d\n",x1,y1,x2,y2,color);
28#endif
29};
30void displayDrawRectAngle(display_t *display, uint16_t xc, uint16_t yc,
31 uint16_t w, uint16_t h, uint16_t angle,
32 uint16_t color){};
33void displayDrawTriangleCenter(display_t *display, uint16_t xc, uint16_t yc,
34 uint16_t w, uint16_t h, uint16_t angle,
35 uint16_t color){};
36void displayDrawCircle(display_t *display, uint16_t x_center, uint16_t y_center,
37 uint16_t r, uint16_t color){};
38void displayDrawFillCircle(display_t *display, uint16_t x_center,
39 uint16_t y_center, uint16_t r, uint16_t color){};
40void displayDrawRoundRect(display_t *display, uint16_t x1, uint16_t y1,
41 uint16_t x2, uint16_t y2, uint16_t r, uint16_t color){};
42uint16_t rgb_conv(uint16_t r, uint16_t g, uint16_t b){};
43int displayDrawChar(display_t *display, FontxFile *fx, uint16_t x, uint16_t y,
44 uint8_t ascii, uint16_t color){};
45int displayDrawString(display_t *display, FontxFile *fx, uint16_t x, uint16_t y,
46 uint8_t *ascii, uint16_t color){};
47void displaySetFontDirection(display_t *display, uint16_t dir){};
48void displaySetFontFill(display_t *display, uint16_t color){};
50void displaySetFontUnderLine(display_t *display, uint16_t color){};
53void displayDisplayOn(display_t *display){};
58void displayDrawTriangle(display_t *display, uint16_t x1, uint16_t y1,
59 uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3,
60 uint16_t color){};
61void display_set_flip(display_t *display, bool xflip, bool yflip){};
void display_destroy(display_t *display __attribute__((unused)))
Definition display.c:309
int displayDrawString(display_t *display, FontxFile *fx, uint16_t x, uint16_t y, uint8_t *ascii, uint16_t color)
Function to draw a string on the display.
Definition display.c:954
void display_set_flip(display_t *display, bool xflip, bool yflip)
Flip the drawing off the screen.
Definition display.c:279
void displayDrawFillRect(display_t *display, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
Draw a filled rectangle to the display.
Definition display.c:364
void displaySetFontUnderLine(display_t *display, uint16_t color)
Turns on _font_underline in the display handle and sets the _font_underline_color to the specified co...
Definition display.c:1002
void displaySetFontDirection(display_t *display, uint16_t dir)
Changes the direction the characters will be printed.
Definition display.c:985
void displayDrawTriangle(display_t *display, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t x3, uint16_t y3, uint16_t color)
Draw a triangle without infill between the three given points in the given color.
Definition display.c:556
void displaySetFontFill(display_t *display, uint16_t color)
Enables the _font_fill and sets the _font_fill_color in the display handle.
Definition display.c:992
void displayDrawRect(display_t *display, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
Draw a filled rectangle.
Definition display.c:481
void displayUnsetFontFill(display_t *display)
Sets the _font_fill parameter to false in the display handle, turns off the font fill.
Definition display.c:1000
void display_init(display_t *display)
Initialize the display display.
Definition display.c:301
uint16_t rgb_conv(uint16_t r, uint16_t g, uint16_t b)
RGB conversion for generating a color.
Definition display.c:781
void displayDisplayOff(display_t *display)
Turn off the display.
Definition display.c:406
void displayDrawLine(display_t *display, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
Draw a line from two coordinates.
Definition display.c:428
void displayInversionOff(display_t *display)
Turn off inversion of the colors.
Definition display.c:1035
void displayDrawRoundRect(display_t *display, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t r, uint16_t color)
Draw a rectangle with rounded angles.
Definition display.c:711
void displayInversionOn(display_t *display)
Turn on inversion of the colors.
Definition display.c:1042
int displayDrawChar(display_t *display, FontxFile *fxs, uint16_t x, uint16_t y, uint8_t ascii, uint16_t color)
Draws a character on the given coordinates of the display.
Definition display.c:785
void displayBacklightOn(display_t *display)
Turn on the display backlight.
Definition display.c:1026
void displayDrawCircle(display_t *display, uint16_t x_center, uint16_t y_center, uint16_t r, uint16_t color)
Draw a circle without infill on the display.
Definition display.c:624
void displayFillScreen(display_t *display, uint16_t color)
Fill entire display with a single color using the ldcDrawFillRect function.
Definition display.c:420
void displayBacklightOff(display_t *display)
Turn off the display backlight.
Definition display.c:1017
void displayDisplayOn(display_t *display)
Initialize DISPLAY screen.
Definition display.c:413
void displayUnsetFontUnderLine(display_t *display)
Turns off _font_underline in the display handle.
Definition display.c:1010
void displayDrawPixel(display_t *display, uint16_t x, uint16_t y, uint16_t color)
Draw a single pixel to the display.
Definition display.c:320
void displayDrawRectAngle(display_t *display, uint16_t xc, uint16_t yc, uint16_t w, uint16_t h, uint16_t angle, uint16_t color)
Draws a rectangle with rounded corners at a specified angle on the display.
Definition display.c:499
void displayDrawFillCircle(display_t *display, uint16_t x_center, uint16_t y_center, uint16_t r, uint16_t color)
Draw a circle with infill on the display.
Definition display.c:665
void displayDrawTriangleCenter(display_t *display, uint16_t xc, uint16_t yc, uint16_t w, uint16_t h, uint16_t angle, uint16_t color)
Draws a triangle at a specified angle on the display.
Definition display.c:583
Struct representing a font file.
Definition fontx.h:28
Internal type, do not use. Type of display that stores parameters for usage in different functions.
Definition display.h:116