mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +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:
parent
f2559fbfd8
commit
e2c0388a6a
17 changed files with 174 additions and 145 deletions
|
@ -31,9 +31,9 @@
|
|||
|
||||
#include "display.h"
|
||||
|
||||
void displayClearScreen(displayPort_t *instance)
|
||||
void displayClearScreen(displayPort_t *instance, displayClearOption_e options)
|
||||
{
|
||||
instance->vTable->clearScreen(instance);
|
||||
instance->vTable->clearScreen(instance, options);
|
||||
instance->cleared = true;
|
||||
instance->cursorRow = -1;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ int displayScreenSize(const displayPort_t *instance)
|
|||
void displayGrab(displayPort_t *instance)
|
||||
{
|
||||
instance->vTable->grab(instance);
|
||||
instance->vTable->clearScreen(instance);
|
||||
instance->vTable->clearScreen(instance, DISPLAY_CLEAR_WAIT);
|
||||
++instance->grabCount;
|
||||
}
|
||||
|
||||
|
@ -216,10 +216,11 @@ bool displaySupportsOsdSymbols(displayPort_t *instance)
|
|||
void displayInit(displayPort_t *instance, const displayPortVTable_t *vTable, displayPortDeviceType_e deviceType)
|
||||
{
|
||||
instance->vTable = vTable;
|
||||
instance->vTable->clearScreen(instance);
|
||||
instance->useFullscreen = false;
|
||||
instance->cleared = true;
|
||||
instance->grabCount = 0;
|
||||
instance->cursorRow = -1;
|
||||
instance->deviceType = deviceType;
|
||||
|
||||
displayBeginTransaction(instance, DISPLAY_TRANSACTION_OPT_NONE);
|
||||
displayClearScreen(instance, DISPLAY_CLEAR_WAIT);
|
||||
displayCommitTransaction(instance);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue