Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
MIPI-DSI driver APIs

MIPI-DSI driver APIs. More...

Data Structures

struct  mipi_dsi_timings
 MIPI-DSI display timings. More...
 
struct  mipi_dsi_device
 MIPI-DSI device. More...
 
struct  mipi_dsi_msg
 MIPI-DSI read/write message. More...
 
struct  mipi_dsi_driver_api
 MIPI-DSI host driver API. More...
 

Macros

#define MIPI_DSI_MSG_USE_LPM   BIT(0x0)
 

Functions

static int mipi_dsi_attach (const struct device *dev, uint8_t channel, const struct mipi_dsi_device *mdev)
 Attach a new device to the MIPI-DSI bus.
 
static ssize_t mipi_dsi_transfer (const struct device *dev, uint8_t channel, struct mipi_dsi_msg *msg)
 Transfer data to/from a device attached to the MIPI-DSI bus.
 
ssize_t mipi_dsi_generic_read (const struct device *dev, uint8_t channel, const void *params, size_t nparams, void *buf, size_t len)
 MIPI-DSI generic read.
 
ssize_t mipi_dsi_generic_write (const struct device *dev, uint8_t channel, const void *buf, size_t len)
 MIPI-DSI generic write.
 
ssize_t mipi_dsi_dcs_read (const struct device *dev, uint8_t channel, uint8_t cmd, void *buf, size_t len)
 MIPI-DSI DCS read.
 
ssize_t mipi_dsi_dcs_write (const struct device *dev, uint8_t channel, uint8_t cmd, const void *buf, size_t len)
 MIPI-DSI DCS write.
 
static int mipi_dsi_detach (const struct device *dev, uint8_t channel, const struct mipi_dsi_device *mdev)
 Detach a device from the MIPI-DSI bus.
 

MIPI-DSI Device mode flags.

#define MIPI_DSI_MODE_VIDEO   BIT(0)
 Video mode.
 
#define MIPI_DSI_MODE_VIDEO_BURST   BIT(1)
 Video burst mode.
 
#define MIPI_DSI_MODE_VIDEO_SYNC_PULSE   BIT(2)
 Video pulse mode.
 
#define MIPI_DSI_MODE_VIDEO_AUTO_VERT   BIT(3)
 Enable auto vertical count mode.
 
#define MIPI_DSI_MODE_VIDEO_HSE   BIT(4)
 Enable hsync-end packets in vsync-pulse and v-porch area.
 
#define MIPI_DSI_MODE_VIDEO_HFP   BIT(5)
 Disable hfront-porch area.
 
#define MIPI_DSI_MODE_VIDEO_HBP   BIT(6)
 Disable hback-porch area.
 
#define MIPI_DSI_MODE_VIDEO_HSA   BIT(7)
 Disable hsync-active area.
 
#define MIPI_DSI_MODE_VSYNC_FLUSH   BIT(8)
 Flush display FIFO on vsync pulse.
 
#define MIPI_DSI_MODE_EOT_PACKET   BIT(9)
 Disable EoT packets in HS mode.
 
#define MIPI_DSI_CLOCK_NON_CONTINUOUS   BIT(10)
 Device supports non-continuous clock behavior (DSI spec 5.6.1)
 
#define MIPI_DSI_MODE_LPM   BIT(11)
 Transmit data in low power.
 

MIPI-DSI Pixel formats.

#define MIPI_DSI_PIXFMT_RGB888   0U
 RGB888 (24bpp).
 
#define MIPI_DSI_PIXFMT_RGB666   1U
 RGB666 (24bpp).
 
#define MIPI_DSI_PIXFMT_RGB666_PACKED   2U
 Packed RGB666 (18bpp).
 
#define MIPI_DSI_PIXFMT_RGB565   3U
 RGB565 (16bpp).
 

Detailed Description

MIPI-DSI driver APIs.

Since
3.1
Version
0.1.0

Macro Definition Documentation

◆ MIPI_DSI_CLOCK_NON_CONTINUOUS

#define MIPI_DSI_CLOCK_NON_CONTINUOUS   BIT(10)

#include <zephyr/drivers/mipi_dsi.h>

Device supports non-continuous clock behavior (DSI spec 5.6.1)

◆ MIPI_DSI_MODE_EOT_PACKET

#define MIPI_DSI_MODE_EOT_PACKET   BIT(9)

#include <zephyr/drivers/mipi_dsi.h>

Disable EoT packets in HS mode.

◆ MIPI_DSI_MODE_LPM

#define MIPI_DSI_MODE_LPM   BIT(11)

#include <zephyr/drivers/mipi_dsi.h>

Transmit data in low power.

◆ MIPI_DSI_MODE_VIDEO

#define MIPI_DSI_MODE_VIDEO   BIT(0)

#include <zephyr/drivers/mipi_dsi.h>

Video mode.

◆ MIPI_DSI_MODE_VIDEO_AUTO_VERT

#define MIPI_DSI_MODE_VIDEO_AUTO_VERT   BIT(3)

#include <zephyr/drivers/mipi_dsi.h>

Enable auto vertical count mode.

◆ MIPI_DSI_MODE_VIDEO_BURST

#define MIPI_DSI_MODE_VIDEO_BURST   BIT(1)

#include <zephyr/drivers/mipi_dsi.h>

Video burst mode.

◆ MIPI_DSI_MODE_VIDEO_HBP

#define MIPI_DSI_MODE_VIDEO_HBP   BIT(6)

#include <zephyr/drivers/mipi_dsi.h>

Disable hback-porch area.

◆ MIPI_DSI_MODE_VIDEO_HFP

#define MIPI_DSI_MODE_VIDEO_HFP   BIT(5)

#include <zephyr/drivers/mipi_dsi.h>

Disable hfront-porch area.

◆ MIPI_DSI_MODE_VIDEO_HSA

#define MIPI_DSI_MODE_VIDEO_HSA   BIT(7)

#include <zephyr/drivers/mipi_dsi.h>

Disable hsync-active area.

◆ MIPI_DSI_MODE_VIDEO_HSE

#define MIPI_DSI_MODE_VIDEO_HSE   BIT(4)

#include <zephyr/drivers/mipi_dsi.h>

Enable hsync-end packets in vsync-pulse and v-porch area.

◆ MIPI_DSI_MODE_VIDEO_SYNC_PULSE

#define MIPI_DSI_MODE_VIDEO_SYNC_PULSE   BIT(2)

#include <zephyr/drivers/mipi_dsi.h>

Video pulse mode.

◆ MIPI_DSI_MODE_VSYNC_FLUSH

#define MIPI_DSI_MODE_VSYNC_FLUSH   BIT(8)

#include <zephyr/drivers/mipi_dsi.h>

Flush display FIFO on vsync pulse.

◆ MIPI_DSI_MSG_USE_LPM

#define MIPI_DSI_MSG_USE_LPM   BIT(0x0)

◆ MIPI_DSI_PIXFMT_RGB565

#define MIPI_DSI_PIXFMT_RGB565   3U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

RGB565 (16bpp).

◆ MIPI_DSI_PIXFMT_RGB666

#define MIPI_DSI_PIXFMT_RGB666   1U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

RGB666 (24bpp).

◆ MIPI_DSI_PIXFMT_RGB666_PACKED

#define MIPI_DSI_PIXFMT_RGB666_PACKED   2U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

Packed RGB666 (18bpp).

◆ MIPI_DSI_PIXFMT_RGB888

#define MIPI_DSI_PIXFMT_RGB888   0U

#include <zephyr/dt-bindings/mipi_dsi/mipi_dsi.h>

RGB888 (24bpp).

Function Documentation

◆ mipi_dsi_attach()

static int mipi_dsi_attach ( const struct device dev,
uint8_t  channel,
const struct mipi_dsi_device mdev 
)
inlinestatic

#include <zephyr/drivers/mipi_dsi.h>

Attach a new device to the MIPI-DSI bus.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
mdevMIPI-DSI device description.
Returns
0 on success, negative on error

◆ mipi_dsi_dcs_read()

ssize_t mipi_dsi_dcs_read ( const struct device dev,
uint8_t  channel,
uint8_t  cmd,
void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI DCS read.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
cmdDCS command.
bufBuffer where read data will be stored.
lenLength of the reception buffer.
Returns
Size of the read data on success, negative on error.

◆ mipi_dsi_dcs_write()

ssize_t mipi_dsi_dcs_write ( const struct device dev,
uint8_t  channel,
uint8_t  cmd,
const void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI DCS write.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
cmdDCS command.
bufTransmission buffer.
lenLength of the transmission buffer
Returns
Size of the written data on success, negative on error.

◆ mipi_dsi_detach()

static int mipi_dsi_detach ( const struct device dev,
uint8_t  channel,
const struct mipi_dsi_device mdev 
)
inlinestatic

#include <zephyr/drivers/mipi_dsi.h>

Detach a device from the MIPI-DSI bus.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
mdevMIPI-DSI device description.
Returns
0 on success, negative on error

◆ mipi_dsi_generic_read()

ssize_t mipi_dsi_generic_read ( const struct device dev,
uint8_t  channel,
const void *  params,
size_t  nparams,
void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI generic read.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
paramsBuffer containing request parameters.
nparamsNumber of parameters.
bufBuffer where read data will be stored.
lenLength of the reception buffer.
Returns
Size of the read data on success, negative on error.

◆ mipi_dsi_generic_write()

ssize_t mipi_dsi_generic_write ( const struct device dev,
uint8_t  channel,
const void *  buf,
size_t  len 
)

#include <zephyr/drivers/mipi_dsi.h>

MIPI-DSI generic write.

Parameters
devMIPI-DSI host device.
channelDevice channel (VID).
bufTransmission buffer.
lenLength of the transmission buffer
Returns
Size of the written data on success, negative on error.

◆ mipi_dsi_transfer()

static ssize_t mipi_dsi_transfer ( const struct device dev,
uint8_t  channel,
struct mipi_dsi_msg msg 
)
inlinestatic

#include <zephyr/drivers/mipi_dsi.h>

Transfer data to/from a device attached to the MIPI-DSI bus.

Parameters
devMIPI-DSI device.
channelDevice channel (VID).
msgMessage.
Returns
Size of the transferred data on success, negative on error.