![]() |
MPLABĀ® Harmony Graphics Suite
GFX v3.13.0
Legato API Documentation
|
Display driver interface functions and definitions. More...
Go to the source code of this file.
Macros | |
#define | GFX_Disp_Intf uint32_t |
#define | DRV_GFX_DEPRECATED __attribute__ ((deprecated)) |
Typedefs | |
typedef void(* | GFX_Disp_Intf_Callback) (GFX_Disp_Intf, GFX_DISP_INTF_STATUS, void *) |
This function represents display interface callback function. More... | |
Enumerations | |
enum | GFX_DISP_INTF_STATUS { GFX_DISP_INTF_TX_DONE, GFX_DISP_INTF_ERROR } |
This enum represents display interface callback status modes. More... | |
enum | GFX_DISP_INTF_PIN { GFX_DISP_INTF_PIN_CS, GFX_DISP_INTF_PIN_WR, GFX_DISP_INTF_PIN_RD, GFX_DISP_INTF_PIN_RSDC } |
This enum represents display interface pins. More... | |
enum | GFX_DISP_INTF_PIN_VALUE { GFX_DISP_INTF_PIN_CLEAR = 0, GFX_DISP_INTF_PIN_SET = 1 } |
This enum represents display interface pin values. More... | |
Functions | |
GFX_Disp_Intf | GFX_Disp_Intf_Open (void) |
Open an interface to the graphics display. More... | |
void | GFX_Disp_Intf_Close (GFX_Disp_Intf intf) |
Close an interface to the graphics display. More... | |
int | GFX_Disp_Intf_PinControl (GFX_Disp_Intf intf, GFX_DISP_INTF_PIN pin, GFX_DISP_INTF_PIN_VALUE value) |
Set value of the GFX control pin. More... | |
int | GFX_Disp_Intf_WriteCommand (GFX_Disp_Intf intf, uint8_t cmd) |
Write command. More... | |
int | GFX_Disp_Intf_WriteCommandParm (GFX_Disp_Intf intf, uint8_t cmd, uint8_t *parm, int num_parms) |
Write command and parameter. More... | |
int | GFX_Disp_Intf_WriteData (GFX_Disp_Intf intf, uint8_t *data, int bytes) |
Write data bytes. More... | |
int | GFX_Disp_Intf_WriteData16 (GFX_Disp_Intf intf, uint16_t *data, int num) |
Write data words. More... | |
int | GFX_Disp_Intf_ReadData (GFX_Disp_Intf intf, uint8_t *data, int bytes) |
Read data words. More... | |
int | GFX_Disp_Intf_ReadCommandData (GFX_Disp_Intf intf, uint8_t cmd, uint8_t *data, int num_data) |
Read command data. More... | |
int | GFX_Disp_Intf_ReadData16 (GFX_Disp_Intf intf, uint16_t *data, int num) |
Read command data word. More... | |
int | GFX_Disp_Intf_Write (GFX_Disp_Intf intf, uint8_t *data, int bytes) |
Write byte stream. More... | |
int | GFX_Disp_Intf_Read (GFX_Disp_Intf intf, uint8_t *data, int bytes) |
Read byte stream. More... | |
int | GFX_Disp_Intf_WriteDataByte (GFX_Disp_Intf intf, uint8_t data) |
Write byte. More... | |
int | GFX_Disp_Intf_Ready (GFX_Disp_Intf intf) |
Check interface ready status. More... | |
int | GFX_Disp_Intf_Set_Callback (GFX_Disp_Intf intf, GFX_Disp_Intf_Callback cb, void *parm) |
Set interface callback. More... | |
Display driver interface functions and definitions.
Contains 4-line SPI GFX interface driver definitions and interface prototypes.
typedef void(* GFX_Disp_Intf_Callback) (GFX_Disp_Intf, GFX_DISP_INTF_STATUS, void *) |
This function represents display interface callback function.
GFX_Disp_Intf_Callback
Summary: GFX Intf callback function type.
The display interface callback is used to communicate the status of transfer.
enum GFX_DISP_INTF_PIN |
This enum represents display interface pins.
GFX_DISP_INTF_PIN
Summary: Enum of GFX Intf pins.
A interface pins are use to communicate with external display controllers. The supported pins are defined here.
This enum represents display interface pin values.
GFX_DISP_INTF_PIN_VALUE
Summary: Enum of GFX Intf pin values.
Interface pin values are used to set the status of interface pin. These are defined here.
enum GFX_DISP_INTF_STATUS |
This enum represents display interface callback status modes.
GFX_DISP_INTF_STATUS
Summary: Enum of GFX Intf callback status.
A call back status indicates the results of a transfer. These are the possible results.
void GFX_Disp_Intf_Close | ( | GFX_Disp_Intf | intf | ) |
Close an interface to the graphics display.
Function: void GFX_Disp_Intf_Close(GFX_Intf intf)
Summary: Closes the interface to the graphics display
Description:
Parameters: intf - the interface handle
Returns: 0 - Operation successful -1 - Operation failed
Closes the the interface intf.
GFX_Disp_Intf GFX_Disp_Intf_Open | ( | void | ) |
Open an interface to the graphics display.
Function: GFX_Disp_Intf_Open(GFX_Context * gfx)
Summary: Opens the interface to the graphics display
Description: This opens the interface to the graphics display (e.g., SPI, parallel).
Parameters: None
Returns: GFX_Intf - the interface handle, 0 if failed
Opens an interface to the graphics display (e.g., SPI, parallel).
int GFX_Disp_Intf_PinControl | ( | GFX_Disp_Intf | intf, |
GFX_DISP_INTF_PIN | pin, | ||
GFX_DISP_INTF_PIN_VALUE | value | ||
) |
Set value of the GFX control pin.
Function: int GFX_Disp_Intf_PinControl(GFX_Disp_Intf intf, GFX_INTF_PIN pin, GFX_INTF_PIN_VALUE value)
Summary: Sets the value of the GFX control pin
Description:
Parameters: intf - the interface handle pin - the control pin value - the value
Returns: 0 - Operation successful -1 - Operation failed
Sets the value of pin to value using intf.
int GFX_Disp_Intf_Read | ( | GFX_Disp_Intf | intf, |
uint8_t * | data, | ||
int | bytes | ||
) |
Read byte stream.
Function: int GFX_Disp_Intf_Read(GFX_Disp_Intf intf, uint8_t * data, int bytes)
Summary: Reads a byte stream from the interface, control pins are not set
Description:
Parameters: intf - the interface handle data - the byte stream bytes - the number of bytes in the data stream
Returns: 0 - Operation successful -1 - Operation failed
Reads the byte stream data using intf. The number of words to read are specified by bytes.
int GFX_Disp_Intf_ReadCommandData | ( | GFX_Disp_Intf | intf, |
uint8_t | cmd, | ||
uint8_t * | data, | ||
int | num_data | ||
) |
Read command data.
Function: int GFX_Disp_Intf_ReadCommandData(GFX_Disp_Intf intf, uint8_t cmd, uint8_t * data, int num_data)
Summary: Writes a byte command (cmd) to the interface and read num_data bytes from the interface RS/DCx control pin is asserted (LOW) when the cmd is sent, and deasserted (HIGH) when the data is read The RD strobe is asserted for each byte read.
Description:
Parameters: intf - the interface handle cmd - the 8-bit command to send data - the destination byte buffer bytes - the number of bytes to read
Returns: 0 - Operation successful -1 - Operation failed
Reads command cmd and its data using intf. The number of words to read are specified by num_data.
int GFX_Disp_Intf_ReadData | ( | GFX_Disp_Intf | intf, |
uint8_t * | data, | ||
int | bytes | ||
) |
Read data words.
Function: int GFX_Disp_Intf_ReadData(GFX_Disp_Intf intf, uint8_t * data, int bytes)
Summary: Deasserts the RS/DCx control pin (HIGH) and reads a bytes from the interface
Description:
Parameters: intf - the interface handle data - the destination buffer bytes - the number of bytes to read
Returns: 0 - Operation successful -1 - Operation failed
Reads data words data using intf. The number of words to read are specified by num_data.
int GFX_Disp_Intf_ReadData16 | ( | GFX_Disp_Intf | intf, |
uint16_t * | data, | ||
int | num | ||
) |
Read command data word.
Function: int GFX_Disp_Intf_ReadData16(GFX_Disp_Intf intf, uint16_t * data, int num)
Summary: Deasserts the RS/DCx control pin (HIGH) and reads 16-bit data chunks from the interface.
Description: Interface must support 16-bit data reads, otherwise -1 will be returned.
Parameters: intf - the interface handle data - the destination buffer bytes - the number of chunks to read
Returns: 0 - Operation successful -1 - Operation failed or not supported
Reads command cmd and words data using intf. The number of words to read are specified by num.
int GFX_Disp_Intf_Ready | ( | GFX_Disp_Intf | intf | ) |
Check interface ready status.
Function: int GFX_Disp_Intf_Ready(GFX_Disp_Intf intf)
Summary: Checks if the interface is ready
Description:
Parameters: intf - the interface handle
Returns: 1 - Interface is idle and ready for transfer 0 - Interface is busy and unavailable
Checks if interface is ready for transfer using intf.
int GFX_Disp_Intf_Set_Callback | ( | GFX_Disp_Intf | intf, |
GFX_Disp_Intf_Callback | cb, | ||
void * | parm | ||
) |
Set interface callback.
Function: GFX_Disp_Intf_Set_Callback(GFX_Disp_Intf intf, GFX_Disp_Intf_Callback cb, void * parm)
Summary: Registers a callback function to GFX Display Interface. This is supported only by interfaces that can do asynchronous/non-blocking transfers.
Description:
Parameters: intf - the interface handle cb - the callback function parm - the function parameter
Returns: 0 - Operation successful -1 - Operation failed
Sets the interface callback to cb with arguments parm using intf.
int GFX_Disp_Intf_Write | ( | GFX_Disp_Intf | intf, |
uint8_t * | data, | ||
int | bytes | ||
) |
Write byte stream.
Function: int GFX_Disp_Intf_Write(GFX_Disp_Intf intf, uint8_t * data, int bytes)
Summary: Writes the byte stream to the interface, control pins are not set
Description:
Parameters: intf - the interface handle data - the byte stream bytes - the number of bytes in the data stream
Returns: 0 - Operation successful -1 - Operation failed
Writes the byte stream data using intf. The number of words to read are specified by bytes.
int GFX_Disp_Intf_WriteCommand | ( | GFX_Disp_Intf | intf, |
uint8_t | cmd | ||
) |
Write command.
Function: int GFX_Disp_Intf_WriteCommand(GFX_Disp_Intf intf, uint8_t cmd)
Summary: Asserts the RS/DCx control pin (LOW) and writes the 8-bit command
Description:
Parameters: intf - the interface handle cmd - the command
Returns: 0 - Operation successful -1 - Operation failed
Writes a command cmd using intf.
int GFX_Disp_Intf_WriteCommandParm | ( | GFX_Disp_Intf | intf, |
uint8_t | cmd, | ||
uint8_t * | parm, | ||
int | num_parms | ||
) |
Write command and parameter.
Function: int GFX_Disp_Intf_WriteCommandParm(GFX_Disp_Intf intf, uint8_t cmd, uint8_t * parm, int num_parms)
Summary: Writes a command and its parameters to the interface.
Description: Asserts the RS/DCx control pin (LOW), writes the 8-bit command, Deasserts the RS/DCx control pin (HIGH, writes the n-byte parameter)
Parameters: intf - the interface handle cmd - the command parm - byte array containing the command parameters num_parms - the number for parameters
Returns: 0 - Operation successful -1 - Operation failed
Writes a command cmd and parameter parm using intf. The number of parameters are specified by num_param.
int GFX_Disp_Intf_WriteData | ( | GFX_Disp_Intf | intf, |
uint8_t * | data, | ||
int | bytes | ||
) |
Write data bytes.
Function: int GFX_Disp_Intf_WriteData(GFX_Disp_Intf intf, uint8_t * data, int bytes)
Summary: Deasserts the RS/DCx control pin (HIGH) and writes the byte stream to the interface
Description:
Parameters: intf - the interface handle data - the byte stream bytes - the number of bytes in the data stream
Returns: 0 - Operation successful -1 - Operation failed
Writes the data byte stream data using intf. The number of bytes are specified by bytes.
int GFX_Disp_Intf_WriteData16 | ( | GFX_Disp_Intf | intf, |
uint16_t * | data, | ||
int | num | ||
) |
Write data words.
Function: int GFX_Disp_Intf_WriteData16(GFX_Disp_Intf intf, uint16_t * data, int num)
Summary: Deasserts the RS/DCx control pin (HIGH) and writes the data to the interface in 16-bit chunks. Interface must support 16-bit wide data transfers, otherwise will return -1
Description:
Parameters: intf - the interface handle data - the data to write num - the number of bytes in the data stream
Returns: 0 - Operation successful -1 - Operation failed or not supported
Writes data words data using intf. The number of words to write are specified by num.
int GFX_Disp_Intf_WriteDataByte | ( | GFX_Disp_Intf | intf, |
uint8_t | data | ||
) |
Write byte.
Function: GFX_Disp_Intf_WriteDataByte(GFX_Disp_Intf intf, uint8_t data);
Summary: Writes a single byte, RSDC control pin is set
Description:
Parameters: intf - the interface handle data - the byte stream bytes - the number of bytes in the data stream
Returns: 0 - Operation successful -1 - Operation failed
Writes a byte data using intf.