2016-05-11 19:05:08 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) Pavol Rusnak, SatoshiLabs
|
|
|
|
*
|
2016-05-28 12:37:32 +00:00
|
|
|
* Licensed under TREZOR License
|
|
|
|
* see LICENSE file for details
|
2016-05-11 19:05:08 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DISPLAY_H__
|
|
|
|
#define __DISPLAY_H__
|
|
|
|
|
2016-10-03 14:17:49 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2016-09-24 14:53:43 +00:00
|
|
|
#define DISPLAY_RESX 240
|
|
|
|
#define DISPLAY_RESY 240
|
2016-05-11 19:05:08 +00:00
|
|
|
|
2016-09-28 16:15:06 +00:00
|
|
|
#define FONT_MONO 0
|
|
|
|
#define FONT_NORMAL 1
|
|
|
|
#define FONT_BOLD 2
|
|
|
|
|
2016-10-10 12:38:11 +00:00
|
|
|
#define LOADER_ICON_SIZE 64
|
|
|
|
|
2016-05-11 19:05:08 +00:00
|
|
|
void display_init(void);
|
2016-05-17 22:39:19 +00:00
|
|
|
int display_orientation(int degrees);
|
|
|
|
int display_backlight(int val);
|
2016-10-12 16:58:18 +00:00
|
|
|
int *display_offset(int xy[2]);
|
2016-05-11 19:05:08 +00:00
|
|
|
|
2016-10-13 15:09:46 +00:00
|
|
|
void display_set_window(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
|
|
|
|
|
2016-09-28 15:00:27 +00:00
|
|
|
void display_clear(void);
|
2016-10-03 09:52:19 +00:00
|
|
|
void display_refresh(void);
|
2016-10-13 15:09:46 +00:00
|
|
|
|
|
|
|
void display_bar(int x, int y, int w, int h, uint16_t c);
|
|
|
|
void display_bar_radius(int x, int y, int w, int h, uint16_t c, uint16_t b, uint8_t r);
|
|
|
|
void display_image(int x, int y, int w, int h, const void *data, int datalen);
|
|
|
|
void display_icon(int x, int y, int w, int h, const void *data, int datalen, uint16_t fgcolor, uint16_t bgcolor);
|
|
|
|
void display_qrcode(int x, int y, const char *data, int datalen, uint8_t scale);
|
2016-10-18 14:27:13 +00:00
|
|
|
void display_loader(uint16_t progress, int yoffset, uint16_t fgcolor, uint16_t bgcolor, const uint8_t *icon, uint32_t iconlen, uint16_t iconfgcolor);
|
2016-10-13 15:09:46 +00:00
|
|
|
void display_text(int x, int y, const char *text, int textlen, uint8_t font, uint16_t fgcolor, uint16_t bgcolor);
|
|
|
|
void display_text_center(int x, int y, const char *text, int textlen, uint8_t font, uint16_t fgcolor, uint16_t bgcolor);
|
|
|
|
void display_text_right(int x, int y, const char *text, int textlen, uint8_t font, uint16_t fgcolor, uint16_t bgcolor);
|
|
|
|
int display_text_width(const char *text, int textlen, uint8_t font);
|
|
|
|
|
2016-05-11 19:05:08 +00:00
|
|
|
void display_raw(uint8_t reg, const uint8_t *data, int datalen);
|
2016-10-05 22:02:46 +00:00
|
|
|
void display_save(const char *filename);
|
2016-05-11 19:05:08 +00:00
|
|
|
|
|
|
|
#endif
|