|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
The panel: its size and pixel format, and the rectangle writes the UI flushes through. More...
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | sunxi_display_info |
| Geometry and pixel format of the panel. More... | |
Functions | |
| bool | sunxi_display_ready (void) |
| Whether the display subsystem probed its panel and can accept writes. | |
| int | sunxi_display_get_info (struct sunxi_display_info *info) |
| Copy the published panel geometry out. | |
| int | sunxi_display_write (uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height, uint16_t pitch, const void *buffer) |
| Copy a rectangle to the panel. | |
| int | sunxi_display_write_async (uint16_t x_pos, uint16_t y_pos, uint16_t width, uint16_t height, uint16_t pitch, const void *buffer) |
| Start a rectangle write without waiting for the wire. | |
| bool | sunxi_display_write_done (int *result) |
| Report whether the asynchronous write has finished. | |
| void | sunxi_display_wait (void) |
| Block until the panel is quiet again (the next window command needs it). | |
The panel: its size and pixel format, and the rectangle writes the UI flushes through.
| int sunxi_display_get_info | ( | struct sunxi_display_info * | info | ) |
Copy the published panel geometry out.
| [out] | info | Receives the geometry and pixel format. |
| bool sunxi_display_ready | ( | void | ) |
Whether the display subsystem probed its panel and can accept writes.
| int sunxi_display_write | ( | uint16_t | x_pos, |
| uint16_t | y_pos, | ||
| uint16_t | width, | ||
| uint16_t | height, | ||
| uint16_t | pitch, | ||
| const void * | buffer ) |
Copy a rectangle to the panel.
buffer holds RGB888 pixels in the panel byte order (B, G, R on this board; see bytes_per_pixel and pixels_swapped). The window command is sent first, then the pixels go out over SPI; when pitch equals width the whole rectangle is one transfer, otherwise each row is copied separately.
| [in] | x_pos | Left edge in panel pixels. |
| [in] | y_pos | Top edge in panel pixels. |
| [in] | width | Rectangle width in pixels. |
| [in] | height | Rectangle height in pixels. |
| [in] | pitch | Source row width in pixels, including padding. |
| [in] | buffer | Source pixels, pitch pixels wide. |
| int sunxi_display_write_async | ( | uint16_t | x_pos, |
| uint16_t | y_pos, | ||
| uint16_t | width, | ||
| uint16_t | height, | ||
| uint16_t | pitch, | ||
| const void * | buffer ) |
Start a rectangle write without waiting for the wire.
The window command goes out at once and the second hart pushes the pixels. Poll sunxi_display_write_done() before reusing buffer. Only packed rectangles (pitch == width) are supported.
| [in] | x_pos | Left edge in panel pixels. |
| [in] | y_pos | Top edge in panel pixels. |
| [in] | width | Rectangle width in pixels. |
| [in] | height | Rectangle height in pixels. |
| [in] | pitch | Source row width in pixels; must equal width. |
| [in] | buffer | Source pixels. |
| bool sunxi_display_write_done | ( | int * | result | ) |
Report whether the asynchronous write has finished.
| [out] | result | Receives the write result when the transfer completed. |