forked from kbr-net/sdrive-max
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtft.h
66 lines (55 loc) · 1.21 KB
/
tft.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#define PAGE_MAIN 0
#define PAGE_FILE 1
#define PAGE_CONFIG 2
#define PAGE_TAPE 3
#define PAGE_DEBUG 4
struct b_flags {
char type : 1; //ROUND, SQUARE
char active : 1;
char selected : 1;
};
struct button {
char *name;
unsigned int x;
unsigned int y;
unsigned int width;
unsigned int heigth;
unsigned int fg; //foreground/fill color
unsigned int bg; //background/edge color
unsigned int fc; //Font color
struct b_flags *flags;
unsigned int (*pressed)(const struct button *);
};
//#define nbuttons 6 //now automatically detected
struct page {
void (*draw)(void);
const struct button *buttons;
unsigned char nbuttons;
};
#define ATARI810 0
#define ATARI1050 1
struct display {
unsigned int width;
unsigned int heigth;
struct {
unsigned char rot : 1;
unsigned char scroll : 1;
unsigned char boot_d1 : 1;
unsigned char drive_type : 1;
unsigned char blank : 1;
} cfg;
struct page *pages;
//struct TSPoint *tp; //unused
};
struct file_save {
u32 dir_cluster;
u16 file_index;
};
//functions for external use
void pretty_name(char *b);
void draw_Buttons ();
void outbox_P(const char *);
void outbox(char *);
void outbox_multi(char *, unsigned char);
void tft_Setup();
const struct button * check_Buttons();