Data Structures | |
struct | DisplayInfo |
Defines | |
#define | DISPLAYLIB_API _declspec(dllimport) |
#define | DISPLAYLIB_OK 1 |
#define | DISPLAYLIB_ERROR 0 |
#define | DISPLAYLIB_OPEN_WITH_USERNAME 0x01 |
#define | DISPLAYLIB_INVERTMODE 1000 |
#define | DISPLAYLIB_ERROR_WRONG_MODE -2 |
#define | DISPLAYLIB_ERROR_FILE_NOT_FOUND -100 |
#define | DISPLAYLIB_ERROR_ALLOCATING_MEMORY -101 |
#define | DISPLAYLIB_ERROR_NOT_ENOUGH_ROOM_IN_DEVICE -200 |
#define | DISPLAYLIB_ERROR_ERROR_SAVING_DATA_OBJECT -201 |
#define | DISPLAYLIB_TRUE 1 |
#define | DISPLAYLIB_FALSE 0 |
#define | EXPORT0_IO 1 |
#define | EXPORT0_UART_I2C 2 |
#define | EXPORT0_PWM_I2C 3 |
#define | EXPORT0_UART_IO 4 |
#define | EXPORT0_T6963C 5 |
#define | EXPORT0_KS0108 6 |
#define | EXPORT1_IO 1 |
#define | EXPORT1_SPI_PWM 2 |
#define | EXPORT1_SPI_IO 3 |
#define | EXPORT1_TOUCHSCREEN 4 |
#define | EXPORT1_T6963C 5 |
#define | EXPORT1_KS0108 6 |
#define | SPI_SSEL_AUTO 0 |
#define | SPI_SSEL_BUFFER 1 |
#define | SPI_SSEL_MANUAL 2 |
#define | SPI_SSEL_LOW 0 |
#define | SPI_SSEL_HIGH 1 |
#define | OPEN_WITH_USERNAME 0x01 |
Typedefs | |
typedef unsigned int | uint32_t |
typedef unsigned char | uint8_t |
Enumerations | |
enum | PIXEL_FORMAT { PF_1BPP = 0, PF_2BPP, PF_4BPP, PF_8BPP, PF_16BPP, PF_32BPP } |
enum | FPSHIFT_DIV { DIV_4_1 = 0, DIV_8_1, DIV_16_1 } |
Functions | |
DISPLAYLIB_API int _stdcall | DisplayLib_GetNumberOfDisplays (void) |
Returns the number of attached displays. | |
DISPLAYLIB_API int _stdcall | DisplayLib_GetDisplayConfiguration (uint32_t index, DisplayInfo *di) |
Get display configuration information for specified display. | |
DISPLAYLIB_API int _stdcall | DisplayLib_OpenDisplay (DisplayInfo *di, uint32_t flags) |
Open the display. | |
DISPLAYLIB_API int _stdcall | DisplayLib_CloseDisplay (DisplayInfo *di) |
Close the display. | |
DISPLAYLIB_API int _stdcall | DisplayLib_DrawScreen (DisplayInfo *di, uint8_t *fb) |
Draw full screen image to the display. | |
DISPLAYLIB_API int _stdcall | DisplayLib_DrawRect (DisplayInfo *di, uint8_t *fb, uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
Draw a rectangle area to the display. | |
DISPLAYLIB_API int _stdcall | DisplayLib_DrawRectFromScrBuf (DisplayInfo *di, uint8_t *fb, uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
Draw a rectangle area to the display from a full screen sized buffer. | |
DISPLAYLIB_API int _stdcall | DisplayLib_SetBacklight (DisplayInfo *di, uint32_t onOff, uint32_t brightness) |
Set backlight values. | |
DISPLAYLIB_API int _stdcall | DisplayLib_SetDisplayLibOption (DisplayInfo *di, uint32_t option, uint32_t value) |
Set DisplayLib options. | |
DISPLAYLIB_API int _stdcall | DisplayLib_VersionInfo (uint32_t *libFWVer, uint32_t *libVer) |
Gets version information. | |
DISPLAYLIB_API int _stdcall | DisplayLib_WriteText (DisplayInfo *di, char *text, uint32_t size, uint32_t x, uint32_t y) |
Writes text to the display. | |
DISPLAYLIB_API int _stdcall | DisplayLib_WriteS1D13700Command (DisplayInfo *di, uint8_t cmd, uint32_t queue) |
Write S1D13700 command byte. | |
DISPLAYLIB_API int _stdcall | DisplayLib_WriteS1D13700DataByte (DisplayInfo *di, uint8_t data, uint32_t queue) |
Write S1D13700 data byte. | |
DISPLAYLIB_API int _stdcall | DisplayLib_WriteS1D13700Data (DisplayInfo *di, uint8_t *data, uint32_t size, uint32_t queue) |
Write S1D13700 data bytes. | |
DISPLAYLIB_API int _stdcall | DisplayLib_WriteS1D13700ExecuteQueue (DisplayInfo *di) |
Write S1D13700 queue to the controller. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ClearS1D13700Queue (DisplayInfo *di) |
Clear S1D13700 queue. | |
DISPLAYLIB_API int _stdcall | DisplayLib_GetS1D13700QueueLength (DisplayInfo *di, uint32_t *length) |
Get S1D13700 queue length. | |
DISPLAYLIB_API int _stdcall | DisplayLib_SetS1D13700ClockDiv (DisplayInfo *di, uint8_t DispClkDiv, uint8_t FPShiftDiv) |
Set S1D13700 clock dividers. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortConfig (DisplayInfo *di, uint8_t port0, uint8_t port1) |
Configure expansion port function. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortIOConfig (DisplayInfo *di, uint8_t port0Dir, uint8_t port1Dir) |
Configure expansion port in I/O port mode. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortIOSet (DisplayInfo *di, uint8_t port0Mask, uint8_t port0, uint8_t port1Mask, uint8_t port1) |
Set port pins in I/O port mode. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortIOGet (DisplayInfo *di, uint8_t *port0, uint8_t *port1) |
Get port pin state in I/O port mode. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortSPIConfig (DisplayInfo *di, uint8_t frameLength, uint8_t frameFormat, uint8_t cpol, uint8_t cpha, uint8_t bitclock, uint8_t prescaler, uint8_t sselMode) |
Configure SPI settings in SPI mode. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortSPISend (DisplayInfo *di, uint8_t *data, uint32_t size) |
Send SPI data. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortSPIReceive (DisplayInfo *di, uint32_t *rcvData) |
Receive SPI data. | |
DISPLAYLIB_API int _stdcall | DisplayLib_ExPortSPISetSSEL (DisplayInfo *di, uint32_t ssel) |
Set SPI SSEL state. | |
DISPLAYLIB_API int _stdcall | DisplayLib_SetStartupBitmap (DisplayInfo *di, char *bitmapFile) |
DISPLAYLIB_API int _stdcall | DisplayLib_SetupDisplayProperties (DisplayInfo *di) |
DISPLAYLIB_API int _stdcall | DisplayLib_UFW (DisplayInfo *di) |
DISPLAYLIB_API int _stdcall | DisplayLib_GetTouchScreenSample (DisplayInfo *di, uint32_t *x, uint32_t *y) |
DISPLAYLIB_API int _stdcall | DisplayLib_SPI8Bit (DisplayInfo *di, uint8_t dc, uint8_t txData, uint8_t *rxData) |
#define DISPLAYLIB_API _declspec(dllimport) |
#define DISPLAYLIB_OK 1 |
#define DISPLAYLIB_ERROR 0 |
#define DISPLAYLIB_OPEN_WITH_USERNAME 0x01 |
#define DISPLAYLIB_INVERTMODE 1000 |
#define DISPLAYLIB_ERROR_WRONG_MODE -2 |
#define DISPLAYLIB_ERROR_FILE_NOT_FOUND -100 |
#define DISPLAYLIB_ERROR_ALLOCATING_MEMORY -101 |
#define DISPLAYLIB_ERROR_NOT_ENOUGH_ROOM_IN_DEVICE -200 |
#define DISPLAYLIB_ERROR_ERROR_SAVING_DATA_OBJECT -201 |
#define DISPLAYLIB_TRUE 1 |
#define DISPLAYLIB_FALSE 0 |
#define EXPORT0_IO 1 |
#define EXPORT0_UART_I2C 2 |
#define EXPORT0_PWM_I2C 3 |
#define EXPORT0_UART_IO 4 |
#define EXPORT0_T6963C 5 |
#define EXPORT0_KS0108 6 |
#define EXPORT1_IO 1 |
#define EXPORT1_SPI_PWM 2 |
#define EXPORT1_SPI_IO 3 |
#define EXPORT1_TOUCHSCREEN 4 |
#define EXPORT1_T6963C 5 |
#define EXPORT1_KS0108 6 |
#define SPI_SSEL_AUTO 0 |
#define SPI_SSEL_BUFFER 1 |
#define SPI_SSEL_MANUAL 2 |
#define SPI_SSEL_LOW 0 |
#define SPI_SSEL_HIGH 1 |
#define OPEN_WITH_USERNAME 0x01 |
typedef unsigned int uint32_t |
typedef unsigned char uint8_t |
enum PIXEL_FORMAT |
enum FPSHIFT_DIV |
DISPLAYLIB_API int _stdcall DisplayLib_GetNumberOfDisplays | ( | void | ) |
Returns the number of attached displays.
This function returns the number of attached displays. Returns the number of all attached displays even if they are in use and not available.
DISPLAYLIB_API int _stdcall DisplayLib_GetDisplayConfiguration | ( | uint32_t | index, | |
DisplayInfo * | di | |||
) |
Get display configuration information for specified display.
index | is the number of the display for which the information is read. | |
di | is a pointer to the DisplayInfo structure where the information will be saved. |
DISPLAYLIB_API int _stdcall DisplayLib_OpenDisplay | ( | DisplayInfo * | di, | |
uint32_t | flags | |||
) |
Open the display.
di | is a pointer to the DisplayInfo structure of the display to open. | |
flags | can be used to give options to the open command. Currently only supported flag is DISPLAYLIB_OPEN_WITH_USERNAME which uses the Username field from the DisplayInfo structure to open a display with specific user defined name. If no flags are given the default behavior is to open the first USB13700 display found. |
DISPLAYLIB_API int _stdcall DisplayLib_CloseDisplay | ( | DisplayInfo * | di | ) |
Close the display.
di | is a pointer to the DisplayInfo structure of the display to close. |
DISPLAYLIB_API int _stdcall DisplayLib_DrawScreen | ( | DisplayInfo * | di, | |
uint8_t * | fb | |||
) |
Draw full screen image to the display.
di | is a pointer to the DisplayInfo structure of the display to use. | |
fb | is a pointer to the buffer including the data to write to the display. |
DISPLAYLIB_API int _stdcall DisplayLib_DrawRect | ( | DisplayInfo * | di, | |
uint8_t * | fb, | |||
uint32_t | x, | |||
uint32_t | y, | |||
uint32_t | width, | |||
uint32_t | height | |||
) |
Draw a rectangle area to the display.
di | is a pointer to the DisplayInfo structure of the display to use. | |
fb | is a pointer to the buffer including the data to write to the display. |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_DrawRectFromScrBuf | ( | DisplayInfo * | di, | |
uint8_t * | fb, | |||
uint32_t | x, | |||
uint32_t | y, | |||
uint32_t | width, | |||
uint32_t | height | |||
) |
Draw a rectangle area to the display from a full screen sized buffer.
di | is a pointer to the DisplayInfo structure of the display to use. | |
fb | is a pointer to the buffer including the data to write to the display. |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_SetBacklight | ( | DisplayInfo * | di, | |
uint32_t | onOff, | |||
uint32_t | brightness | |||
) |
Set backlight values.
di | is a pointer to the DisplayInfo structure of the display to use. | |
onOff | is the backlight state. 0 = OFF 1 = ON | |
brightness | is the backlight brightness. (0-255) |
DISPLAYLIB_API int _stdcall DisplayLib_SetDisplayLibOption | ( | DisplayInfo * | di, | |
uint32_t | option, | |||
uint32_t | value | |||
) |
Set DisplayLib options.
di | is a pointer to the DisplayInfo structure of the display to use. | |
option | is the name of the option to set. | |
value | is the value to set the option to. |
Gets version information.
libFWVer | is a pointer to unsigned integer where to store the DisplayLib firmware version. | |
libVer | is a pointer to unsigned integer where to store the DisplayLib version. |
DISPLAYLIB_API int _stdcall DisplayLib_WriteText | ( | DisplayInfo * | di, | |
char * | text, | |||
uint32_t | size, | |||
uint32_t | x, | |||
uint32_t | y | |||
) |
Writes text to the display.
di | is a pointer to the DisplayInfo structure of the display to use. | |
text | is a pointer to the string to write. | |
size | is the length of the string. | |
x | is the X position where to write the text. | |
y | is the Y position where to write the text. |
DISPLAYLIB_API int _stdcall DisplayLib_WriteS1D13700Command | ( | DisplayInfo * | di, | |
uint8_t | cmd, | |||
uint32_t | queue | |||
) |
Write S1D13700 command byte.
di | is a pointer to the DisplayInfo structure of the display to use. | |
cmd | is the S1D13700 command byte. | |
queue | determines if the queue functionality is used. 0 = no queue 1 = use queue |
DISPLAYLIB_API int _stdcall DisplayLib_WriteS1D13700DataByte | ( | DisplayInfo * | di, | |
uint8_t | data, | |||
uint32_t | queue | |||
) |
Write S1D13700 data byte.
di | is a pointer to the DisplayInfo structure of the display to use. | |
data | is the S1D13700 command byte. | |
queue | determines if the queue functionality is used. 0 = no queue 1 = use queue |
DISPLAYLIB_API int _stdcall DisplayLib_WriteS1D13700Data | ( | DisplayInfo * | di, | |
uint8_t * | data, | |||
uint32_t | size, | |||
uint32_t | queue | |||
) |
Write S1D13700 data bytes.
di | is a pointer to the DisplayInfo structure of the display to use. | |
data | is a pointer to the buffer where the data is. | |
size | is the number of data bytes to write. | |
queue | determines if the queue functionality is used. 0 = no queue 1 = use queue |
DISPLAYLIB_API int _stdcall DisplayLib_WriteS1D13700ExecuteQueue | ( | DisplayInfo * | di | ) |
Write S1D13700 queue to the controller.
di | is a pointer to the DisplayInfo structure of the display to use. |
DISPLAYLIB_API int _stdcall DisplayLib_ClearS1D13700Queue | ( | DisplayInfo * | di | ) |
Clear S1D13700 queue.
di | is a pointer to the DisplayInfo structure of the display to use. |
DISPLAYLIB_API int _stdcall DisplayLib_GetS1D13700QueueLength | ( | DisplayInfo * | di, | |
uint32_t * | length | |||
) |
Get S1D13700 queue length.
di | is a pointer to the DisplayInfo structure of the display to use. | |
length | is a pointer to unsigned integer where to store the current queue length. |
DISPLAYLIB_API int _stdcall DisplayLib_SetS1D13700ClockDiv | ( | DisplayInfo * | di, | |
uint8_t | DispClkDiv, | |||
uint8_t | FPShiftDiv | |||
) |
Set S1D13700 clock dividers.
di | is a pointer to the DisplayInfo structure of the display to use. | |
DispClkDiv | is the the divider for setting the S1D13700 clock. | |
FPShiftDiv | is the S1D13700 internal divider. |
The formula for the clock is CLK = 30 Mhz / (DispClkDiv + 1)
DispClkDiv : Clock frequency
FPShiftDiv supports values
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortConfig | ( | DisplayInfo * | di, | |
uint8_t | port0, | |||
uint8_t | port1 | |||
) |
Configure expansion port function.
di | is a pointer to the DisplayInfo structure of the display to use. | |
port0 | is the function to set for the 6-bit PORT0. | |
port1 | is the function to set for the 8-bit PORT1. |
PORT0
PORT1
Currently supported configurations for PORT0:
Currently supported configurations for PORT1:
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortIOConfig | ( | DisplayInfo * | di, | |
uint8_t | port0Dir, | |||
uint8_t | port1Dir | |||
) |
Configure expansion port in I/O port mode.
di | is a pointer to the DisplayInfo structure of the display to use. | |
port0Dir | is the direction mask to set for the 6-bit PORT0. | |
port1Dir | is the direction mask to set for the 8-bit PORT1. |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortIOSet | ( | DisplayInfo * | di, | |
uint8_t | port0Mask, | |||
uint8_t | port0, | |||
uint8_t | port1Mask, | |||
uint8_t | port1 | |||
) |
Set port pins in I/O port mode.
di | is a pointer to the DisplayInfo structure of the display to use. | |
port0Mask | is the mask for PORT0. | |
port0 | is the data to write to PORT0. | |
port1Mask | is the mask for PORT1. | |
port1 | is the data to write to PORT1. |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortIOGet | ( | DisplayInfo * | di, | |
uint8_t * | port0, | |||
uint8_t * | port1 | |||
) |
Get port pin state in I/O port mode.
di | is a pointer to the DisplayInfo structure of the display to use. | |
port0 | is a pointer to unsigned char where to store the PORT0 state. | |
port1 | is a pointer to unsigned char where to store the PORT1 state. |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortSPIConfig | ( | DisplayInfo * | di, | |
uint8_t | frameLength, | |||
uint8_t | frameFormat, | |||
uint8_t | cpol, | |||
uint8_t | cpha, | |||
uint8_t | bitclock, | |||
uint8_t | prescaler, | |||
uint8_t | sselMode | |||
) |
Configure SPI settings in SPI mode.
di | is a pointer to the DisplayInfo structure of the display to use. | |
frameLength | is the SPI frame length in bits. (3 to 15) | |
frameFormat | is the serial frame format. (set to 0 for SPI) | |
cpol | is the SPI clock polarity. (0 or 1) | |
cpha | is the SPI clock phase. (0 or 1) | |
bitclock | is the SPI clock divider. | |
prescaler | is the SPI clock prescaler. (2 to 254) | |
sselMode | is the SPI SSEL mode. |
SSEL modes supported are
Possible options for frameFormat
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortSPISend | ( | DisplayInfo * | di, | |
uint8_t * | data, | |||
uint32_t | size | |||
) |
Send SPI data.
di | is a pointer to the DisplayInfo structure of the display to use. | |
data | is a pointer to the buffer where the data is. | |
size | is the number of data bytes to write. |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortSPIReceive | ( | DisplayInfo * | di, | |
uint32_t * | rcvData | |||
) |
Receive SPI data.
di | is a pointer to the DisplayInfo structure of the display to use. | |
rcvData | is a pointer to unsigned integer where to store the SPI frame received. |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_ExPortSPISetSSEL | ( | DisplayInfo * | di, | |
uint32_t | ssel | |||
) |
Set SPI SSEL state.
di | is a pointer to the DisplayInfo structure of the display to use. | |
ssel | is the SSEL pin state. (SPI_SSEL_LOW or SPI_SSEL_HIGH) |
Requires firmware version 0.9 or newer.
DISPLAYLIB_API int _stdcall DisplayLib_SetStartupBitmap | ( | DisplayInfo * | di, | |
char * | bitmapFile | |||
) |
DISPLAYLIB_API int _stdcall DisplayLib_SetupDisplayProperties | ( | DisplayInfo * | di | ) |
DISPLAYLIB_API int _stdcall DisplayLib_UFW | ( | DisplayInfo * | di | ) |
DISPLAYLIB_API int _stdcall DisplayLib_GetTouchScreenSample | ( | DisplayInfo * | di, | |
uint32_t * | x, | |||
uint32_t * | y | |||
) |
DISPLAYLIB_API int _stdcall DisplayLib_SPI8Bit | ( | DisplayInfo * | di, | |
uint8_t | dc, | |||
uint8_t | txData, | |||
uint8_t * | rxData | |||
) |