Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

FT8xx reference API. More...

Macros

#define OPT_3D   FT8XX_OPT_3D
 Co-processor widget is drawn in 3D effect.
 
#define OPT_RGB565   FT8XX_OPT_RGB565
 Co-processor option to decode the JPEG image to RGB565 format.
 
#define OPT_MONO   FT8XX_OPT_MONO
 Co-processor option to decode the JPEG image to L8 format, i.e., monochrome.
 
#define OPT_NODL   FT8XX_OPT_NODL
 No display list commands generated for bitmap decoded from JPEG image.
 
#define OPT_FLAT   FT8XX_OPT_FLAT
 Co-processor widget is drawn without 3D effect.
 
#define OPT_SIGNED   FT8XX_OPT_SIGNED
 The number is treated as 32 bit signed integer.
 
#define OPT_CENTERX   FT8XX_OPT_CENTERX
 Co-processor widget centers horizontally.
 
#define OPT_CENTERY   FT8XX_OPT_CENTERY
 Co-processor widget centers vertically.
 
#define OPT_CENTER   FT8XX_OPT_CENTER
 Co-processor widget centers horizontally and vertically.
 
#define OPT_RIGHTX   FT8XX_OPT_RIGHTX
 The label on the Coprocessor widget is right justified.
 
#define OPT_NOBACK   FT8XX_OPT_NOBACK
 Co-processor widget has no background drawn.
 
#define OPT_NOTICKS   FT8XX_OPT_NOTICKS
 Co-processor clock widget is drawn without hour ticks.
 
#define OPT_NOHM   FT8XX_OPT_NOHM
 Co-processor clock widget is drawn without hour and minutes hands, only seconds hand is drawn.
 
#define OPT_NOPOINTER   FT8XX_OPT_NOPOINTER
 The Co-processor gauge has no pointer.
 
#define OPT_NOSECS   FT8XX_OPT_NOSECS
 Co-processor clock widget is drawn without seconds hand.
 
#define OPT_NOHANDS   FT8XX_OPT_NOHANDS
 Co-processor clock widget is drawn without hour, minutes and seconds hands.
 
#define BITMAPS   FT8XX_BITMAPS
 Rectangular pixel arrays, in various color formats.
 
#define POINTS   FT8XX_POINTS
 Anti-aliased points, point radius is 1-256 pixels.
 
#define LINES   FT8XX_LINES
 Anti-aliased lines, with width from 0 to 4095 1/16th of pixel units.
 
#define LINE_STRIP   FT8XX_LINE_STRIP
 Anti-aliased lines, connected head-to-tail.
 
#define EDGE_STRIP_R   FT8XX_EDGE_STRIP_R
 Edge strips for right.
 
#define EDGE_STRIP_L   FT8XX_EDGE_STRIP_L
 Edge strips for left.
 
#define EDGE_STRIP_A   FT8XX_EDGE_STRIP_A
 Edge strips for above.
 
#define EDGE_STRIP_B   FT8XX_EDGE_STRIP_B
 Edge strips for below.
 
#define RECTS   FT8XX_RECTS
 Round-cornered rectangles, curvature of the corners can be adjusted using LINE_WIDTH.
 
#define BEGIN(prim)
 Begin drawing a graphics primitive.
 
#define CLEAR(c, s, t)
 Clear buffers to preset values.
 
#define CLEAR_COLOR_RGB(red, green, blue)
 Specify clear values for red, green and blue channels.
 
#define COLOR_RGB(red, green, blue)
 Set the current color red, green and blue.
 
#define DISPLAY()
 End the display list.
 
#define END()
 End drawing a graphics primitive.
 
#define LINE_WIDTH(width)
 Specify the width of lines to be drawn with primitive LINES.
 
#define TAG(s)
 Attach the tag value for the following graphics objects.
 
#define VERTEX2F(x, y)
 Start the operation of graphics primitives at the specified coordinate.
 
#define VERTEX2II(x, y, handle, cell)
 Start the operation of graphics primitive at the specified coordinates.
 

Enumerations

enum  ft8xx_memory_map_t { RAM_G = FT810_RAM_G , RAM_DL = FT810_RAM_DL , REG_ = FT810_REG_ , RAM_CMD = FT810_RAM_CMD }
 Main parts of FT810 memory map. More...
 
enum  ft8xx_register_address_t {
  REG_TRIM = FT810_REG_TRIM , REG_ID = FT810_REG_ID , REG_FRAMES = FT810_REG_FRAMES , REG_CLOCK = FT810_REG_CLOCK ,
  REG_FREQUENCY = FT810_REG_FREQUENCY , REG_RENDERMODE = FT810_REG_RENDERMODE , REG_SNAPY = FT810_REG_SNAPY , REG_SNAPSHOT = FT810_REG_SNAPSHOT ,
  REG_CPURESET = FT810_REG_CPURESET , REG_TAP_CRC = FT810_REG_TAP_CRC , REG_TAP_MASK = FT810_REG_TAP_MASK , REG_HCYCLE = FT810_REG_HCYCLE ,
  REG_HOFFSET = FT810_REG_HOFFSET , REG_HSIZE = FT810_REG_HSIZE , REG_HSYNC0 = FT810_REG_HSYNC0 , REG_HSYNC1 = FT810_REG_HSYNC1 ,
  REG_VCYCLE = FT810_REG_VCYCLE , REG_VOFFSET = FT810_REG_VOFFSET , REG_VSIZE = FT810_REG_VSIZE , REG_VSYNC0 = FT810_REG_VSYNC0 ,
  REG_VSYNC1 = FT810_REG_VSYNC1 , REG_DLSWAP = FT810_REG_DLSWAP , REG_ROTATE = FT810_REG_ROTATE , REG_OUTBITS = FT810_REG_OUTBITS ,
  REG_DITHER = FT810_REG_DITHER , REG_SWIZZLE = FT810_REG_SWIZZLE , REG_CSPREAD = FT810_REG_CSPREAD , REG_PCLK_POL = FT810_REG_PCLK_POL ,
  REG_PCLK = FT810_REG_PCLK , REG_TAG_X = FT810_REG_TAG_X , REG_TAG_Y = FT810_REG_TAG_Y , REG_TAG = FT810_REG_TAG ,
  REG_VOL_PB = FT810_REG_VOL_PB , REG_VOL_SOUND = FT810_REG_VOL_SOUND , REG_SOUND = FT810_REG_SOUND , REG_PLAY = FT810_REG_PLAY ,
  REG_GPIO_DIR = FT810_REG_GPIO_DIR , REG_GPIO = FT810_REG_GPIO , REG_GPIOX_DIR = FT810_REG_GPIOX_DIR , REG_GPIOX = FT810_REG_GPIOX ,
  REG_INT_FLAGS = FT810_REG_INT_FLAGS , REG_INT_EN = FT810_REG_INT_EN , REG_INT_MASK = FT810_REG_INT_MASK , REG_PLAYBACK_START = FT810_REG_PLAYBACK_START ,
  REG_PLAYBACK_LENGTH = FT810_REG_PLAYBACK_LENGTH , REG_PLAYBACK_READPTR = FT810_REG_PLAYBACK_READPTR , REG_PLAYBACK_FREQ = FT810_REG_PLAYBACK_FREQ , REG_PLAYBACK_FORMAT = FT810_REG_PLAYBACK_FORMAT ,
  REG_PLAYBACK_LOOP = FT810_REG_PLAYBACK_LOOP , REG_PLAYBACK_PLAY = FT810_REG_PLAYBACK_PLAY , REG_PWM_HZ = FT810_REG_PWM_HZ , REG_PWM_DUTY = FT810_REG_PWM_DUTY ,
  REG_CMD_READ = FT810_REG_CMD_READ , REG_CMD_WRITE = FT810_REG_CMD_WRITE , REG_CMD_DL = FT810_REG_CMD_DL , REG_TOUCH_MODE = FT810_REG_TOUCH_MODE ,
  REG_TOUCH_ADC_MODE = FT810_REG_TOUCH_ADC_MODE , REG_TOUCH_CHARGE = FT810_REG_TOUCH_CHARGE , REG_TOUCH_SETTLE = FT810_REG_TOUCH_SETTLE , REG_TOUCH_OVERSAMPLE = FT810_REG_TOUCH_OVERSAMPLE ,
  REG_TOUCH_RZTHRESH = FT810_REG_TOUCH_RZTHRESH , REG_TOUCH_RAW_XY = FT810_REG_TOUCH_RAW_XY , REG_TOUCH_RZ = FT810_REG_TOUCH_RZ , REG_TOUCH_SCREEN_XY = FT810_REG_TOUCH_SCREEN_XY ,
  REG_TOUCH_TAG_XY = FT810_REG_TOUCH_TAG_XY , REG_TOUCH_TAG = FT810_REG_TOUCH_TAG , REG_TOUCH_TRANSFORM_A = FT810_REG_TOUCH_TRANSFORM_A , REG_TOUCH_TRANSFORM_B = FT810_REG_TOUCH_TRANSFORM_B ,
  REG_TOUCH_TRANSFORM_C = FT810_REG_TOUCH_TRANSFORM_C , REG_TOUCH_TRANSFORM_D = FT810_REG_TOUCH_TRANSFORM_D , REG_TOUCH_TRANSFORM_E = FT810_REG_TOUCH_TRANSFORM_E , REG_TOUCH_TRANSFORM_F = FT810_REG_TOUCH_TRANSFORM_F ,
  REG_TOUCH_CONFIG = FT810_REG_TOUCH_CONFIG , REG_SPI_WIDTH = FT810_REG_SPI_WIDTH , REG_TOUCH_DIRECT_XY = FT810_REG_TOUCH_DIRECT_XY , REG_TOUCH_DIRECT_Z1Z2 = FT810_REG_TOUCH_DIRECT_Z1Z2 ,
  REG_CMDB_SPACE = FT810_REG_CMDB_SPACE , REG_CMDB_WRITE = FT810_REG_CMDB_WRITE , REG_TRACKER = FT810_REG_TRACKER , REG_TRACKER1 = FT810_REG_TRACKER1 ,
  REG_TRACKER2 = FT810_REG_TRACKER2 , REG_TRACKER3 = FT810_REG_TRACKER3 , REG_TRACKER4 = FT810_REG_TRACKER4 , REG_MEDIAFIFO_READ = FT810_REG_MEDIAFIFO_READ ,
  REG_MEDIAFIFO_WRITE = FT810_REG_MEDIAFIFO_WRITE
}
 FT810 register addresses. More...
 

Functions

static void wr8 (uint32_t address, uint8_t data)
 Write 1 byte (8 bits) to FT8xx memory.
 
static void wr16 (uint32_t address, uint16_t data)
 Write 2 bytes (16 bits) to FT8xx memory.
 
static void wr32 (uint32_t address, uint32_t data)
 Write 4 bytes (32 bits) to FT8xx memory.
 
static uint8_t rd8 (uint32_t address)
 Read 1 byte (8 bits) from FT8xx memory.
 
static uint16_t rd16 (uint32_t address)
 Read 2 bytes (16 bits) from FT8xx memory.
 
static uint32_t rd32 (uint32_t address)
 Read 4 bytes (32 bits) from FT8xx memory.
 
static void cmd (uint32_t command)
 Execute a display list command by co-processor engine.
 
static void cmd_dlstart (void)
 Start a new display list.
 
static void cmd_swap (void)
 Swap the current display list.
 
static void cmd_text (int16_t x, int16_t y, int16_t font, uint16_t options, const char *s)
 Draw text.
 
static void cmd_number (int16_t x, int16_t y, int16_t font, uint16_t options, int32_t n)
 Draw a decimal number.
 
static void cmd_calibrate (uint32_t *result)
 Execute the touch screen calibration routine.
 

Detailed Description

FT8xx reference API.

API defined according to FT800 Programmers Guide API reference definition.

Note
Function names defined in this header may easily collide with names provided by other modules. Include this header with caution. If naming conflict occurs instead of including this header, use ft8xx_ prefixed names.

Macro Definition Documentation

◆ BEGIN

#define BEGIN ( prim)

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

Value:
#define FT8XX_BEGIN(prim)
Begin drawing a graphics primitive.
Definition ft8xx_dl.h:76

Begin drawing a graphics primitive.

The valid primitives are defined as:

The primitive to be drawn is selected by the BEGIN command. Once the primitive is selected, it will be valid till the new primitive is selected by the BEGIN command.

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

◆ BITMAPS

#define BITMAPS   FT8XX_BITMAPS

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

Rectangular pixel arrays, in various color formats.

◆ CLEAR

#define CLEAR ( c,
s,
t )

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

Value:
FT8XX_CLEAR(c, s, t)
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
#define FT8XX_CLEAR(c, s, t)
Clear buffers to preset values.
Definition ft8xx_dl.h:101

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 CLEAR_COLOR_RGB for RGB channel and 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 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 CLEAR_TAG.

Parameters
cClear color buffer
sClear stencil buffer
tClear tag buffer

◆ CLEAR_COLOR_RGB

#define CLEAR_COLOR_RGB ( red,
green,
blue )

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

Value:
FT8XX_CLEAR_COLOR_RGB(red, green, blue)
#define FT8XX_CLEAR_COLOR_RGB(red, green, blue)
Specify clear values for red, green and blue channels.
Definition ft8xx_dl.h:113

Specify clear values for red, green and blue channels.

Sets the color values used by a following 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

◆ COLOR_RGB

#define COLOR_RGB ( red,
green,
blue )

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

Value:
FT8XX_COLOR_RGB(red, green, blue)
#define FT8XX_COLOR_RGB(red, green, blue)
Set the current color red, green and blue.
Definition ft8xx_dl.h:128

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

◆ DISPLAY

#define DISPLAY ( )

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

Value:
#define FT8XX_DISPLAY()
End the display list.
Definition ft8xx_dl.h:138

End the display list.

FT8xx will ignore all the commands following this command.

◆ EDGE_STRIP_A

#define EDGE_STRIP_A   FT8XX_EDGE_STRIP_A

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

Edge strips for above.

◆ EDGE_STRIP_B

#define EDGE_STRIP_B   FT8XX_EDGE_STRIP_B

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

Edge strips for below.

◆ EDGE_STRIP_L

#define EDGE_STRIP_L   FT8XX_EDGE_STRIP_L

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

Edge strips for left.

◆ EDGE_STRIP_R

#define EDGE_STRIP_R   FT8XX_EDGE_STRIP_R

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

Edge strips for right.

◆ END

#define END ( )

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

Value:
#define FT8XX_END()
End drawing a graphics primitive.
Definition ft8xx_dl.h:147

End drawing a graphics primitive.

It is recommended to have an END for each BEGIN. Whereas advanced users can avoid the usage of END in order to save extra graphics instructions in the display list RAM.

◆ LINE_STRIP

#define LINE_STRIP   FT8XX_LINE_STRIP

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

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

◆ LINE_WIDTH

#define LINE_WIDTH ( width)

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

Value:
#define FT8XX_LINE_WIDTH(width)
Specify the width of lines to be drawn with primitive FT8XX_LINES.
Definition ft8xx_dl.h:162

Specify the width of lines to be drawn with primitive 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 LINE_WIDTH command will affect the LINES, LINE_STRIP, RECTS, EDGE_STRIP_A /B/R/L primitives.
Parameters
widthLine width in 1/16 pixel

◆ LINES

#define LINES   FT8XX_LINES

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

Anti-aliased lines, with width from 0 to 4095 1/16th of pixel units.

(width is from center of the line to boundary)

◆ OPT_3D

#define OPT_3D   FT8XX_OPT_3D

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

Co-processor widget is drawn in 3D effect.

◆ OPT_CENTER

#define OPT_CENTER   FT8XX_OPT_CENTER

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

Co-processor widget centers horizontally and vertically.

◆ OPT_CENTERX

#define OPT_CENTERX   FT8XX_OPT_CENTERX

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

Co-processor widget centers horizontally.

◆ OPT_CENTERY

#define OPT_CENTERY   FT8XX_OPT_CENTERY

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

Co-processor widget centers vertically.

◆ OPT_FLAT

#define OPT_FLAT   FT8XX_OPT_FLAT

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

Co-processor widget is drawn without 3D effect.

◆ OPT_MONO

#define OPT_MONO   FT8XX_OPT_MONO

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

Co-processor option to decode the JPEG image to L8 format, i.e., monochrome.

◆ OPT_NOBACK

#define OPT_NOBACK   FT8XX_OPT_NOBACK

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

Co-processor widget has no background drawn.

◆ OPT_NODL

#define OPT_NODL   FT8XX_OPT_NODL

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

No display list commands generated for bitmap decoded from JPEG image.

◆ OPT_NOHANDS

#define OPT_NOHANDS   FT8XX_OPT_NOHANDS

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

Co-processor clock widget is drawn without hour, minutes and seconds hands.

◆ OPT_NOHM

#define OPT_NOHM   FT8XX_OPT_NOHM

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

Co-processor clock widget is drawn without hour and minutes hands, only seconds hand is drawn.

◆ OPT_NOPOINTER

#define OPT_NOPOINTER   FT8XX_OPT_NOPOINTER

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

The Co-processor gauge has no pointer.

◆ OPT_NOSECS

#define OPT_NOSECS   FT8XX_OPT_NOSECS

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

Co-processor clock widget is drawn without seconds hand.

◆ OPT_NOTICKS

#define OPT_NOTICKS   FT8XX_OPT_NOTICKS

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

Co-processor clock widget is drawn without hour ticks.

Gauge widget is drawn without major and minor ticks.

◆ OPT_RGB565

#define OPT_RGB565   FT8XX_OPT_RGB565

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

Co-processor option to decode the JPEG image to RGB565 format.

◆ OPT_RIGHTX

#define OPT_RIGHTX   FT8XX_OPT_RIGHTX

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

The label on the Coprocessor widget is right justified.

◆ OPT_SIGNED

#define OPT_SIGNED   FT8XX_OPT_SIGNED

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

The number is treated as 32 bit signed integer.

◆ POINTS

#define POINTS   FT8XX_POINTS

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

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

◆ RECTS

#define RECTS   FT8XX_RECTS

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

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

◆ TAG

#define TAG ( s)

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

Value:
#define FT8XX_TAG(s)
Attach the tag value for the following graphics objects.
Definition ft8xx_dl.h:183

Attach the tag value for the following graphics objects.

The initial value of the tag buffer of the FT8xx is specified by command CLEAR_TAG and taken effect by command CLEAR. 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 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 REG_TOUCH_TAG will be updated with the tag value of the graphics object being touched. If there is no TAG commands in one display list, all the graphics objects rendered by the display list will report tag value as 255 in REG_TOUCH_TAG when they were touched.

Parameters
sTag value 1-255

◆ VERTEX2F

#define VERTEX2F ( x,
y )

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

Value:
#define FT8XX_VERTEX2F(x, y)
Start the operation of graphics primitives at the specified coordinate.
Definition ft8xx_dl.h:197

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

◆ VERTEX2II

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

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

Value:
FT8XX_VERTEX2II(x, y, handle, cell)
#define FT8XX_VERTEX2II(x, y, handle, cell)
Start the operation of graphics primitive at the specified coordinates.
Definition ft8xx_dl.h:216

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

Enumeration Type Documentation

◆ ft8xx_memory_map_t

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

Main parts of FT810 memory map.

Enumerator
RAM_G 
RAM_DL 
REG_ 
RAM_CMD 

◆ ft8xx_register_address_t

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

FT810 register addresses.

Enumerator
REG_TRIM 
REG_ID 
REG_FRAMES 
REG_CLOCK 
REG_FREQUENCY 
REG_RENDERMODE 
REG_SNAPY 
REG_SNAPSHOT 
REG_CPURESET 
REG_TAP_CRC 
REG_TAP_MASK 
REG_HCYCLE 
REG_HOFFSET 
REG_HSIZE 
REG_HSYNC0 
REG_HSYNC1 
REG_VCYCLE 
REG_VOFFSET 
REG_VSIZE 
REG_VSYNC0 
REG_VSYNC1 
REG_DLSWAP 
REG_ROTATE 
REG_OUTBITS 
REG_DITHER 
REG_SWIZZLE 
REG_CSPREAD 
REG_PCLK_POL 
REG_PCLK 
REG_TAG_X 
REG_TAG_Y 
REG_TAG 
REG_VOL_PB 
REG_VOL_SOUND 
REG_SOUND 
REG_PLAY 
REG_GPIO_DIR 
REG_GPIO 
REG_GPIOX_DIR 
REG_GPIOX 
REG_INT_FLAGS 
REG_INT_EN 
REG_INT_MASK 
REG_PLAYBACK_START 
REG_PLAYBACK_LENGTH 
REG_PLAYBACK_READPTR 
REG_PLAYBACK_FREQ 
REG_PLAYBACK_FORMAT 
REG_PLAYBACK_LOOP 
REG_PLAYBACK_PLAY 
REG_PWM_HZ 
REG_PWM_DUTY 
REG_CMD_READ 
REG_CMD_WRITE 
REG_CMD_DL 
REG_TOUCH_MODE 
REG_TOUCH_ADC_MODE 
REG_TOUCH_CHARGE 
REG_TOUCH_SETTLE 
REG_TOUCH_OVERSAMPLE 
REG_TOUCH_RZTHRESH 
REG_TOUCH_RAW_XY 
REG_TOUCH_RZ 
REG_TOUCH_SCREEN_XY 
REG_TOUCH_TAG_XY 
REG_TOUCH_TAG 
REG_TOUCH_TRANSFORM_A 
REG_TOUCH_TRANSFORM_B 
REG_TOUCH_TRANSFORM_C 
REG_TOUCH_TRANSFORM_D 
REG_TOUCH_TRANSFORM_E 
REG_TOUCH_TRANSFORM_F 
REG_TOUCH_CONFIG 
REG_SPI_WIDTH 
REG_TOUCH_DIRECT_XY 
REG_TOUCH_DIRECT_Z1Z2 
REG_CMDB_SPACE 
REG_CMDB_WRITE 
REG_TRACKER 
REG_TRACKER1 
REG_TRACKER2 
REG_TRACKER3 
REG_TRACKER4 
REG_MEDIAFIFO_READ 
REG_MEDIAFIFO_WRITE 

Function Documentation

◆ cmd()

static void cmd ( uint32_t command)
inlinestatic

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

Execute a display list command by co-processor engine.

Parameters
commandDisplay list command to execute

◆ cmd_calibrate()

static void cmd_calibrate ( uint32_t * result)
inlinestatic

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

Execute the touch screen calibration routine.

The calibration procedure collects three touches from the touch screen, then computes and loads an appropriate matrix into REG_TOUCH_TRANSFORM_A-F. To use it, create a display list and then use CMD_CALIBRATE. The co-processor engine overlays the touch targets on the current display list, gathers the calibration input and updates REG_TOUCH_TRANSFORM_A-F.

Parameters
resultCalibration result, written with 0 on failure of calibration

◆ cmd_dlstart()

static void cmd_dlstart ( void )
inlinestatic

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

Start a new display list.

◆ cmd_number()

static void cmd_number ( int16_t x,
int16_t y,
int16_t font,
uint16_t options,
int32_t n )
inlinestatic

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

Draw a decimal number.

By default (x, y) is the top-left pixel of the text. OPT_CENTERX centers the text horizontally, OPT_CENTERY centers it vertically. OPT_CENTER centers the text in both directions. OPT_RIGHTX right-justifies the text, so that the x is the rightmost pixel. By default the number is displayed with no leading zeroes, but if a width 1-9 is specified in the options, then the number is padded if necessary with leading zeroes so that it has the given width. If OPT_SIGNED is given, the number is treated as signed, and prefixed by a minus sign if negative.

Parameters
xx-coordinate of text base, in pixels
yy-coordinate of text base, in pixels
fontFont to use for text, 0-31. 16-31 are ROM fonts
optionsOptions to apply
nThe number to display.

◆ cmd_swap()

static void cmd_swap ( void )
inlinestatic

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

Swap the current display list.

◆ cmd_text()

static void cmd_text ( int16_t x,
int16_t y,
int16_t font,
uint16_t options,
const char * s )
inlinestatic

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

Draw text.

By default (x,y) is the top-left pixel of the text and the value of options is zero. OPT_CENTERX centers the text horizontally, OPT_CENTERY centers it vertically. OPT_CENTER centers the text in both directions. OPT_RIGHTX right-justifies the text, so that the x is the rightmost pixel.

Parameters
xx-coordinate of text base, in pixels
yy-coordinate of text base, in pixels
fontFont to use for text, 0-31. 16-31 are ROM fonts
optionsOptions to apply
sCharacter string to display, terminated with a null character

◆ rd16()

static uint16_t rd16 ( uint32_t address)
inlinestatic

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

Read 2 bytes (16 bits) from FT8xx memory.

Parameters
addressMemory address to read from
Returns
Value read from memory

◆ rd32()

static uint32_t rd32 ( uint32_t address)
inlinestatic

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

Read 4 bytes (32 bits) from FT8xx memory.

Parameters
addressMemory address to read from
Returns
Value read from memory

◆ rd8()

static uint8_t rd8 ( uint32_t address)
inlinestatic

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

Read 1 byte (8 bits) from FT8xx memory.

Parameters
addressMemory address to read from
Returns
Value read from memory

◆ wr16()

static void wr16 ( uint32_t address,
uint16_t data )
inlinestatic

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

Write 2 bytes (16 bits) to FT8xx memory.

Parameters
addressMemory address to write to
dataValue to write

◆ wr32()

static void wr32 ( uint32_t address,
uint32_t data )
inlinestatic

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

Write 4 bytes (32 bits) to FT8xx memory.

Parameters
addressMemory address to write to
dataValue to write

◆ wr8()

static void wr8 ( uint32_t address,
uint8_t data )
inlinestatic

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

Write 1 byte (8 bits) to FT8xx memory.

Parameters
addressMemory address to write to
dataByte to write