device/class/display.h header reference
[Devices support library module]

The source code of this header can be browsed online.

Description [link] 

Members [link] 

Types [link] 

Functions [link] 

Macros [link] 

Members detail [link] 

#define DEV_DISPLAY_ALLOC(n) [link] 

This macro is declared in device/class/display.h source file, line 245.

See also dev_display_alloc_t.

#define DEV_DISPLAY_CALLBACK(n) [link] 

This macro is declared in device/class/display.h source file, line 313.

See also dev_display_callback_t.

#define DEV_DISPLAY_INFO(n) [link] 

This macro is declared in device/class/display.h source file, line 236.

See also dev_display_info_t.

#define DEV_DISPLAY_REQUEST(n) [link] 

This macro is declared in device/class/display.h source file, line 399.

See also dev_display_request_t.

#define DEV_DISPLAY_RESUME(n) [link] 

This macro is declared in device/class/display.h source file, line 422.

See also dev_display_resume_t.

#define DRIVER_DISPLAY_METHODS(prefix) [link] 

This macro is declared in device/class/display.h source file, line 441.

See also struct driver_display_s.

#define __DEVICE_DISPLAY_H__ [link] 

This macro is declared in device/class/display.h source file, line 31.

typedef void *(dev_display_alloc_t)(struct device_display_s *dev, void *ptr, size_t size) [link] 

This typedef is declared in device/class/display.h source file, line 256.

This typedef allocates memory used to store surface data.

Depending on the hardware, this allocates a buffer in the display controller internal memory or with specific alignment constraints.

The usage is similar to the standard realloc function. Resizing may not be supported.

This declaration involves expansion of the DEV_DISPLAY_ALLOC macro.

typedef bool_t (dev_display_callback_t)(struct dev_display_rq_s *rq, dev_display_date_t date) [link] 

This typedef is declared in device/class/display.h source file, line 344.

This typedef is called when the display has been refreshed. The ownership of the surface buffer is transferred back to the user.

The display request terminates if this callback returns 0. If this callback returns 1, the ownership of the buffer is transferred again to the driver and an other refresh cycle is scheduled.

The callback function may update the following fields of the request object before returning:

It may also update most fields of the surfaces. The dev_display_surface_s::changes field needs to be updated as well.

The next_date parameter gives an estimate of the date of the next call to this function, assuming the deadline field of the request will be zero. The next_id parameter is useful for calling the dev_display_deadline_t function.

It is not permitted to call the dev_display_request_t function in order to start a new operation from this callback. This callback is potentially invoked from an interrupt handler.

This declaration involves expansion of the DEV_DISPLAY_CALLBACK macro.

typedef uint16_t dev_display_coord_t [link] 

This typedef is declared in device/class/display.h source file, line 46.

typedef uint64_t dev_display_date_t [link] 

This typedef is declared in device/class/display.h source file, line 47.

struct dev_display_fmt_info_s [link] 

This struct is declared in device/class/display.h source file, line 191.

See also struct dev_display_info_s.

FieldDescription
uint8_t bpp_m1:5;number of bits per pixel minus one.
uint8_t pal_bpp_m1:5;number of bits per palette entry minus one. Zero indicates that no palette is used.
enum dev_display_pixfmt_e fmt;pixel format descriptor

struct dev_display_info_s [link] 

This struct is declared in device/class/display.h source file, line 205.

See also dev_display_info_t.

FieldDescription
const struct dev_display_mode_info_s * modes;
const struct dev_display_fmt_info_s * pixfmts;
enum dev_display_surface_changes_e schanges:16;Mask of surface fields which can be updated by the dev_display_callback_t function.
enum dev_display_rq_changes_e rchanges:8;Mask of request fields which can be updated by the dev_display_callback_t function.
uint8_t modes_count;Number of descriptors in the modes array
uint8_t pixfmts_count;Number of descriptors in the pixfmt array
uint8_t max_surface_count;Maximum number of surfaces handled by a request.
enum dev_display_transform_e transform_mask;Mask of supported transforms
uint8_t persistent:1;Specifies if parts of the display not covered by a surface are persistent between frames.
uint8_t op_mask;Mask of supported surface operations
See also enum dev_display_op_e.

typedef const struct dev_display_info_s *(dev_display_info_t)(const struct device_display_s *accessor) [link] 

This typedef is declared in device/class/display.h source file, line 242.

This typedef returns the display device capabilities.

This declaration involves expansion of the DEV_DISPLAY_INFO macro.

struct dev_display_mode_info_s [link] 

This struct is declared in device/class/display.h source file, line 148.

See also struct dev_display_info_s.

FieldDescription
dev_display_coord_t width;width of the screen in pixels
dev_display_coord_t height;height of the screen in pixels
uint32_t pix_conv_mask;Mask of surface pixel formats which can be used when this mode is in use. When the bit at index is set in the mask, a surface with the pixel format specified at index in the array struct dev_display_fmt_info_s can be used to display in this mode.
dev_display_coord_t xsrc_align;Allowed pixel alignment of dev_display_surface_s::xsrc.
dev_display_coord_t ysrc_align;Allowed pixel alignment of dev_display_surface_s::ysrc.
dev_display_coord_t x_align;Allowed pixel alignment of dev_display_surface_s::xstart and dev_display_surface_s::xend + 1. Zero can be used to indicates that surfaces width must span the entire screen.
dev_display_coord_t y_align;Allowed pixel alignment of dev_display_surface_s::ystart and dev_display_surface_s::yend + 1. Zero can be used to indicates that surfaces height must span the entire screen.
uint8_t log2_row_align:2;Byte alignment of any pixel row in surface data.
uint8_t pix_fmt_index:5;Native pixel format used by the display in this mode. Pixel format index is device specific and is described in struct dev_display_fmt_info_s
uint8_t padding:1;Specifies if padding is allowed between rows in surface data.

enum dev_display_op_e [link] 

This enum is declared in device/class/display.h source file, line 140.

IdentifierDescription
DEV_DISP_OP_OVERLAY
DEV_DISP_OP_NOP

enum dev_display_pixfmt_e [link] 

This enum is declared in device/class/display.h source file, line 50.

IdentifierDescription
DEV_DISP_PIXFMT_1BPP_LSB1 bit per pixel monochrome, pixel 0 on least significant bit
DEV_DISP_PIXFMT_1BPP_MSB1 bit per pixel monochrome, pixel 0 on most significant bit
DEV_DISP_PIXFMT_2BPP_LSB2 bit per pixel monochrome, pixel 0 on least significant bit
DEV_DISP_PIXFMT_2BPP_MSB2 bit per pixel monochrome, pixel 0 on most significant bit
DEV_DISP_PIXFMT_2BPP_PAL_LSB2 bit per pixel palette, pixel 0 on least significant bit
DEV_DISP_PIXFMT_2BPP_PAL_MSB2 bit per pixel palette, pixel 0 on most significant bit
DEV_DISP_PIXFMT_4BPP_LSB4 bit per pixel monochrome, pixel 0 on least significant bit
DEV_DISP_PIXFMT_4BPP_MSB4 bit per pixel monochrome, pixel 0 on most significant bit
DEV_DISP_PIXFMT_4BPP_PAL_LSB4 bit per pixel palette, pixel 0 on least significant bit
DEV_DISP_PIXFMT_4BPP_PAL_MSB4 bit per pixel palette, pixel 0 on most significant bit
DEV_DISP_PIXFMT_8BPP8 bit per pixel monochrome
DEV_DISP_PIXFMT_8BPP_PAL8 bit per pixel palette
DEV_DISP_PIXFMT_16BPP_0RGB_555_LE16 bit per pixel 0RGB 1:5:5:5, little endian
DEV_DISP_PIXFMT_16BPP_ARGB_555_LE16 bit per pixel ARGB 1:5:5:5, little endian
DEV_DISP_PIXFMT_16BPP_RGB_565_LE16 bit per pixel RGB 5:6:5, little endian
DEV_DISP_PIXFMT_16BPP_ARGB_444_LE16 bit per pixel ARGB 4:4:4:4, little endian
DEV_DISP_PIXFMT_24BPP_RGB_LE24 bit per pixel RGB 8:8:8, little endian
DEV_DISP_PIXFMT_32BPP_ARGB_LE32 bit per pixel ARGB 8:8:8:8, little endian

typedef error_t (dev_display_request_t)(const struct device_display_s *accessor, struct dev_display_rq_s *rq) [link] 

This typedef is declared in device/class/display.h source file, line 420.

This typedef starts a display request. When the display has been refreshed, the dev_display_callback_t function provided along with the request is invoked. The callback has to decide if the request terminates or continues with an other refresh cycle.

This function may return the following error codes:

  • -EBUSY if a request is already running.

  • -ENOTSUP if some attributes of the request are not supported by the hardware. The dev_display_info_t function can be used to check what is supported.

  • 0 on success.

The display may switch off when no request is running.

This declaration involves expansion of the DEV_DISPLAY_REQUEST macro.

typedef error_t (dev_display_resume_t)(const struct device_display_s *accessor, struct dev_display_rq_s *rq) [link] 

This typedef is declared in device/class/display.h source file, line 431.

When the dev_display_callback_t function has been called and the request use the DEV_DISPLAY_PERSIST sync mode, this function must be called in order to trigger the next refresh.

This declaration involves expansion of the DEV_DISPLAY_RESUME macro.

enum dev_display_rq_changes_e [link] 

This enum is declared in device/class/display.h source file, line 120.

This enum specifies fields of the struct dev_display_rq_s structure that have been modified by the dev_display_callback_t function.

IdentifierDescription
DEV_DISPLAY_CH_RATE
DEV_DISPLAY_CH_SYNC
DEV_DISPLAY_CH_SCOUNT
DEV_DISPLAY_CH_RINIT

void dev_display_rq_done(struct dev_display_rq_s *rq) [link] 

This function is declared in device/class/display.h source file, line 397.

This function invokes or schedules execution of the display request callback associated to the request. For use in device drivers.

struct dev_display_rq_s * dev_display_rq_from_kr(struct kroutine_s *kr) [link] 

This function is declared in device/class/display.h source file, line 397.

This function retrieves a pointer to the request when in the request completion callback routine.

void dev_display_rq_init(struct dev_display_rq_s *rq, kroutine_exec_t *exec) [link] 

This function is declared in device/class/display.h source file, line 397.

This function initializes the given display request callback. This must be used before submitting the request to a driver.

This is available when CONFIG_MUTEK_KROUTINE_SCHED is defined.

void dev_display_rq_init_immediate(struct dev_display_rq_s *rq, kroutine_exec_t *exec) [link] 

This function is declared in device/class/display.h source file, line 397.

This function initializes the given display request callback. This must be used before submitting the request to a driver.

void dev_display_rq_init_queue(struct dev_display_rq_s *rq, kroutine_exec_t *exec, struct kroutine_queue_s *queue) [link] 

This function is declared in device/class/display.h source file, line 397.

This function initializes the given display request callback. This must be used before submitting the request to a driver.

This is available when CONFIG_MUTEK_KROUTINE_QUEUE is defined.

void dev_display_rq_init_seq(struct dev_display_rq_s *rq, kroutine_exec_t *exec, struct kroutine_sequence_s *seq) [link] 

This function is declared in device/class/display.h source file, line 397.

This function initializes the given display request callback. This must be used before submitting the request to a driver.

This is available when CONFIG_MUTEK_KROUTINE_SCHED is defined.

struct dev_display_rq_s [link] 

This struct is declared in device/class/display.h source file, line 348.

See also dev_display_request_t.

FieldDescription
union <anonymous> {
struct dev_request_s base;
typeof(struct dev_request_s::error) error;
typeof(struct dev_request_s::pvdata) pvdata;
};
union <anonymous> {
dev_display_date_t deadline;This can be used to schedule the next display at the specified absolute time.
See also DEV_DISPLAY_SCHEDULE.
struct <anonymous> {Display refresh rate in frames per second.
See also DEV_DISPLAY_KEEP_RATE and DEV_DISPLAY_NEW_RATE.
uint16_t num;
uint16_t denom;
} rate;
};
dev_display_callback_t * f_done;This function is called when the display has been refreshed. See dev_display_callback_t for details.
struct dev_display_surface_s * surfaces;This points to an array of surface descriptors involved in refresh of the display. This can be changed during execution of the request. In this case, the changes field of the new descriptors must be updated accordingly.
enum dev_display_rq_changes_e changes;When the request callback returns 1, it must also updates this field in order to indicate which fields have been updated. When the request is pushed, DEV_DISPLAY_CH_RINIT must be used.
The driver will clear all bits after display of the surface.
enum dev_display_rq_sync_e sync;This specifies when the dev_display_callback_t function is invoked.
uint8_t surfaces_count;This specifies the number of surfaces involved in refresh of the display.
uint8_t mode;index of the display mode. Display mode index is device specific and is described in struct dev_display_mode_info_s.

struct dev_request_s * dev_display_rq_s_base(struct dev_display_rq_s *x) [link] 

This function is declared in device/class/display.h source file, line 397.

struct dev_display_rq_s * dev_display_rq_s_cast(struct dev_request_s *x) [link] 

This function is declared in device/class/display.h source file, line 397.

enum dev_display_rq_sync_e [link] 

This enum is declared in device/class/display.h source file, line 128.

IdentifierDescription
DEV_DISPLAY_VSYNCDisplay the next frame based on the current frame rate.
DEV_DISPLAY_SCHEDULESchedule display of the next frame at the deadline from the request structure.
DEV_DISPLAY_PERSISTKeep the current frame displayed until the dev_display_resume_t function is called.

enum dev_display_surface_changes_e [link] 

This enum is declared in device/class/display.h source file, line 102.

This enum specifies fields of the struct dev_display_surface_s structure that have been modified by the dev_display_callback_t function.

IdentifierDescription
DEV_DISPLAY_CH_DATA
DEV_DISPLAY_CH_PALETTE
DEV_DISPLAY_CH_XSTART
DEV_DISPLAY_CH_YSTART
DEV_DISPLAY_CH_XEND
DEV_DISPLAY_CH_YEND
DEV_DISPLAY_CH_FORMAT
DEV_DISPLAY_CH_ALPHA
DEV_DISPLAY_CH_STRIDE
DEV_DISPLAY_CH_TRANSFORM
DEV_DISPLAY_CH_SINIT

struct dev_display_surface_s [link] 

This struct is declared in device/class/display.h source file, line 263.

See also dev_display_request_t and struct dev_display_rq_s.

FieldDescription
void * data;Pixel data. layout depends on pixel format. The bytes size of the buffer is stride * (ysrc + yend - ystart + 1).
The memory must be allocated by the dev_display_alloc_t function.
void * palette;Palette data. Buffer size and entries layout depend on pixel format. Not used when the pixel format does not rely on a palette or when the hardware does not support changing the palette.
enum dev_display_surface_changes_e changes:16;When the request callback returns 1, it must also updates this field in order to indicate which fields have been updated. When the surface is to be displayed for the first time in a request, DEV_DISPLAY_CH_SINIT must be used.
The driver will clear all bits except DEV_DISPLAY_CH_DATA after display of the surface. When the display is persistent (see struct dev_display_mode_info_s), the driver will also clear DEV_DISPLAY_CH_DATA.
dev_display_coord_t xsrc; coordinates of the pixel in the surface shown at (xstart, ystart) on the display.
dev_display_coord_t ysrc; coordinates of the pixel in the surface shown at (xstart, ystart) on the display.
dev_display_coord_t xstart; coordinates of the surface on the display
dev_display_coord_t ystart; coordinates of the surface on the display
dev_display_coord_t xend; coordinates of the surface on the display
dev_display_coord_t yend; coordinates of the surface on the display
uint8_t format;pixel format. pixel format index is device specific and is described in struct dev_display_fmt_info_s
uint8_t alpha;0 is transparent, 255 is opaque
enum dev_display_op_e op;surface operator.
uint16_t stride;storage size of a single row in bytes.
enum dev_display_transform_e transform;This applies some transform to the scan order. The scan order and orientation of the whole display is device specific.

enum dev_display_transform_e [link] 

This enum is declared in device/class/display.h source file, line 92.

This enum specified surface flip and rotate operations.

IdentifierDescription
DEV_DISPLAY_HR_FLIP
DEV_DISPLAY_VR_FLIP
DEV_DISPLAY_ROT_90

struct device_display_s [link] 

This struct is declared in DRIVER_CLASS_TYPES function like macro expansion, line 21 in device/class/display.h source file, line 439.

This struct is the device accessor object type for the display device class. This accessor must be initialized by calling the device_get_accessor function.

See also DRIVER_CLASS_DISPLAY, struct device_accessor_s and Device accessor.

FieldDescription
union <anonymous> {
struct device_accessor_s base;
struct <anonymous> {
struct device_s * dev;
struct driver_display_s * api;
uint_fast8_t number;
};
};

struct device_accessor_s * device_display_s_base(struct device_display_s *x) [link] 

This function is declared in DRIVER_CLASS_TYPES function like macro expansion, line 42 in device/class/display.h source file, line 439.

This function casts a display device accessor to a generic device accessor

struct device_display_s * device_display_s_cast(struct device_accessor_s *x) [link] 

This function is declared in DRIVER_CLASS_TYPES function like macro expansion, line 35 in device/class/display.h source file, line 439.

This function casts a generic device accessor to a display device accessor

struct driver_display_s [link] 

This struct is declared in DRIVER_CLASS_TYPES function like macro expansion, line 5 in device/class/display.h source file, line 439.

This struct is the driver API descriptor for the display device class.

See also DRIVER_CLASS_DISPLAY and struct driver_class_s.

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:05 2022 using MkDoc