MIPI DBI hosts.
More...
MIPI DBI hosts.
A host is the controller a panel with its own frame memory is wired to, which sends the panel its commands and the pixels of the display. The driver of the panel, a child of the host, sends its own commands through this interface without knowing which host it is on: those of its power sequence, and settings such as its brightness. The host sends the pixels.
Commands are MIPI DCS commands, or the panel's own, with their parameters.
◆ pbl_mipi_dbi
◆ PBL_MIPI_DBI_INIT
| #define PBL_MIPI_DBI_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_parent, |
|
|
|
_ops |
|
) |
| |
Value: { \
.ops = (_ops), \
}
#define PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, _deps, _cls)
Initializer for the struct pbl_device of device instance sym, in class _cls.
Definition device.h:145
const struct pbl_device_class pbl_mipi_dbi_class
Class of the MIPI DBI hosts.
Initializer for the struct pbl_mipi_dbi of host sym.
The host has no init of its own: it is a function of its controller, which sets it up before it brings the panel up.
- Parameters
-
| sym | Symbol of the host instance, with its state defined by PBL_DEVICE_STATE_DEFINE(). |
| _name | Name. |
| _parent | Parent device, or NULL. |
| _ops | Driver operations. |
◆ PBL_MIPI_DCS_ENTER_SLEEP_MODE
| #define PBL_MIPI_DCS_ENTER_SLEEP_MODE 0x10U |
◆ PBL_MIPI_DCS_EXIT_SLEEP_MODE
| #define PBL_MIPI_DCS_EXIT_SLEEP_MODE 0x11U |
◆ PBL_MIPI_DCS_GET_DISPLAY_ID
| #define PBL_MIPI_DCS_GET_DISPLAY_ID 0x04U |
◆ PBL_MIPI_DCS_SET_ADDRESS_MODE
| #define PBL_MIPI_DCS_SET_ADDRESS_MODE 0x36U |
◆ PBL_MIPI_DCS_SET_COLUMN_ADDRESS
| #define PBL_MIPI_DCS_SET_COLUMN_ADDRESS 0x2AU |
◆ PBL_MIPI_DCS_SET_DISPLAY_BRIGHTNESS
| #define PBL_MIPI_DCS_SET_DISPLAY_BRIGHTNESS 0x51U |
◆ PBL_MIPI_DCS_SET_DISPLAY_OFF
| #define PBL_MIPI_DCS_SET_DISPLAY_OFF 0x28U |
◆ PBL_MIPI_DCS_SET_DISPLAY_ON
| #define PBL_MIPI_DCS_SET_DISPLAY_ON 0x29U |
◆ PBL_MIPI_DCS_SET_PAGE_ADDRESS
| #define PBL_MIPI_DCS_SET_PAGE_ADDRESS 0x2BU |
◆ PBL_MIPI_DCS_SET_PIXEL_FORMAT
| #define PBL_MIPI_DCS_SET_PIXEL_FORMAT 0x3AU |
◆ PBL_MIPI_DCS_SET_TEAR_ON
| #define PBL_MIPI_DCS_SET_TEAR_ON 0x35U |
◆ PBL_MIPI_DCS_SOFT_RESET
| #define PBL_MIPI_DCS_SOFT_RESET 0x01U |
◆ PBL_MIPI_DCS_WRITE_CONTROL_DISPLAY
| #define PBL_MIPI_DCS_WRITE_CONTROL_DISPLAY 0x53U |
◆ PBL_MIPI_DCS_WRITE_MEMORY_START
| #define PBL_MIPI_DCS_WRITE_MEMORY_START 0x2CU |
◆ pbl_mipi_dbi_command_read()
| static int pbl_mipi_dbi_command_read |
( |
const struct pbl_mipi_dbi * |
dbi, |
|
|
uint8_t |
cmd, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinestatic |
Send a command to the panel and read its answer.
- Parameters
-
| dbi | Host, whose controller is set up. |
| cmd | Command. |
| [out] | data | Bytes read. |
| len | Number of bytes to read. |
- Returns
- 0 or a negative errno.
References pbl_mipi_dbi_ops::command_read, and pbl_mipi_dbi::ops.
◆ pbl_mipi_dbi_command_write()
| static int pbl_mipi_dbi_command_write |
( |
const struct pbl_mipi_dbi * |
dbi, |
|
|
uint8_t |
cmd, |
|
|
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinestatic |
◆ pbl_mipi_dbi_class
Class of the MIPI DBI hosts.