-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlcdout.h
31 lines (24 loc) · 787 Bytes
/
lcdout.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
#ifndef LCDOUT_INCLUDE
#define LCDOUT_INCLUDE
#include <hidapi/hidapi.h>
#define LCD_VID 0x1929
#define LCD_PID 0x050c
#define LCD_EP_OUT 1
#define LCD_EP_IN 2
typedef struct {
hid_device *dev;
unsigned short buttonstate;
unsigned short presence;
} lcd_device;
#define lcd_buttons(x) (x->buttonstate)
#define lcd_presencect(x) (x->presence)
lcd_device *lcd_init();
int lcd_clear(lcd_device *lcdfd);
int lcd_puts(lcd_device *lcdfd,char* message);
int lcd_gotoxy(lcd_device *lcdfd,unsigned char x,unsigned char y);
int lcd_backlight(lcd_device *lcdfd,unsigned char on);
void lcd_close(lcd_device *dev);
int lcd_buttonstate(lcd_device *lcdfd);
int lcd_check_button_event(lcd_device *lcdfd);
int lcd_force_button_update(lcd_device *lcdfd);
#endif //LCDOUT_INCLUDE