1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00
trezor-firmware/extmod/modtrezorui/display.h

42 lines
1.8 KiB
C
Raw Normal View History

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
#define FONT_MONO 0
#define FONT_NORMAL 1
#define FONT_BOLD 2
2016-05-11 19:05:08 +00:00
void display_init(void);
void display_set_window(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
int display_orientation(int degrees);
int display_backlight(int val);
2016-05-11 19:05:08 +00:00
void set_color_table(uint16_t colortable[16], uint16_t fgcolor, uint16_t bgcolor);
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-05-11 19:05:08 +00:00
void display_bar(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t c);
2016-06-13 14:13:12 +00:00
void display_bar_radius(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t c, uint16_t b, uint8_t r);
2016-05-11 19:05:08 +00:00
void display_blit(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const void *data, int datalen);
void display_image(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const void *data, int datalen);
void display_icon(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const void *data, int datalen, uint16_t fgcolor, uint16_t bgcolor);
void display_text(uint8_t x, uint8_t y, const char *text, int textlen, uint8_t font, uint16_t fgcolor, uint16_t bgcolor);
void display_text_center(uint8_t x, uint8_t y, const char *text, int textlen, uint8_t font, uint16_t fgcolor, uint16_t bgcolor);
void display_text_right(uint8_t x, uint8_t y, const char *text, int textlen, uint8_t font, uint16_t fgcolor, uint16_t bgcolor);
uint32_t display_text_width(const char *text, int textlen, uint8_t font);
2016-05-11 19:05:08 +00:00
void display_qrcode(uint8_t x, uint8_t y, const char *data, int datalen, int scale);
2016-05-13 12:33:33 +00:00
void display_loader(uint16_t progress, uint16_t fgcolor, uint16_t bgcolor, const uint8_t *icon, uint32_t iconlen, uint16_t iconfgcolor);
2016-05-11 19:05:08 +00:00
void display_raw(uint8_t reg, const uint8_t *data, int datalen);
#endif