SWE-350 TOTP Generator
Milestone 5
The DE-10 board has six 7-segment displays, this can be used to display and generate a time based one-time pin (TOTP).
Loading...
Searching...
No Matches
font.h
Go to the documentation of this file.
1
#ifndef __FONT_H__
2
#define __FONT_H__
3
4
// font table information
5
// font size : 8 x 16 (pixels)
6
// font cell size for lcd : 16 x 16 (pixels) 16 x 2 (byte_array)
7
// ascii coding index range : 0x00 ~ 0xff
8
// cell looking up method : &font_table[ascii_code][0][0]
9
10
//#define FONT_SIZE_X (8)
11
//#define FONT_SIZE_Y (16)
12
13
//#define CELL_SIZE_X (16)
14
//#define CELL_SIZE_Y (16)
15
16
#define LCD_CELL_SIZE_X (16)
17
#define LCD_CELL_SIZE_Y (2)
18
19
//#define FONTTBL_ASCII_CODE_MIN (0x00)
20
//#define FONTTBL_ASCII_CODE_MAX (0xff)
21
22
23
typedef
unsigned
char
FONT_BITMAP
[
LCD_CELL_SIZE_Y
][
LCD_CELL_SIZE_X
];
24
25
typedef
struct
{
26
int
FontWidth
;
27
int
FontHeight
;
28
int
CellWidth
;
29
int
CellHeight
;
30
int
CodeStart
;
31
int
CodeEnd
;
32
int
BitPerPixel
;
33
FONT_BITMAP
*
pBitmap
;
34
}
FONT_TABLE
;
35
36
// hint: unsigned char font_table[ascii_code][lcd_cell_height/8][lcd_cell_width]
37
extern
FONT_TABLE
font_16x16
;
38
39
#endif
// __FONT_H__
40
font_16x16
FONT_TABLE font_16x16
Definition
font.c:1032
LCD_CELL_SIZE_X
#define LCD_CELL_SIZE_X
Definition
font.h:16
LCD_CELL_SIZE_Y
#define LCD_CELL_SIZE_Y
Definition
font.h:17
FONT_BITMAP
unsigned char FONT_BITMAP[LCD_CELL_SIZE_Y][LCD_CELL_SIZE_X]
Definition
font.h:23
FONT_TABLE
Definition
font.h:25
FONT_TABLE::CodeEnd
int CodeEnd
Definition
font.h:31
FONT_TABLE::FontHeight
int FontHeight
Definition
font.h:27
FONT_TABLE::CodeStart
int CodeStart
Definition
font.h:30
FONT_TABLE::FontWidth
int FontWidth
Definition
font.h:26
FONT_TABLE::BitPerPixel
int BitPerPixel
Definition
font.h:32
FONT_TABLE::CellHeight
int CellHeight
Definition
font.h:29
FONT_TABLE::CellWidth
int CellWidth
Definition
font.h:28
FONT_TABLE::pBitmap
FONT_BITMAP * pBitmap
Definition
font.h:33
LCD
font.h
Generated by
1.12.0