-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlcd_fonts.h
73 lines (65 loc) · 1.86 KB
/
lcd_fonts.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
67
68
69
70
71
72
73
#include <stdint.h>
#ifndef __LCDFONT_FONTS_H__
#define __LCDFONT_FONTS_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "lcd_font_def.h"
#include "lcd_fontdraw.h"
#define FONT_FLAG_WPTR 0x01
#define FONT_FLAG_VERT 0x02
#define FONT_FLAG_BTAB 0x04
typedef struct FontDef FontDef;
struct FontDef {
const uint8_t FontWidth; /*!< Font width in pixels */
const uint8_t FontHeight; /*!< Font height in pixels */
//const uint8_t bBigTable; //0 mean code table from 32-127, 1 mean code table 1-255
const uint8_t flags;
const uint8_t unused1;
const uint16_t *data; /*!< Pointer to data font data array */
};
//typedef struct {
// const uint8_t FontWidth; /*!< Font width in pixels */
// uint8_t FontHeight; /*!< Font height in pixels */
// const uint8_t *data; /*!< Pointer to data font data array */
//} FontDef8;
#ifdef LCDFONT_INCLUDE_FONT_5x7 //5x7 no padding
extern FontDef Font_5x7;
#endif
#ifdef LCDFONT_INCLUDE_FONT_6x8
extern FontDef Font_6x8;
#endif
#ifdef LCDFONT_INCLUDE_FONT_7x10
extern FontDef Font_7x10;
#endif
#ifdef LCDFONT_INCLUDE_FONT_8x16
extern FontDef Font_8x16;
#endif
#ifdef LCDFONT_INCLUDE_FONT_6x8_16
extern FontDef Font_6x8_16;
#endif
#ifdef LCDFONT_INCLUDE_FONT_11x18
extern FontDef Font_11x18;
#endif
#ifdef LCDFONT_INCLUDE_FONT_16x26
extern FontDef Font_16x26;
#endif
#ifdef LCDFONT_INCLUDE_FONT_16x24
extern FontDef Font_16x24;
#endif
#ifdef LCDFONT_INCLUDE_FONT_6x8
#define ICO_NUMBER_DOT 1 //total 10
#define ICO_DOT_NUMBER 140 //total 10
#define ICO_BATTERY_VOLTAGE 11 //total 5
#define ICO_VOUTVOL 16 //total 15
#define ICO_BATUM 127 //total 2
#define ICO_VOUTNUM 129 //total 8
#define ICO_PWRIN 137
#define ICO__BAT 138
#define ICO__USB 139
#endif
#define FONT_SHIFT_NUMBER 48
#ifdef __cplusplus
}
#endif
#endif // __LCDFONT_FONTS_H__