30 lines
828 B
C++
30 lines
828 B
C++
#ifndef SMART_ALARM_DISPLAY_H
|
|
#define SMART_ALARM_DISPLAY_H
|
|
#include <array>
|
|
#include <cstdint>
|
|
|
|
#include "alarm.h"
|
|
#include "gc9a01.h"
|
|
void display_start();
|
|
void print_time(bool force_refresh = false);
|
|
void clear_display();
|
|
void draw_ui_circle(uint16_t color);
|
|
std::array<uint16_t,2> get_ui_circle_vertical_pos(uint16_t x, uint16_t center_x = 120, uint16_t center_y = 120, uint16_t radius = 119);
|
|
|
|
extern gc9a01_GC9A01_obj_t display;
|
|
|
|
enum selected_t {
|
|
NOT_SELECTED = WHITE,
|
|
SELECTED = GREEN,
|
|
SETTING = RED
|
|
};
|
|
|
|
void print_alarm(alarm* alarm, selected_t selected, uint8_t x,u_int8_t y);
|
|
void print_add_button(uint8_t center_x, uint8_t center_y,uint8_t w, uint16_t color);
|
|
#define MAX_X 240
|
|
#define MAX_Y 240
|
|
#define ALARM_BOX_WIDTH 70
|
|
#define ALARM_BOX_HEIGHT 30
|
|
|
|
#define ORANGE 0xf420
|
|
#endif //SMART_ALARM_DISPLAY_H
|