Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ft8xx_reference_api.h File Reference

FT8XX reference API. More...

Go to the source code of this file.

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.