Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS

FT8xx co-processor engine functions. More...

Macros

#define FT8XX_OPT_3D   0
 
#define FT8XX_OPT_RGB565   0
 
#define FT8XX_OPT_MONO   1
 
#define FT8XX_OPT_NODL   2
 
#define FT8XX_OPT_FLAT   256
 
#define FT8XX_OPT_SIGNED   256
 
#define FT8XX_OPT_CENTERX   512
 
#define FT8XX_OPT_CENTERY   1024
 
#define FT8XX_OPT_CENTER   1536
 
#define FT8XX_OPT_RIGHTX   2048
 
#define FT8XX_OPT_NOBACK   4096
 
#define FT8XX_OPT_NOTICKS   8192
 
#define FT8XX_OPT_NOHM   16384
 
#define FT8XX_OPT_NOPOINTER   16384
 
#define FT8XX_OPT_NOSECS   32768
 
#define FT8XX_OPT_NOHANDS   49152
 

Functions

void ft8xx_copro_cmd (uint32_t cmd)
 Execute a display list command by co-processor engine. More...
 
void ft8xx_copro_cmd_dlstart (void)
 Start a new display list. More...
 
void ft8xx_copro_cmd_swap (void)
 Swap the current display list. More...
 
void ft8xx_copro_cmd_text (int16_t x, int16_t y, int16_t font, uint16_t options, const char *s)
 Draw text. More...
 
void ft8xx_copro_cmd_number (int16_t x, int16_t y, int16_t font, uint16_t options, int32_t n)
 Draw a decimal number. More...
 
void ft8xx_copro_cmd_calibrate (uint32_t *result)
 Execute the touch screen calibration routine. More...
 

Detailed Description

FT8xx co-processor engine functions.

Macro Definition Documentation

◆ FT8XX_OPT_3D

#define FT8XX_OPT_3D   0

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor widget is drawn in 3D effect

◆ FT8XX_OPT_CENTER

#define FT8XX_OPT_CENTER   1536

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor widget centers horizontally and vertically

◆ FT8XX_OPT_CENTERX

#define FT8XX_OPT_CENTERX   512

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor widget centers horizontally

◆ FT8XX_OPT_CENTERY

#define FT8XX_OPT_CENTERY   1024

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor widget centers vertically

◆ FT8XX_OPT_FLAT

#define FT8XX_OPT_FLAT   256

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor widget is drawn without 3D effect

◆ FT8XX_OPT_MONO

#define FT8XX_OPT_MONO   1

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

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

◆ FT8XX_OPT_NOBACK

#define FT8XX_OPT_NOBACK   4096

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor widget has no background drawn

◆ FT8XX_OPT_NODL

#define FT8XX_OPT_NODL   2

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

No display list commands generated for bitmap decoded from JPEG image

◆ FT8XX_OPT_NOHANDS

#define FT8XX_OPT_NOHANDS   49152

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

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

◆ FT8XX_OPT_NOHM

#define FT8XX_OPT_NOHM   16384

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

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

◆ FT8XX_OPT_NOPOINTER

#define FT8XX_OPT_NOPOINTER   16384

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

The Co-processor gauge has no pointer

◆ FT8XX_OPT_NOSECS

#define FT8XX_OPT_NOSECS   32768

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor clock widget is drawn without seconds hand

◆ FT8XX_OPT_NOTICKS

#define FT8XX_OPT_NOTICKS   8192

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Co-processor clock widget is drawn without hour ticks. Gauge widget is drawn without major and minor ticks.

◆ FT8XX_OPT_RGB565

#define FT8XX_OPT_RGB565   0

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

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

◆ FT8XX_OPT_RIGHTX

#define FT8XX_OPT_RIGHTX   2048

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

The label on the Coprocessor widget is right justified

◆ FT8XX_OPT_SIGNED

#define FT8XX_OPT_SIGNED   256

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

The number is treated as 32 bit signed integer

Function Documentation

◆ ft8xx_copro_cmd()

void ft8xx_copro_cmd ( uint32_t  cmd)

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Execute a display list command by co-processor engine.

Parameters
cmdDisplay list command to execute

◆ ft8xx_copro_cmd_calibrate()

void ft8xx_copro_cmd_calibrate ( uint32_t result)

#include <include/drivers/misc/ft8xx/ft8xx_copro.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

◆ ft8xx_copro_cmd_dlstart()

void ft8xx_copro_cmd_dlstart ( void  )

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Start a new display list.

◆ ft8xx_copro_cmd_number()

void ft8xx_copro_cmd_number ( int16_t  x,
int16_t  y,
int16_t  font,
uint16_t  options,
int32_t  n 
)

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Draw a decimal number.

By default (x, y) is the top-left pixel of the text. FT8XX_OPT_CENTERX centers the text horizontally, FT8XX_OPT_CENTERY centers it vertically. FT8XX_OPT_CENTER centers the text in both directions. FT8XX_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 FT8XX_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.

◆ ft8xx_copro_cmd_swap()

void ft8xx_copro_cmd_swap ( void  )

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Swap the current display list.

◆ ft8xx_copro_cmd_text()

void ft8xx_copro_cmd_text ( int16_t  x,
int16_t  y,
int16_t  font,
uint16_t  options,
const char *  s 
)

#include <include/drivers/misc/ft8xx/ft8xx_copro.h>

Draw text.

By default (x, y) is the top-left pixel of the text and the value of options is zero. FT8XX_OPT_CENTERX centers the text horizontally, FT8XX_OPT_CENTERY centers it vertically. FT8XX_OPT_CENTER centers the text in both directions. FT8XX_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