forked from lab85-ru/jtag_avr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lcd.h
77 lines (62 loc) · 1.66 KB
/
lcd.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
74
75
76
77
#ifndef _LCD_H_
#define _LCD_H_
//#include "compiler.h"
/*! type for Backlight options : use PWM or IO to drive the backlight
*
*/
typedef enum {
backlight_IO = 0,
backlight_PWM
}backlight_options;
/*! type for Backlight power : increase or decrease the backlight
*
*/
typedef enum {
BACKLINGTH_OFF = 0,
BACKLINGTH_ON
}backlight_state_t;
/*! Initialize the LCD
* (need void delay_ms(unsigned short time_ms) function to perform active wait)
*
* \param option backlight_IO if no PWM needed, backlight_PWM if PWM needed...
* \param backlight_on Whether to start with backlight on or off.
*/
extern void lcd_init(int fd);//backlight_options option, Bool backlight_on);
/*! Change the backlight power
*
* \param power increase or decrease the backlight...
*/
extern void lcd_set_backlight(int fd, backlight_state_t led);
/*! Show blinking cursor
*
*/
extern void lcd_show_cursor(int fd);
/*! Hide cursor
*
*/
extern void lcd_hide_cursor(int fd);
/*! Write a byte at current position
*
* \param data Input. data to display
*
*/
extern void lcd_set_cursor_position(int fd, unsigned char column, unsigned char line);
/*! Clear the LCD screen
* (need void delay_ms(unsigned short time_ms) function to perform active wait)
*
*/
extern void lcd_clear_display(int fd);
/*! Write a string
*
* \param string Input. null terminated string to display
*
*/
extern void lcd_write_string(int fd, const char *string);
/*! Write a formatted string
*
* \param format Input. Formatted null terminated string to display
*
*/
extern void lcd_printf_string(int fd, const char *format, ...);
extern void lcd_fputc(int fd, char c);
#endif // _LCD_H_