diff options
| author | JF <jf@codingfield.com> | 2020-01-26 15:35:18 +0100 |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-01-26 15:35:18 +0100 |
| commit | 640e8cd1febc679b976fb26225aec8d462a4c241 (patch) | |
| tree | e008509713b90cf7c71b442b903a415d11227c1f /src/Components/Gfx/Gfx.h | |
| parent | 5fa4f5abe0b752bb2d990378e02d6424a1d1b661 (diff) | |
GFX : wait end of transfert using a task notification.
Code cleaning in SpiMaster.
Diffstat (limited to 'src/Components/Gfx/Gfx.h')
| -rw-r--r-- | src/Components/Gfx/Gfx.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Components/Gfx/Gfx.h b/src/Components/Gfx/Gfx.h index 81c5f387..f31b13c0 100644 --- a/src/Components/Gfx/Gfx.h +++ b/src/Components/Gfx/Gfx.h @@ -2,6 +2,8 @@ #include <cstdint> #include <nrf_font.h> #include <drivers/BufferProvider.h> +#include <FreeRTOS.h> +#include <task.h> namespace Pinetime { @@ -36,6 +38,7 @@ namespace Pinetime { volatile FONT_INFO *font; volatile uint16_t color; volatile uint8_t character; + volatile TaskHandle_t taskToNotify = nullptr; }; volatile State state; @@ -45,6 +48,8 @@ namespace Pinetime { void pixel_draw(uint8_t x, uint8_t y, uint16_t color); void SetBackgroundColor(uint16_t color); + void WaitTransfertFinished() const; + void NotifyEndOfTransfert(TaskHandle_t task); }; } } |
