overhauled picolcd driver (Nicu Pavel)

This commit is contained in:
marschap
2007-05-05 18:05:50 +00:00
parent 35bb35edd6
commit aac814f930
6 changed files with 375 additions and 138 deletions
+23 -9
View File
@@ -4,6 +4,8 @@
*
* (c) 2007 NitroSecurity, Inc.
* Written by Gatewood Green <woody@nitrosecurity.com> or <woody@linif.org>
* (c) 2007 Mini-Box.com.
* <npavel@ituner.com> removed libusblcd dependency
*
* License: GPL (same as usblcd and lcdPROC)
*
@@ -19,6 +21,19 @@
#define PCIOLCD_H
#include "lcd.h"
#include "lcd_lib.h"
#include "adv_bignum.h"
#define picoLCD_VENDOR 0x04d8
#define picoLCD_DEVICE 0x0002
#define picoLCD_MAX_LEDS 6
#define IN_REPORT_KEY_STATE 0x11
#define IN_REPORT_IR_DATA 0x21
#define PICOLCD_MAX_DATA_LEN 24
typedef struct _lcd_packet lcd_packet;
struct _lcd_packet {
@@ -32,17 +47,16 @@ MODULE_EXPORT int picoLCD_width(Driver *drvthis);
MODULE_EXPORT int picoLCD_height(Driver *drvthis);
MODULE_EXPORT void picoLCD_clear(Driver *drvthis);
MODULE_EXPORT void picoLCD_flush(Driver *drvthis);
MODULE_EXPORT void picoLCD_string(Driver *drvthis, int x, int y, char *str);
MODULE_EXPORT void picoLCD_chr(Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void picoLCD_string(Driver *drvthis, int x, int y, unsigned char *str);
MODULE_EXPORT void picoLCD_chr(Driver *drvthis, int x, int y, unsigned char c);
MODULE_EXPORT void picoLCD_set_char (Driver *drvthis, int n, unsigned char *dat);
MODULE_EXPORT char *picoLCD_get_key(Driver *drvthis);
//MODULE_EXPORT void picoLCD_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
//MODULE_EXPORT void picoLCD_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
//MODULE_EXPORT void picoLCD_num(Driver *drvthis, int x, int y, int num);
//MODULE_EXPORT void picoLCD_heartbeat(Driver *drvthis, int state);
//MODULE_EXPORT void picoLCD_icon(Driver *drvthis, int x, int y, int icon);
//MODULE_EXPORT void picoLCD_cursor(Driver *drvthis, int x, int y, int type);
MODULE_EXPORT void picoLCD_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT void picoLCD_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT void picoLCD_num(Driver *drvthis, int x, int num);
MODULE_EXPORT int picoLCD_icon(Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT void picoLCD_cursor(Driver *drvthis, int x, int y, int type);
//MODULE_EXPORT int picoLCD_get_contrast(Driver *drvthis);
MODULE_EXPORT int picoLCD_set_contrast(Driver *drvthis, int promille);