Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
730 woggle 1
/*****************************************************************************
2
 *   Copyright (C) 2009 Peter "woggle" Mack, mac@denich.net                  *
3
 *   - original LCD control by Thomas "thkais" Kaiser                        *
4
 *   - special number formating routines taken from C-OSD                    *
5
 *      from Claas Anders "CaScAdE" Rathje                                   *
6
 *   - some extension, ellipse and circ_line by Peter "woggle" Mack          *
7
 *                                                                           *
8
 *   This program is free software; you can redistribute it and/or modify    *
9
 *   it under the terms of the GNU General Public License as published by    *
10
 *   the Free Software Foundation; either version 2 of the License.          *
11
 *                                                                           *
12
 *   This program is distributed in the hope that it will be useful,         *
13
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
14
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
15
 *   GNU General Public License for more details.                            *
16
 *                                                                           *
17
 *   You should have received a copy of the GNU General Public License       *
18
 *   along with this program; if not, write to the                           *
19
 *   Free Software Foundation, Inc.,                                         *
20
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.               *
21
 *                                                                           *
22
 *****************************************************************************/
23
 
24
#ifndef _LCD_H
25
#define _LCD_H
26
 
27
//*****************************************************************************
28
// 
29
extern volatile uint8_t LCD_ORIENTATION;
30
 
31
extern uint8_t lcd_xpos;
32
extern uint8_t lcd_ypos;
33
 
34
//*****************************************************************************
35
// 
36
void LCD_Init (void);
37
 
38
void lcd_putc (uint8_t x, uint8_t y, uint8_t c, uint8_t mode);
39
//void send_byte (uint8_t data);
40
void lcd_print (uint8_t *text, uint8_t mode);
41
void lcd_print_at (uint8_t x, uint8_t y, uint8_t *text, uint8_t mode);
42
void lcd_printp (const char *text, uint8_t mode);
43
void lcd_printp_at (uint8_t x, uint8_t y, const char *text, uint8_t mode);
44
void lcd_printpns (const char *text, uint8_t mode);
45
void lcd_printpns_at (uint8_t x, uint8_t y, const char *text, uint8_t mode);
46
void lcd_cls (void);
47
 
48
void print_display (uint8_t *text);
49
void print_display_at (uint8_t x, uint8_t y, uint8_t *text);
50
 
51
 
52
// Jeti
53
void lcd_putc_jeti (uint8_t x, uint8_t y, uint8_t c, uint8_t mode);
54
void lcd_printpj (const char *text, uint8_t mode);
55
void lcd_printpj_at (uint8_t x, uint8_t y, const char *text, uint8_t mode);
56
 
57
void lcd_plot (uint8_t x, uint8_t y, uint8_t mode);
58
void lcd_line (unsigned char x1, unsigned char y1, unsigned char x2, unsigned char y2, uint8_t mode);
59
void lcd_rect (uint8_t x1, uint8_t y1, uint8_t widthx, uint8_t widthy, uint8_t mode);
60
void lcd_frect (uint8_t x1, uint8_t y1, uint8_t widthx, uint8_t widthy, uint8_t mode);
61
void lcd_circle (int16_t x0, int16_t y0, int16_t radius, uint8_t mode);
62
void lcd_fcircle (int16_t x0, int16_t y0, int16_t radius);
63
void lcd_circ_line (uint8_t x, uint8_t y, uint8_t r, uint16_t deg, uint8_t mode);
64
 
65
void lcd_ellipse (int16_t x0, int16_t y0, int16_t rx, int16_t ry, uint8_t mode);
66
void lcd_ellipse_line (uint8_t x, uint8_t y, uint8_t rx, uint8_t ry, uint16_t deg, uint8_t mode);
67
 
68
void lcd_ecircle (int16_t x0, int16_t y0, int16_t radius, uint8_t mode);
69
void lcd_ecirc_line (uint8_t x, uint8_t y, uint8_t r, uint16_t deg, uint8_t mode);
70
 
71
void lcd_view_font (uint8_t page);
72
void lcd_print_hex_at (uint8_t x, uint8_t y, uint8_t h, uint8_t mode);
73
 
74
void lcd_write_number_u (uint8_t number);
75
void lcd_write_number_u_at (uint8_t x, uint8_t y, uint8_t number);
76
 
77
/**
78
 * Write only some digits of a unsigned <number> at <x>/<y>
79
 * <length> represents the length to rightbound the number
80
 * <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of   7
81
 */
82
void write_ndigit_number_u (uint8_t x, uint8_t y, uint16_t number, int16_t length, uint8_t pad);
83
 
84
/**
85
 * Write only some digits of a signed <number> at <x>/<y>
86
 * <length> represents the length to rightbound the number
87
 * <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 007 instead of   7
88
 */
89
void write_ndigit_number_s (uint8_t x, uint8_t y, int16_t number, int16_t length, uint8_t pad);
90
 
91
/**
92
 * Write only some digits of a unsigned <number> at <x>/<y> as /10th of the value
93
 * <length> represents the length to rightbound the number
94
 * <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 00.7 instead of   .7
95
 */
96
void write_ndigit_number_u_10th (uint8_t x, uint8_t y, uint16_t number, int16_t length, uint8_t pad);
97
 
98
/**
99
 * Write only some digits of a unsigned <number> at <x>/<y> as /100th of the value
100
 * <length> represents the length to rightbound the number
101
 * <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 00.7 instead of   .7
102
 */
103
void write_ndigit_number_u_100th (uint8_t x, uint8_t y, uint16_t number, int16_t length, uint8_t pad);
104
 
105
/**
106
 * Write only some digits of a signed <number> at <x>/<y> as /10th of the value
107
 * <length> represents the length to rightbound the number
108
 * <pad> = 1 will cause blank spaced to be filled up with zeros e.g. 00.7 instead of   .7
109
 */
110
void write_ndigit_number_s_10th (uint8_t x, uint8_t y, int16_t number, int16_t length, uint8_t pad);
111
 
112
/**
113
 *  write <seconds> as human readable time at <x>/<y>
114
 */
115
void write_time (uint8_t x, uint8_t y, uint16_t seconds);
116
 
117
/**
118
 * wirte a <position> at <x>/<y> assuming it is a gps position for long-/latitude
119
 */
120
void write_gps_pos (uint8_t x, uint8_t y, int32_t position);
121
 
122
#endif