mirror of
https://github.com/jam422470459/EPD-nRF52-hema213.git
synced 2025-12-07 09:02:52 +08:00
add GUI emulator
This commit is contained in:
18
GUI/GUI.h
18
GUI/GUI.h
@@ -1,8 +1,11 @@
|
||||
#ifndef __GUI_H
|
||||
#define __GUI_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "EPD_driver.h"
|
||||
#include "Adafruit_GFX.h"
|
||||
|
||||
#ifndef PAGE_HEIGHT
|
||||
#define PAGE_HEIGHT ((__HEAP_SIZE / 50) - 4)
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
MODE_NONE = 0,
|
||||
@@ -10,6 +13,15 @@ typedef enum {
|
||||
MODE_CLOCK = 2,
|
||||
} display_mode_t;
|
||||
|
||||
void DrawGUI(epd_model_t *epd, uint32_t timestamp, display_mode_t mode);
|
||||
typedef struct {
|
||||
bool bwr;
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint32_t timestamp;
|
||||
int8_t temperature;
|
||||
float voltage;
|
||||
} gui_data_t;
|
||||
|
||||
void DrawGUI(gui_data_t *data, buffer_callback draw, display_mode_t mode);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user