1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

OSD - Add support for async screen clearing to display API.

No screen clearing is actually done asynchronously yet.
This commit is contained in:
Dominic Clifton 2022-01-22 14:33:57 +01:00
parent f2559fbfd8
commit e2c0388a6a
17 changed files with 174 additions and 145 deletions

View file

@ -59,6 +59,11 @@ typedef enum {
DISPLAY_BACKGROUND_COUNT // must be the last entry
} displayPortBackground_e;
typedef enum {
DISPLAY_CLEAR_NONE = 0,
DISPLAY_CLEAR_WAIT = 1 << 0,
} displayClearOption_e;
struct displayCanvas_s;
struct osdCharacter_s;
struct displayPortVTable_s;
@ -87,7 +92,7 @@ typedef struct displayPort_s {
typedef struct displayPortVTable_s {
int (*grab)(displayPort_t *displayPort);
int (*release)(displayPort_t *displayPort);
int (*clearScreen)(displayPort_t *displayPort);
int (*clearScreen)(displayPort_t *displayPort, displayClearOption_e options);
bool (*drawScreen)(displayPort_t *displayPort);
int (*screenSize)(const displayPort_t *displayPort);
int (*writeString)(displayPort_t *displayPort, uint8_t x, uint8_t y, uint8_t attr, const char *text);
@ -112,7 +117,7 @@ void displayGrab(displayPort_t *instance);
void displayRelease(displayPort_t *instance);
void displayReleaseAll(displayPort_t *instance);
bool displayIsGrabbed(const displayPort_t *instance);
void displayClearScreen(displayPort_t *instance);
void displayClearScreen(displayPort_t *instance, displayClearOption_e options);
bool displayDrawScreen(displayPort_t *instance);
int displayScreenSize(const displayPort_t *instance);
void displaySetXY(displayPort_t *instance, uint8_t x, uint8_t y);