|
Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
|
Interfaces for display controllers. More...
Topics | |
| AC057TC1 display controller | |
| AC057TC1 7-color e-ink display controller device-specific API extension. | |
| Device-specific Display API extensions | |
| Devicetree Display API | |
| Display Driver Backend API | |
| LCD Interface | |
| LCD Interface. | |
| MIPI Display interface | |
| MIPI Display definitions. | |
| MIPI-DBI | |
| Interfaces for MIPI-DBI (Display Bus Interface). | |
| MIPI-DSI | |
| Interfaces for MIPI-DSI (Display Serial Interface). | |
| Monochrome Character Framebuffer | |
| Public Monochrome Character Framebuffer API. | |
Files | |
| file | display.h |
| Main header file for display driver API. | |
| file | ac057tc1.h |
| Public API for AC057TC1 7-color e-ink display. | |
Data Structures | |
| struct | display_capabilities |
| Structure holding display capabilities. More... | |
| struct | display_buffer_descriptor |
| Structure to describe display data buffer layout. More... | |
| struct | display_event_data |
| Display event payload. More... | |
Macros | |
| #define | DISPLAY_BITS_PER_PIXEL(fmt) |
| Bits required per pixel for display format. | |
Typedefs | |
| typedef enum display_event_result(* | display_event_cb_t) (const struct device *dev, uint32_t evt, const struct display_event_data *data, void *user_data) |
| Called either in ISR context (if arg in_isr=true at register time, see display_register_event_cb ) or in thread context (if in_isr=false, driver will schedule work to call it). | |
Functions | |
| static int | display_write (const struct device *dev, const uint16_t x, const uint16_t y, const struct display_buffer_descriptor *desc, const void *buf) |
| Write data to display. | |
| static int | display_read (const struct device *dev, const uint16_t x, const uint16_t y, const struct display_buffer_descriptor *desc, void *buf) |
| Read data from display. | |
| static int | display_clear (const struct device *dev) |
| Clear the screen of the display device. | |
| static void * | display_get_framebuffer (const struct device *dev) |
| Get pointer to framebuffer for direct access. | |
| static int | display_blanking_on (const struct device *dev) |
| Turn display blanking on. | |
| static int | display_blanking_off (const struct device *dev) |
| Turn display blanking off. | |
| static int | display_set_brightness (const struct device *dev, uint8_t brightness) |
| Set the brightness of the display. | |
| static int | display_set_contrast (const struct device *dev, uint8_t contrast) |
| Set the contrast of the display. | |
| static void | display_get_capabilities (const struct device *dev, struct display_capabilities *capabilities) |
| Get display capabilities. | |
| static int | display_set_pixel_format (const struct device *dev, const enum display_pixel_format pixel_format) |
| Set pixel format used by the display. | |
| static int | display_set_orientation (const struct device *dev, const enum display_orientation orientation) |
| Set display orientation. | |
| static int | display_register_event_cb (const struct device *dev, display_event_cb_t cb, void *user_data, uint32_t event_mask, bool in_isr, uint32_t *out_reg_handle) |
| Register event callback for a display device. | |
| static int | display_unregister_event_cb (const struct device *dev, uint32_t reg_handle) |
| Unregister event callback for a display device. | |
Interfaces for display controllers.
| #define DISPLAY_BITS_PER_PIXEL | ( | fmt | ) |
#include <zephyr/drivers/display.h>
Bits required per pixel for display format.
This macro expands to the number of bits required for a given display format. It can be used to allocate a framebuffer based on a given display format type. This does not work with any private pixel formats.
| typedef enum display_event_result(* display_event_cb_t) (const struct device *dev, uint32_t evt, const struct display_event_data *data, void *user_data) |
#include <zephyr/drivers/display.h>
Called either in ISR context (if arg in_isr=true at register time, see display_register_event_cb ) or in thread context (if in_isr=false, driver will schedule work to call it).
When called from ISR context the callback must be extremely fast and must not call blocking APIs or sleep.
| dev | Pointer to device structure |
| evt | 'enum display_event' bit of event to handle |
| data | Driver data passed to callback |
| user_data | User data passed by driver to callback |
| enum display_event |
#include <zephyr/drivers/display.h>
Display event types.
| enum display_event_result |
#include <zephyr/drivers/display.h>
Display event callback return flags.
| enum display_orientation |
#include <zephyr/drivers/display.h>
Enumeration with possible display orientation.
| enum display_pixel_format |
#include <zephyr/drivers/display.h>
Display pixel formats.
Display pixel format enumeration.
In case a pixel format consists out of multiple bytes the byte order is big endian.
| enum display_screen_info |
#include <zephyr/drivers/display.h>
Display screen information.
|
inlinestatic |
#include <zephyr/drivers/display.h>
Turn display blanking off.
Restore the frame buffer content to the display. In case backlight control is supported by the driver the backlight configuration is restored.
| dev | Pointer to device structure |
| -ENOSYS | if not implemented. |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Turn display blanking on.
This function blanks the complete display. The content of the frame buffer will be retained while blanking is enabled and the frame buffer will be accessible for read and write operations.
In case backlight control is supported by the driver the backlight is turned off. The backlight configuration is retained and accessible for configuration.
In case the driver supports display blanking the initial state of the driver would be the same as if this function was called.
| dev | Pointer to device structure |
| -ENOSYS | if not implemented. |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Clear the screen of the display device.
| dev | Pointer to device structure |
| -ENOSYS | if not implemented. |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Get display capabilities.
| dev | Pointer to device structure |
| capabilities | Pointer to capabilities structure to populate |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Get pointer to framebuffer for direct access.
| dev | Pointer to device structure |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Read data from display.
| dev | Pointer to device structure |
| x | x Coordinate of the upper left corner where to read from |
| y | y Coordinate of the upper left corner where to read from |
| desc | Pointer to a structure describing the buffer layout |
| buf | Pointer to buffer array |
| -ENOSYS | if not implemented. |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Register event callback for a display device.
| dev | Pointer to device structure |
| cb | User callback function pointer, see display_event_cb_t description |
| user_data | User data to be passed by driver to event callback |
| event_mask | Mask of 'enum display_event' events upon which the callback will be called |
| in_isr | If true, callback will be invoked in ISR context (shall be fast, non-blocking). If false, callback will be invoked in thread/workqueue context. A driver is allowed to implement just one of the invocation contexts. |
| out_reg_handle | Lets the caller prove ownership of the registration, and allows for safe unregistration |
| -EBUSY | A callback is already registered. |
| -ENOTSUP | One of the events is not supported, or the requested invocation context is not supported. |
| -ENOSYS | Not implemented. |
| -EINVAL | Invalid argument. |
#include <zephyr/drivers/display.h>
Set the brightness of the display.
Set the brightness of the display in steps of 1/256, where 255 is full brightness and 0 is minimal.
| dev | Pointer to device structure |
| brightness | Brightness in steps of 1/256 |
| -ENOSYS | if not implemented. |
#include <zephyr/drivers/display.h>
Set the contrast of the display.
Set the contrast of the display in steps of 1/256, where 255 is maximum difference and 0 is minimal.
| dev | Pointer to device structure |
| contrast | Contrast in steps of 1/256 |
| -ENOSYS | if not implemented. |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Set display orientation.
| dev | Pointer to device structure |
| orientation | Orientation to be used by display |
| -ENOSYS | if not implemented. |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Set pixel format used by the display.
| dev | Pointer to device structure |
| pixel_format | Pixel format to be used by display |
| -ENOSYS | if not implemented. |
#include <zephyr/drivers/display.h>
Unregister event callback for a display device.
| dev | Pointer to device structure |
| reg_handle | Handle used to register the callback. |
| -EINVAL | If 'reg_handle == 0'. |
| -EPERM | Not the owner, or already unregistered. |
| -ENOSYS | If it, or register_event_cb, is not implemented. |
|
inlinestatic |
#include <zephyr/drivers/display.h>
Write data to display.
| dev | Pointer to device structure |
| x | x Coordinate of the upper left corner where to write the buffer |
| y | y Coordinate of the upper left corner where to write the buffer |
| desc | Pointer to a structure describing the buffer layout |
| buf | Pointer to buffer array |