PebbleOS v4.47.0-327-g7753e801d
Loading...
Searching...
No Matches
MIPI DBI

MIPI DBI hosts. More...

Data Structures

struct  pbl_mipi_dbi_ops
 Driver operations. More...
 
struct  pbl_mipi_dbi
 MIPI DBI host. More...
 

Macros

#define PBL_MIPI_DBI_INIT(sym, _name, _parent, _ops)
 Initializer for the struct pbl_mipi_dbi of host sym.
 

Functions

static int pbl_mipi_dbi_command_write (const struct pbl_mipi_dbi *dbi, uint8_t cmd, const uint8_t *data, size_t len)
 Send a command to the panel.
 
static int pbl_mipi_dbi_command_read (const struct pbl_mipi_dbi *dbi, uint8_t cmd, uint8_t *data, size_t len)
 Send a command to the panel and read its answer.
 

Variables

const struct pbl_device_class pbl_mipi_dbi_class
 Class of the MIPI DBI hosts.
 

MIPI DCS commands

#define PBL_MIPI_DCS_SOFT_RESET   0x01U
 
#define PBL_MIPI_DCS_GET_DISPLAY_ID   0x04U
 
#define PBL_MIPI_DCS_ENTER_SLEEP_MODE   0x10U
 
#define PBL_MIPI_DCS_EXIT_SLEEP_MODE   0x11U
 
#define PBL_MIPI_DCS_SET_DISPLAY_OFF   0x28U
 
#define PBL_MIPI_DCS_SET_DISPLAY_ON   0x29U
 
#define PBL_MIPI_DCS_SET_COLUMN_ADDRESS   0x2AU
 
#define PBL_MIPI_DCS_SET_PAGE_ADDRESS   0x2BU
 
#define PBL_MIPI_DCS_WRITE_MEMORY_START   0x2CU
 
#define PBL_MIPI_DCS_SET_TEAR_ON   0x35U
 
#define PBL_MIPI_DCS_SET_ADDRESS_MODE   0x36U
 
#define PBL_MIPI_DCS_SET_PIXEL_FORMAT   0x3AU
 
#define PBL_MIPI_DCS_SET_DISPLAY_BRIGHTNESS   0x51U
 
#define PBL_MIPI_DCS_WRITE_CONTROL_DISPLAY   0x53U
 

Detailed Description

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.


Data Structure Documentation

◆ pbl_mipi_dbi

struct pbl_mipi_dbi

MIPI DBI host.

Data Fields
struct pbl_device dev Device.
const struct pbl_mipi_dbi_ops * ops Driver operations.

Macro Definition Documentation

◆ PBL_MIPI_DBI_INIT

#define PBL_MIPI_DBI_INIT (   sym,
  _name,
  _parent,
  _ops 
)
Value:
{ \
.dev = PBL_DEVICE_INIT_CLASS(sym, _name, nullptr, _parent, nullptr, &pbl_mipi_dbi_class), \
.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
symSymbol of the host instance, with its state defined by PBL_DEVICE_STATE_DEFINE().
_nameName.
_parentParent device, or NULL.
_opsDriver 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

Function Documentation

◆ 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
dbiHost, whose controller is set up.
cmdCommand.
[out]dataBytes read.
lenNumber 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

Send a command to the panel.

Parameters
dbiHost, whose controller is set up.
cmdCommand.
dataParameters, or NULL.
lenNumber of parameters.
Returns
0 or a negative errno.

References pbl_mipi_dbi_ops::command_write, and pbl_mipi_dbi::ops.

Variable Documentation

◆ pbl_mipi_dbi_class

const struct pbl_device_class pbl_mipi_dbi_class
extern

Class of the MIPI DBI hosts.