Zephyr API 3.6.99
|
FT8xx display list commands . More...
Macros | |
#define | FT8XX_BITMAPS 1U |
Rectangular pixel arrays, in various color formats. | |
#define | FT8XX_POINTS 2U |
Anti-aliased points, point radius is 1-256 pixels. | |
#define | FT8XX_LINES 3U |
Anti-aliased lines, with width from 0 to 4095 1/16th of pixel units. | |
#define | FT8XX_LINE_STRIP 4U |
Anti-aliased lines, connected head-to-tail. | |
#define | FT8XX_EDGE_STRIP_R 5U |
Edge strips for right. | |
#define | FT8XX_EDGE_STRIP_L 6U |
Edge strips for left. | |
#define | FT8XX_EDGE_STRIP_A 7U |
Edge strips for above. | |
#define | FT8XX_EDGE_STRIP_B 8U |
Edge strips for below. | |
#define | FT8XX_RECTS 9U |
Round-cornered rectangles, curvature of the corners can be adjusted using FT8XX_LINE_WIDTH. | |
#define | FT8XX_BEGIN(prim) |
Begin drawing a graphics primitive. | |
#define | FT8XX_CLEAR(c, s, t) |
Clear buffers to preset values. | |
#define | FT8XX_CLEAR_COLOR_RGB(red, green, blue) |
Specify clear values for red, green and blue channels. | |
#define | FT8XX_COLOR_RGB(red, green, blue) |
Set the current color red, green and blue. | |
#define | FT8XX_DISPLAY() |
End the display list. | |
#define | FT8XX_END() |
End drawing a graphics primitive. | |
#define | FT8XX_LINE_WIDTH(width) |
Specify the width of lines to be drawn with primitive FT8XX_LINES. | |
#define | FT8XX_TAG(s) |
Attach the tag value for the following graphics objects. | |
#define | FT8XX_VERTEX2F(x, y) |
Start the operation of graphics primitives at the specified coordinate. | |
#define | FT8XX_VERTEX2II(x, y, handle, cell) |
Start the operation of graphics primitive at the specified coordinates. | |
FT8xx display list commands .
#define FT8XX_BEGIN | ( | prim | ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Begin drawing a graphics primitive.
The valid primitives are defined as:
The primitive to be drawn is selected by the FT8XX_BEGIN command. Once the primitive is selected, it will be valid till the new primitive is selected by the FT8XX_BEGIN command.
prim | Graphics primitive |
#define FT8XX_BITMAPS 1U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Rectangular pixel arrays, in various color formats.
#define FT8XX_CLEAR | ( | c, | |
s, | |||
t ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Clear buffers to preset values.
Setting c
to true will clear the color buffer of the FT8xx to the preset value. Setting this bit to false will maintain the color buffer of the FT8xx with an unchanged value. The preset value is defined in command FT8XX_CLEAR_COLOR_RGB for RGB channel and FT8XX_CLEAR_COLOR_A for alpha channel.
Setting s
to true will clear the stencil buffer of the FT8xx to the preset value. Setting this bit to false will maintain the stencil buffer of the FT8xx with an unchanged value. The preset value is defined in command FT8XX_CLEAR_STENCIL.
Setting t
to true will clear the tag buffer of the FT8xx to the preset value. Setting this bit to false will maintain the tag buffer of the FT8xx with an unchanged value. The preset value is defined in command FT8XX_CLEAR_TAG.
c | Clear color buffer |
s | Clear stencil buffer |
t | Clear tag buffer |
#define FT8XX_CLEAR_COLOR_RGB | ( | red, | |
green, | |||
blue ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Specify clear values for red, green and blue channels.
Sets the color values used by a following FT8XX_CLEAR.
red | Red value used when the color buffer is cleared |
green | Green value used when the color buffer is cleared |
blue | Blue value used when the color buffer is cleared |
#define FT8XX_COLOR_RGB | ( | red, | |
green, | |||
blue ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Set the current color red, green and blue.
Sets red, green and blue values of the FT8xx color buffer which will be applied to the following draw operation.
red | Red value for the current color |
green | Green value for the current color |
blue | Blue value for the current color |
#define FT8XX_DISPLAY | ( | ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
End the display list.
FT8xx will ignore all the commands following this command.
#define FT8XX_EDGE_STRIP_A 7U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Edge strips for above.
#define FT8XX_EDGE_STRIP_B 8U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Edge strips for below.
#define FT8XX_EDGE_STRIP_L 6U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Edge strips for left.
#define FT8XX_EDGE_STRIP_R 5U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Edge strips for right.
#define FT8XX_END | ( | ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
End drawing a graphics primitive.
It is recommended to have an FT8XX_END for each FT8XX_BEGIN. Whereas advanced users can avoid the usage of FT8XX_END in order to save extra graphics instructions in the display list RAM.
#define FT8XX_LINE_STRIP 4U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Anti-aliased lines, connected head-to-tail.
#define FT8XX_LINE_WIDTH | ( | width | ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Specify the width of lines to be drawn with primitive FT8XX_LINES.
Sets the width of drawn lines. The width is the distance from the center of the line to the outermost drawn pixel, in units of 1/16 pixel. The valid range is from 16 to 4095 in terms of 1/16th pixel units.
width | Line width in 1/16 pixel |
#define FT8XX_LINES 3U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Anti-aliased lines, with width from 0 to 4095 1/16th of pixel units.
(width is from center of the line to boundary)
#define FT8XX_POINTS 2U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Anti-aliased points, point radius is 1-256 pixels.
#define FT8XX_RECTS 9U |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Round-cornered rectangles, curvature of the corners can be adjusted using FT8XX_LINE_WIDTH.
#define FT8XX_TAG | ( | s | ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Attach the tag value for the following graphics objects.
The initial value of the tag buffer of the FT8xx is specified by command FT8XX_CLEAR_TAG and taken effect by command FT8XX_CLEAR. FT8XX_TAG command can specify the value of the tag buffer of the FT8xx that applies to the graphics objects when they are drawn on the screen. This tag value will be assigned to all the following objects, unless the FT8XX_TAG_MASK command is used to disable it. Once the following graphics objects are drawn, they are attached with the tag value successfully. When the graphics objects attached with the tag value are touched, the register FT800_REG_TOUCH_TAG or FT810_REG_TOUCH_TAG will be updated with the tag value of the graphics object being touched. If there is no FT8XX_TAG commands in one display list, all the graphics objects rendered by the display list will report tag value as 255 in FT800_REG_TOUCH_TAG or FT810_REG_TOUCH_TAG when they were touched.
s | Tag value 1-255 |
#define FT8XX_VERTEX2F | ( | x, | |
y ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Start the operation of graphics primitives at the specified coordinate.
The range of coordinates is from -16384 to +16383 in terms of 1/16th pixel units. The negative x coordinate value means the coordinate in the left virtual screen from (0, 0), while the negative y coordinate value means the coordinate in the upper virtual screen from (0, 0). If drawing on the negative coordinate position, the drawing operation will not be visible.
x | Signed x-coordinate in 1/16 pixel precision |
y | Signed y-coordinate in 1/16 pixel precision |
#define FT8XX_VERTEX2II | ( | x, | |
y, | |||
handle, | |||
cell ) |
#include <zephyr/drivers/misc/ft8xx/ft8xx_dl.h>
Start the operation of graphics primitive at the specified coordinates.
The valid range of handle
is from 0 to 31. From 16 to 31 the bitmap handle is dedicated to the FT8xx built-in font.
Cell number is the index of bitmap with same bitmap layout and format. For example, for handle 31, the cell 65 means the character "A" in the largest built in font.
x | x-coordinate in pixels, from 0 to 511 |
y | y-coordinate in pixels, from 0 to 511 |
handle | Bitmap handle |
cell | Cell number |