_CFBD_OLED_OPS¶
#include <oled.h>
Public Attributes¶
| Name | |
|---|---|
| int(*)(CFBD_OLED *oled, void *init_args) | init Initialize the OLED device. |
| CFBD_Bool(*)(CFBD_OLED *oled, uint16_t x, uint16_t y) | setPixel Set a single pixel at (x, y) to on/enabled state. |
| CFBD_Bool(*)(CFBD_OLED *device, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *source) | setArea Write a block of pixel data to a rectangular area. |
| FrameOperation | update Push the local frame buffer to the display. |
| FrameOperation | clear Clear the entire display and frame buffer. |
| FrameOperation | revert Revert the display to the previous frame content (if supported). |
| AreaOperations | update_area Update a rectangular area on the display. |
| AreaOperations | clear_area Clear a rectangular area on the display and buffer. |
| AreaOperations | revert_area Revert a rectangular area to its previous content (if supported). |
| OLEDSelfOperation | open Open/enable the display device. |
| OLEDSelfOperation | close Close/disable the display device. |
| OLED_QueryOperation | self_consult Query device properties and capabilities. |
| OLED_SetPropertyOperation | self_property_setter set device properties and capabilities. |
Public Attributes Documentation¶
variable init¶
Initialize the OLED device.
Parameters:
- oled Pointer to the CFBD_OLED instance.
- init_args Optional device-specific initialization arguments.
Return: int Status code; typically 0 for success, negative for errors.
variable setPixel¶
Set a single pixel at (x, y) to on/enabled state.
Parameters:
- oled Pointer to the CFBD_OLED instance.
- x X coordinate of the pixel.
- y Y coordinate of the pixel.
Return: CFBD_Bool CFBD_TRUE on success, CFBD_FALSE on failure.
variable setArea¶
CFBD_Bool(*)(CFBD_OLED *device, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t *source) setArea;
Write a block of pixel data to a rectangular area.
Parameters:
- device Pointer to the CFBD_OLED instance.
- x X coordinate of the area's top-left corner.
- y Y coordinate of the area's top-left corner.
- width Width of the area in pixels.
- height Height of the area in pixels.
- source Pointer to source bitmap data. Format is device-dependent.
Return: CFBD_Bool CFBD_TRUE on success, CFBD_FALSE on failure.
variable update¶
Push the local frame buffer to the display.
Synchronizes the local frame buffer (frame RAM) with the display, making all buffered changes visible on the physical display.
variable clear¶
Clear the entire display and frame buffer.
Clears all pixels on the display and in the local frame buffer, typically by writing zero bytes to all GRAM locations.
variable revert¶
Revert the display to the previous frame content (if supported).
Restores the previously displayed content. Not all devices support this operation; implementation may return CFBD_FALSE if unavailable.
variable update_area¶
Update a rectangular area on the display.
variable clear_area¶
Clear a rectangular area on the display and buffer.
variable revert_area¶
Revert a rectangular area to its previous content (if supported).
variable open¶
Open/enable the display device.
Powers on the display and initializes hardware resources. Must be called before using display operations.
variable close¶
Close/disable the display device.
Powers off the display and releases hardware resources.
variable self_consult¶
Query device properties and capabilities.
Retrieves device-specific information such as resolution, color depth, and supported features. Implementations must support at least:
- "rgb" (CFBD_Bool): CFBD_TRUE for RGB, CFBD_FALSE for monochrome
- "width" (uint16_t): Display width in pixels
- "height" (uint16_t): Display height in pixels
- "color" (uint8_t): Some Chips supports grey scale, try query these :)
Additional device-specific properties may be queried as needed.
variable self_property_setter¶
set device properties and capabilities.
Retrieves device-specific information such as resolution, color depth, and supported features. Implementations must support at least:
- "color" (uint8_t): Some Chips supports grey scale, you can set this
Additional device-specific properties may be queried as needed.
Updated on 2026-02-03 at 13:21:55 +0000