Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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)   (0x1f000000 | ((prim) & 0x0f))
 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()   0
 End the display list.
 
#define FT8XX_END()   0x21000000
 End drawing a graphics primitive.
 
#define FT8XX_LINE_WIDTH(width)   (0x0e000000 | ((uint32_t)(width) & 0xfff))
 Specify the width of lines to be drawn with primitive FT8XX_LINES.
 
#define FT8XX_TAG(s)   (0x03000000 | (uint8_t)(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.
 

Detailed Description

FT8xx display list commands.

Macro Definition Documentation

◆ FT8XX_BEGIN

#define FT8XX_BEGIN (   prim)    (0x1f000000 | ((prim) & 0x0f))

#include <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.

Note
The primitive drawing operation will not be performed until FT8XX_VERTEX2II or FT8XX_VERTEX2F is executed.
Parameters
primGraphics primitive

◆ FT8XX_BITMAPS

#define FT8XX_BITMAPS   1U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Rectangular pixel arrays, in various color formats.

◆ FT8XX_CLEAR

#define FT8XX_CLEAR (   c,
  s,
  t 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Value:
(0x26000000 | \
((c) ? 0x04 : 0) | ((s) ? 0x02 : 0) | ((t) ? 0x01 : 0))
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa s
Definition asm-macro-32-bit-gnu.h:17
struct k_thread t
Definition kobject.c:1324
char c
Definition printk.c:169

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.

Parameters
cClear color buffer
sClear stencil buffer
tClear tag buffer

◆ FT8XX_CLEAR_COLOR_RGB

#define FT8XX_CLEAR_COLOR_RGB (   red,
  green,
  blue 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Value:
(0x02000000 | \
(((uint32_t)(red) & 0xff) << 16) | \
(((uint32_t)(green) & 0xff) << 8) | \
((uint32_t)(blue) & 0xff))
__UINT32_TYPE__ uint32_t
Definition stdint.h:90

Specify clear values for red, green and blue channels.

Sets the color values used by a following FT8XX_CLEAR.

Parameters
redRed value used when the color buffer is cleared
greenGreen value used when the color buffer is cleared
blueBlue value used when the color buffer is cleared

◆ FT8XX_COLOR_RGB

#define FT8XX_COLOR_RGB (   red,
  green,
  blue 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Value:
(0x04000000 | \
(((uint32_t)(red) & 0xff) << 16) | \
(((uint32_t)(green) & 0xff) << 8) | \
((uint32_t)(blue) & 0xff))

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.

Parameters
redRed value for the current color
greenGreen value for the current color
blueBlue value for the current color

◆ FT8XX_DISPLAY

#define FT8XX_DISPLAY ( )    0

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

End the display list.

FT8xx will ignore all the commands following this command.

◆ FT8XX_EDGE_STRIP_A

#define FT8XX_EDGE_STRIP_A   7U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Edge strips for above.

◆ FT8XX_EDGE_STRIP_B

#define FT8XX_EDGE_STRIP_B   8U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Edge strips for below.

◆ FT8XX_EDGE_STRIP_L

#define FT8XX_EDGE_STRIP_L   6U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Edge strips for left.

◆ FT8XX_EDGE_STRIP_R

#define FT8XX_EDGE_STRIP_R   5U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Edge strips for right.

◆ FT8XX_END

#define FT8XX_END ( )    0x21000000

#include <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.

◆ FT8XX_LINE_STRIP

#define FT8XX_LINE_STRIP   4U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Anti-aliased lines, connected head-to-tail.

◆ FT8XX_LINE_WIDTH

#define FT8XX_LINE_WIDTH (   width)    (0x0e000000 | ((uint32_t)(width) & 0xfff))

#include <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.

Note
The FT8XX_LINE_WIDTH command will affect the FT8XX_LINES, FT8XX_LINE_STRIP, FT8XX_RECTS, FT8XX_EDGE_STRIP_A /B/R/L primitives.
Parameters
widthLine width in 1/16 pixel

◆ FT8XX_LINES

#define FT8XX_LINES   3U

#include <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)

◆ FT8XX_POINTS

#define FT8XX_POINTS   2U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Anti-aliased points, point radius is 1-256 pixels.

◆ FT8XX_RECTS

#define FT8XX_RECTS   9U

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Round-cornered rectangles, curvature of the corners can be adjusted using FT8XX_LINE_WIDTH.

◆ FT8XX_TAG

#define FT8XX_TAG (   s)    (0x03000000 | (uint8_t)(s))

#include <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.

Parameters
sTag value 1-255

◆ FT8XX_VERTEX2F

#define FT8XX_VERTEX2F (   x,
 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Value:
(0x40000000 | \
(((int32_t)(x) & 0x7fff) << 15) | \
((int32_t)(y) & 0x7fff))
__INT32_TYPE__ int32_t
Definition stdint.h:74

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.

Parameters
xSigned x-coordinate in 1/16 pixel precision
ySigned y-coordinate in 1/16 pixel precision

◆ FT8XX_VERTEX2II

#define FT8XX_VERTEX2II (   x,
  y,
  handle,
  cell 
)

#include <include/zephyr/drivers/misc/ft8xx/ft8xx_dl.h>

Value:
(0x80000000 | \
(((uint32_t)(x) & 0x01ff) << 21) | \
(((uint32_t)(y) & 0x01ff) << 12) | \
(((uint32_t)(handle) & 0x1f) << 7) | \
((uint32_t)(cell) & 0x7f))

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.

Parameters
xx-coordinate in pixels, from 0 to 511
yy-coordinate in pixels, from 0 to 511
handleBitmap handle
cellCell number