* coding style harmonization in servers/
- explicitely declare void arguments - make a few string args const * better support for shorter displays in server screen * make target to create top level tag file
This commit is contained in:
@@ -1057,7 +1057,7 @@ CFontz633_hardware_clear (Driver *drvthis)
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
CFontz633_string (Driver *drvthis, int x, int y, char string[])
|
||||
CFontz633_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -27,7 +27,7 @@ MODULE_EXPORT int CFontz633_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int CFontz633_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void CFontz633_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void CFontz633_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void CFontz633_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void CFontz633_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void CFontz633_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT const char *CFontz633_get_key (Driver *drvthis);
|
||||
|
||||
|
||||
@@ -1286,7 +1286,7 @@ CFontzPacket_hardware_clear (Driver *drvthis)
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
CFontzPacket_string (Driver *drvthis, int x, int y, char string[])
|
||||
CFontzPacket_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -27,7 +27,7 @@ MODULE_EXPORT int CFontzPacket_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int CFontzPacket_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void CFontzPacket_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void CFontzPacket_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void CFontzPacket_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void CFontzPacket_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void CFontzPacket_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT const char *CFontzPacket_get_key (Driver *drvthis);
|
||||
|
||||
|
||||
@@ -1232,7 +1232,7 @@ CwLnx_clear(Driver *drvthis)
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
CwLnx_string(Driver *drvthis, int x, int y, char *string)
|
||||
CwLnx_string(Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ MODULE_EXPORT int CwLnx_cellwidth(Driver *drvthis);
|
||||
MODULE_EXPORT int CwLnx_cellheight(Driver *drvthis);
|
||||
MODULE_EXPORT void CwLnx_clear(Driver *drvthis);
|
||||
MODULE_EXPORT void CwLnx_flush(Driver *drvthis);
|
||||
MODULE_EXPORT void CwLnx_string(Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void CwLnx_string(Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void CwLnx_chr(Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT const char *CwLnx_get_key(Driver *drvthis);
|
||||
|
||||
|
||||
@@ -433,7 +433,7 @@ EyeboxOne_height (Driver *drvthis)
|
||||
* Display a string at x,y
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
EyeboxOne_string (Driver *drvthis, int x, int y, char *string)
|
||||
EyeboxOne_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
int offset, siz;
|
||||
int bar,level;
|
||||
|
||||
@@ -9,7 +9,7 @@ MODULE_EXPORT int EyeboxOne_width (Driver *drvthis);
|
||||
MODULE_EXPORT int EyeboxOne_height (Driver *drvthis);
|
||||
MODULE_EXPORT void EyeboxOne_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void EyeboxOne_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void EyeboxOne_string (Driver *drvthis, int x, int y, char *string);
|
||||
MODULE_EXPORT void EyeboxOne_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void EyeboxOne_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void EyeboxOne_set_char (Driver *drvthis, int n, char *dat);
|
||||
|
||||
@@ -629,7 +629,7 @@ PrivateData *p = drvthis->private_data;
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
IOWarrior_string(Driver *drvthis, int x, int y, char *string)
|
||||
IOWarrior_string(Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -127,7 +127,7 @@ MODULE_EXPORT int IOWarrior_cellheight(Driver *drvthis);
|
||||
MODULE_EXPORT int IOWarrior_cellwidth(Driver *drvthis);
|
||||
MODULE_EXPORT void IOWarrior_clear(Driver *drvthis);
|
||||
MODULE_EXPORT void IOWarrior_chr(Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void IOWarrior_string(Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void IOWarrior_string(Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void IOWarrior_flush(Driver *drvthis);
|
||||
MODULE_EXPORT void IOWarrior_backlight(Driver *drvthis, int on);
|
||||
MODULE_EXPORT void IOWarrior_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
|
||||
@@ -571,7 +571,7 @@ MD8800_clear (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MD8800_string (Driver *drvthis, int x, int y, char string[])
|
||||
MD8800_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -38,7 +38,7 @@ MODULE_EXPORT int MD8800_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int MD8800_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void MD8800_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void MD8800_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void MD8800_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void MD8800_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void MD8800_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void MD8800_output (Driver *drvthis, int on);
|
||||
MODULE_EXPORT const char * MD8800_get_info(Driver *drvthis);
|
||||
|
||||
@@ -508,7 +508,7 @@ MtxcOrb_cellheight (Driver *drvthis)
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
MtxOrb_string (Driver *drvthis, int x, int y, char string[])
|
||||
MtxOrb_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -1064,7 +1064,7 @@ MtxOrb_get_info (Driver *drvthis)
|
||||
* \param options Options (currently unused).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
MtxOrb_vbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
MtxOrb_vbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -1103,7 +1103,7 @@ MtxOrb_vbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
* \param options Options (currently unused).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
MtxOrb_hbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
MtxOrb_hbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ MODULE_EXPORT int MtxOrb_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int MtxOrb_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void MtxOrb_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void MtxOrb_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void MtxOrb_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void MtxOrb_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void MtxOrb_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT const char * MtxOrb_get_key (Driver *drvthis);
|
||||
|
||||
MODULE_EXPORT void MtxOrb_vbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void MtxOrb_hbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void MtxOrb_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void MtxOrb_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT int MtxOrb_icon (Driver *drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void MtxOrb_num (Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT void MtxOrb_cursor (Driver *drvthis, int x, int y, int state);
|
||||
|
||||
@@ -688,7 +688,7 @@ NoritakeVFD_clear (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
NoritakeVFD_string (Driver *drvthis, int x, int y, char string[])
|
||||
NoritakeVFD_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -38,7 +38,7 @@ MODULE_EXPORT int NoritakeVFD_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int NoritakeVFD_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void NoritakeVFD_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void NoritakeVFD_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void NoritakeVFD_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void NoritakeVFD_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void NoritakeVFD_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void NoritakeVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
|
||||
+19
-19
@@ -178,7 +178,7 @@ bayrad_init(Driver *drvthis)
|
||||
// your driver.
|
||||
|
||||
MODULE_EXPORT void
|
||||
bayrad_close(Driver * drvthis)
|
||||
bayrad_close(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -202,7 +202,7 @@ bayrad_close(Driver * drvthis)
|
||||
// Returns the display width
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
bayrad_width(Driver * drvthis)
|
||||
bayrad_width(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -214,7 +214,7 @@ bayrad_width(Driver * drvthis)
|
||||
// Returns the display height
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
bayrad_height(Driver * drvthis)
|
||||
bayrad_height(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -226,7 +226,7 @@ bayrad_height(Driver * drvthis)
|
||||
// Returns the display's cell width
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
bayrad_cellwidth(Driver * drvthis)
|
||||
bayrad_cellwidth(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -238,7 +238,7 @@ bayrad_cellwidth(Driver * drvthis)
|
||||
// Returns the display's cell height
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
bayrad_cellheight(Driver * drvthis)
|
||||
bayrad_cellheight(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -250,7 +250,7 @@ bayrad_cellheight(Driver * drvthis)
|
||||
// Clears the LCD screen
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_clear(Driver * drvthis)
|
||||
bayrad_clear(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -263,7 +263,7 @@ bayrad_clear(Driver * drvthis)
|
||||
// Flushes all output to the lcd...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_flush(Driver * drvthis)
|
||||
bayrad_flush(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -279,7 +279,7 @@ bayrad_flush(Driver * drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_string(Driver * drvthis, int x, int y, char string[])
|
||||
bayrad_string(Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -315,7 +315,7 @@ bayrad_string(Driver * drvthis, int x, int y, char string[])
|
||||
// upper-left is (1,1), and the lower right should be (20,2).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_chr(Driver * drvthis, int x, int y, char c)
|
||||
bayrad_chr(Driver *drvthis, int x, int y, char c)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
unsigned char ch = (unsigned char) c;
|
||||
@@ -339,7 +339,7 @@ bayrad_chr(Driver * drvthis, int x, int y, char c)
|
||||
// Turns the lcd backlight on or off...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_backlight(Driver * drvthis, int on)
|
||||
bayrad_backlight(Driver *drvthis, int on)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -364,7 +364,7 @@ bayrad_backlight(Driver * drvthis, int on)
|
||||
// Tells the driver to get ready for vertical bargraphs.
|
||||
//
|
||||
static void
|
||||
bayrad_init_vbar(Driver * drvthis)
|
||||
bayrad_init_vbar(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
static char bar_up[7][5*8] = {
|
||||
@@ -462,7 +462,7 @@ bayrad_init_vbar(Driver * drvthis)
|
||||
// Tells the driver to get ready for horizontal bargraphs.
|
||||
//
|
||||
static void
|
||||
bayrad_init_hbar(Driver * drvthis)
|
||||
bayrad_init_hbar(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
static char bar_right[5][5*8] = {
|
||||
@@ -540,7 +540,7 @@ bayrad_init_hbar(Driver * drvthis)
|
||||
// Tells the driver to get ready for big numbers, if possible.
|
||||
//
|
||||
static void
|
||||
bayrad_init_num(Driver * drvthis)
|
||||
bayrad_init_num(Driver *drvthis)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -551,7 +551,7 @@ bayrad_init_num(Driver * drvthis)
|
||||
// Draws a big (4-row) number.
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_num(Driver * drvthis, int x, int num)
|
||||
bayrad_num(Driver *drvthis, int x, int num)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -562,7 +562,7 @@ bayrad_num(Driver * drvthis, int x, int num)
|
||||
// Changes the font data of character n.
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_set_char(Driver * drvthis, int n, char *dat)
|
||||
bayrad_set_char(Driver *drvthis, int n, char *dat)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char out[4];
|
||||
@@ -598,7 +598,7 @@ bayrad_set_char(Driver * drvthis, int n, char *dat)
|
||||
// Draws a vertical bar, from the bottom of the screen up.
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_vbar(Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
bayrad_vbar(Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -620,7 +620,7 @@ bayrad_vbar(Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
// Draws a horizontal bar to the right.
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
bayrad_hbar(Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
bayrad_hbar(Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -643,7 +643,7 @@ bayrad_hbar(Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
// Places an icon on screen
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
bayrad_icon(Driver * drvthis, int x, int y, int icon)
|
||||
bayrad_icon(Driver *drvthis, int x, int y, int icon)
|
||||
{
|
||||
/*PrivateData *p = drvthis->private_data;
|
||||
static char icons[3][5*8] = {
|
||||
@@ -694,7 +694,7 @@ bayrad_icon(Driver * drvthis, int x, int y, int icon)
|
||||
// Return 0 for "nothing available".
|
||||
//
|
||||
MODULE_EXPORT const char *
|
||||
bayrad_get_key(Driver * drvthis)
|
||||
bayrad_get_key(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
fd_set brfdset;
|
||||
|
||||
+16
-16
@@ -10,25 +10,25 @@
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
MODULE_EXPORT int bayrad_init(Driver * drvthis);
|
||||
MODULE_EXPORT void bayrad_close(Driver * drvthis);
|
||||
MODULE_EXPORT int bayrad_width(Driver * drvthis);
|
||||
MODULE_EXPORT int bayrad_height(Driver * drvthis);
|
||||
MODULE_EXPORT int bayrad_cellwidth(Driver * drvthis);
|
||||
MODULE_EXPORT int bayrad_cellheight(Driver * drvthis);
|
||||
MODULE_EXPORT void bayrad_clear(Driver * drvthis);
|
||||
MODULE_EXPORT void bayrad_flush(Driver * drvthis);
|
||||
MODULE_EXPORT void bayrad_string(Driver * drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void bayrad_chr(Driver * drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT int bayrad_init(Driver *drvthis);
|
||||
MODULE_EXPORT void bayrad_close(Driver *drvthis);
|
||||
MODULE_EXPORT int bayrad_width(Driver *drvthis);
|
||||
MODULE_EXPORT int bayrad_height(Driver *drvthis);
|
||||
MODULE_EXPORT int bayrad_cellwidth(Driver *drvthis);
|
||||
MODULE_EXPORT int bayrad_cellheight(Driver *drvthis);
|
||||
MODULE_EXPORT void bayrad_clear(Driver *drvthis);
|
||||
MODULE_EXPORT void bayrad_flush(Driver *drvthis);
|
||||
MODULE_EXPORT void bayrad_string(Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void bayrad_chr(Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void bayrad_vbar(Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void bayrad_hbar(Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT int bayrad_icon(Driver * drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void bayrad_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void bayrad_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT int bayrad_icon(Driver *drvthis, int x, int y, int icon);
|
||||
|
||||
MODULE_EXPORT void bayrad_set_char(Driver * drvthis, int n, char *dat);
|
||||
MODULE_EXPORT void bayrad_set_char(Driver *drvthis, int n, char *dat);
|
||||
|
||||
MODULE_EXPORT void bayrad_backlight(Driver * drvthis, int promille);
|
||||
MODULE_EXPORT void bayrad_backlight(Driver *drvthis, int promille);
|
||||
|
||||
MODULE_EXPORT const char *bayrad_get_key(Driver * drvthis);
|
||||
MODULE_EXPORT const char *bayrad_get_key(Driver *drvthis);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -430,7 +430,7 @@ curses_backlight (Driver *drvthis, int on)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
curses_string (Driver *drvthis, int x, int y, char *string)
|
||||
curses_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
MODULE_EXPORT int curses_init (Driver * drvthis);
|
||||
MODULE_EXPORT int curses_init (Driver *drvthis);
|
||||
MODULE_EXPORT void curses_close (Driver *drvthis);
|
||||
MODULE_EXPORT int curses_width (Driver *drvthis);
|
||||
MODULE_EXPORT int curses_height (Driver *drvthis);
|
||||
MODULE_EXPORT void curses_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void curses_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void curses_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void curses_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void curses_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void curses_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
|
||||
@@ -137,7 +137,7 @@ debug_flush (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
debug_string (Driver *drvthis, int x, int y, char string[])
|
||||
debug_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ MODULE_EXPORT int debug_width (Driver *drvthis);
|
||||
MODULE_EXPORT int debug_height (Driver *drvthis);
|
||||
MODULE_EXPORT void debug_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void debug_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void debug_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void debug_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void debug_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void debug_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
|
||||
@@ -59,7 +59,7 @@ MODULE_EXPORT char *symbol_prefix = "EA65_";
|
||||
// Opens com port and sets baud correctly...
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
EA65_init (Driver * drvthis)
|
||||
EA65_init (Driver *drvthis)
|
||||
{
|
||||
debug(RPT_INFO, "EA65: init(%p)", drvthis);
|
||||
|
||||
@@ -230,7 +230,7 @@ EA65_flush (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (9,1).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
EA65_chr (Driver * drvthis, int x, int y, char c)
|
||||
EA65_chr (Driver *drvthis, int x, int y, char c)
|
||||
{
|
||||
PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
|
||||
@@ -252,7 +252,7 @@ EA65_chr (Driver * drvthis, int x, int y, char c)
|
||||
// Sets the backlight on or off
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
EA65_backlight (Driver * drvthis, int on)
|
||||
EA65_backlight (Driver *drvthis, int on)
|
||||
{
|
||||
PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
|
||||
@@ -269,7 +269,7 @@ EA65_backlight (Driver * drvthis, int on)
|
||||
// Clears the LCD screen
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
EA65_clear (Driver * drvthis)
|
||||
EA65_clear (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
|
||||
@@ -282,7 +282,7 @@ EA65_clear (Driver * drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (9,1).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
EA65_string (Driver * drvthis, int x, int y, char string[])
|
||||
EA65_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
|
||||
@@ -304,7 +304,7 @@ EA65_string (Driver * drvthis, int x, int y, char string[])
|
||||
//// Turns the recording LED on or off as desired.
|
||||
////
|
||||
MODULE_EXPORT void
|
||||
EA65_output (Driver * drvthis, int on)
|
||||
EA65_output (Driver *drvthis, int on)
|
||||
{
|
||||
PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
|
||||
|
||||
+10
-10
@@ -6,16 +6,16 @@
|
||||
#define DEFAULT_BRIGHTNESS 500
|
||||
#define DEFAULT_OFFBRIGHTNESS 0
|
||||
|
||||
MODULE_EXPORT int EA65_init (Driver * drvthis);
|
||||
MODULE_EXPORT void EA65_close (Driver * drvthis);
|
||||
MODULE_EXPORT int EA65_width (Driver * drvthis);
|
||||
MODULE_EXPORT int EA65_height (Driver * drvthis);
|
||||
MODULE_EXPORT void EA65_clear (Driver * drvthis);
|
||||
MODULE_EXPORT void EA65_flush (Driver * drvthis);
|
||||
MODULE_EXPORT void EA65_string (Driver * drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void EA65_chr (Driver * drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT int EA65_init (Driver *drvthis);
|
||||
MODULE_EXPORT void EA65_close (Driver *drvthis);
|
||||
MODULE_EXPORT int EA65_width (Driver *drvthis);
|
||||
MODULE_EXPORT int EA65_height (Driver *drvthis);
|
||||
MODULE_EXPORT void EA65_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void EA65_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void EA65_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void EA65_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void EA65_brightness (Driver * drvthis, int promille);
|
||||
MODULE_EXPORT void EA65_output (Driver * drvthis, int on);
|
||||
MODULE_EXPORT void EA65_brightness (Driver *drvthis, int promille);
|
||||
MODULE_EXPORT void EA65_output (Driver *drvthis, int on);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -200,7 +200,7 @@ MODULE_EXPORT void g15_chr (Driver *drvthis, int x, int y, char c)
|
||||
// Prints a string on the lcd display, at position (x,y). The
|
||||
// upper-left is (1,1), and the lower right should be (20,5).
|
||||
//
|
||||
MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, char string[])
|
||||
MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -452,7 +452,7 @@ MODULE_EXPORT void g15_backlight(Driver *drvthis, int on)
|
||||
}
|
||||
}
|
||||
|
||||
MODULE_EXPORT void g15_num(Driver * drvthis, int x, int num)
|
||||
MODULE_EXPORT void g15_num(Driver *drvthis, int x, int num)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
|
||||
@@ -80,13 +80,13 @@ MODULE_EXPORT int g15_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int g15_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void g15_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void g15_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void g15_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT int g15_icon (Driver *drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void g15_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void g15_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT const char * g15_get_key (Driver *drvthis);
|
||||
MODULE_EXPORT void g15_backlight(Driver *drvthis, int on);
|
||||
MODULE_EXPORT void g15_num(Driver * drvthis, int x, int num);
|
||||
MODULE_EXPORT void g15_num(Driver *drvthis, int x, int num);
|
||||
|
||||
#endif /*G15_H_*/
|
||||
|
||||
@@ -262,7 +262,7 @@ glcdlib_flush (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,6).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
glcdlib_string (Driver *drvthis, int x, int y, char string[])
|
||||
glcdlib_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
debug(RPT_DEBUG, "String out");
|
||||
y--;
|
||||
|
||||
@@ -35,7 +35,7 @@ MODULE_EXPORT int glcdlib_width (Driver *drvthis);
|
||||
MODULE_EXPORT int glcdlib_height (Driver *drvthis);
|
||||
MODULE_EXPORT void glcdlib_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void glcdlib_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void glcdlib_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void glcdlib_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void glcdlib_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT int glcdlib_icon (Driver *drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT int glcdlib_cellwidth (Driver *drvthis);
|
||||
|
||||
@@ -393,10 +393,10 @@ glk_flush(Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
glk_string(Driver *drvthis, int x, int y, char string[])
|
||||
glk_string(Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char *s;
|
||||
const char *s;
|
||||
|
||||
debug(RPT_DEBUG, "glk_string(%d, %d, \"%s\")", x, y, string);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ MODULE_EXPORT int glk_cellwidth(Driver *drvthis);
|
||||
MODULE_EXPORT int glk_cellheight(Driver *drvthis);
|
||||
MODULE_EXPORT void glk_clear(Driver *drvthis);
|
||||
MODULE_EXPORT void glk_flush(Driver *drvthis);
|
||||
MODULE_EXPORT void glk_string(Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void glk_string(Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void glk_chr(Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void glk_old_vbar(Driver *drvthis, int x, int len);
|
||||
|
||||
@@ -127,7 +127,7 @@ MODULE_EXPORT char *symbol_prefix = "HD44780_";
|
||||
// Opens com port and sets baud correctly...
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
HD44780_init (Driver * drvthis)
|
||||
HD44780_init (Driver *drvthis)
|
||||
{
|
||||
// TODO: remove the two magic numbers below
|
||||
// TODO: single point of return
|
||||
@@ -606,7 +606,7 @@ HD44780_chr (Driver *drvthis, int x, int y, char ch)
|
||||
// Place a string in the framebuffer
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
HD44780_string (Driver *drvthis, int x, int y, char *string)
|
||||
HD44780_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -26,7 +26,7 @@ MODULE_EXPORT int HD44780_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int HD44780_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void HD44780_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void HD44780_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void HD44780_string (Driver *drvthis, int x, int y, char *s);
|
||||
MODULE_EXPORT void HD44780_string (Driver *drvthis, int x, int y, const char s[]);
|
||||
MODULE_EXPORT void HD44780_chr (Driver *drvthis, int x, int y, char ch);
|
||||
|
||||
MODULE_EXPORT void HD44780_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
|
||||
@@ -245,7 +245,7 @@ MODULE_EXPORT void imon_flush (Driver *drvthis)
|
||||
* \param y Vertical character position (row).
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, char string[])
|
||||
MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ MODULE_EXPORT int imon_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int imon_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void imon_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void imon_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void imon_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void imon_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT int imon_icon (Driver *drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT const char *imon_get_info (Driver *drvthis);
|
||||
|
||||
+17
-17
@@ -58,8 +58,8 @@ typedef struct driver_private_data {
|
||||
} PrivateData;
|
||||
|
||||
|
||||
static void LB216_hidecursor(Driver * drvthis);
|
||||
static void LB216_reboot(Driver * drvthis);
|
||||
static void LB216_hidecursor(Driver *drvthis);
|
||||
static void LB216_reboot(Driver *drvthis);
|
||||
|
||||
// Vars for the server core
|
||||
MODULE_EXPORT char *api_version = API_VERSION;
|
||||
@@ -74,7 +74,7 @@ MODULE_EXPORT char *symbol_prefix = "LB216_";
|
||||
// Opens com port and sets baud correctly...
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
LB216_init(Driver * drvthis)
|
||||
LB216_init(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p;
|
||||
struct termios portset;
|
||||
@@ -190,7 +190,7 @@ LB216_init(Driver * drvthis)
|
||||
// Clean-up
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_close(Driver * drvthis)
|
||||
LB216_close(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -256,7 +256,7 @@ LB216_cellheight (Driver *drvthis)
|
||||
// Clears the LCD screen
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_clear (Driver * drvthis)
|
||||
LB216_clear (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -268,7 +268,7 @@ LB216_clear (Driver * drvthis)
|
||||
// Flushes the framebuffer to the LCD
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_flush(Driver * drvthis)
|
||||
LB216_flush(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char out[LCD_MAX_WIDTH * LCD_MAX_HEIGHT];
|
||||
@@ -295,7 +295,7 @@ LB216_flush(Driver * drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (16,2).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_chr(Driver * drvthis, int x, int y, char c)
|
||||
LB216_chr(Driver *drvthis, int x, int y, char c)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -315,7 +315,7 @@ LB216_chr(Driver * drvthis, int x, int y, char c)
|
||||
// an intermediate brightness...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_backlight(Driver * drvthis, int on)
|
||||
LB216_backlight(Driver *drvthis, int on)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -329,7 +329,7 @@ LB216_backlight(Driver * drvthis, int on)
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Get rid of the blinking curson
|
||||
//
|
||||
static void LB216_hidecursor(Driver * drvthis)
|
||||
static void LB216_hidecursor(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char out[4];
|
||||
@@ -341,7 +341,7 @@ static void LB216_hidecursor(Driver * drvthis)
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Reset the display bios
|
||||
//
|
||||
static void LB216_reboot(Driver * drvthis)
|
||||
static void LB216_reboot(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char out[4];
|
||||
@@ -352,7 +352,7 @@ static void LB216_reboot(Driver * drvthis)
|
||||
|
||||
|
||||
MODULE_EXPORT void
|
||||
LB216_string (Driver * drvthis, int x, int y, char string[])
|
||||
LB216_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -378,7 +378,7 @@ LB216_string (Driver * drvthis, int x, int y, char string[])
|
||||
// Sets up for vertical bars. Call before LB216->vbar()
|
||||
//
|
||||
static void
|
||||
LB216_init_vbar(Driver * drvthis)
|
||||
LB216_init_vbar(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char a[] = {
|
||||
@@ -468,7 +468,7 @@ LB216_init_vbar(Driver * drvthis)
|
||||
// Inits horizontal bars...
|
||||
//
|
||||
static void
|
||||
LB216_init_hbar(Driver * drvthis)
|
||||
LB216_init_hbar(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char a[] = {
|
||||
@@ -536,7 +536,7 @@ LB216_init_hbar(Driver * drvthis)
|
||||
// Draws a vertical bar...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_vbar(Driver * drvthis, int x, int len)
|
||||
LB216_vbar(Driver *drvthis, int x, int len)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char map[9] = { 32, 1, 2, 3, 4, 5, 6, 7, 255 };
|
||||
@@ -556,7 +556,7 @@ LB216_vbar(Driver * drvthis, int x, int len)
|
||||
// Draws a horizontal bar to the right.
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_hbar(Driver * drvthis, int x, int y, int len)
|
||||
LB216_hbar(Driver *drvthis, int x, int y, int len)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char map[7] = { 32, 1, 2, 3, 4, 5 };
|
||||
@@ -580,7 +580,7 @@ LB216_hbar(Driver * drvthis, int x, int y, int len)
|
||||
// The input is just an array of characters...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
LB216_set_char(Driver * drvthis, int n, char *dat)
|
||||
LB216_set_char(Driver *drvthis, int n, char *dat)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char out[4];
|
||||
@@ -608,7 +608,7 @@ LB216_set_char(Driver * drvthis, int n, char *dat)
|
||||
|
||||
|
||||
MODULE_EXPORT int
|
||||
LB216_icon(Driver * drvthis, int x, int y, int icon)
|
||||
LB216_icon(Driver *drvthis, int x, int y, int icon)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
static char heart_open[] = {
|
||||
|
||||
+12
-12
@@ -3,24 +3,24 @@
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
MODULE_EXPORT int LB216_init(Driver * drvthis);
|
||||
MODULE_EXPORT void LB216_close(Driver * drvthis);
|
||||
MODULE_EXPORT int LB216_init(Driver *drvthis);
|
||||
MODULE_EXPORT void LB216_close(Driver *drvthis);
|
||||
MODULE_EXPORT int LB216_width (Driver *drvthis);
|
||||
MODULE_EXPORT int LB216_height (Driver *drvthis);
|
||||
MODULE_EXPORT int LB216_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int LB216_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void LB216_clear (Driver * drvthis);
|
||||
MODULE_EXPORT void LB216_flush(Driver * drvthis);
|
||||
MODULE_EXPORT void LB216_string (Driver * drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void LB216_chr(Driver * drvthis, int x, int y, char c) ;
|
||||
MODULE_EXPORT void LB216_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void LB216_flush(Driver *drvthis);
|
||||
MODULE_EXPORT void LB216_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void LB216_chr(Driver *drvthis, int x, int y, char c) ;
|
||||
|
||||
MODULE_EXPORT void LB216_old_vbar(Driver * drvthis, int x, int len);
|
||||
MODULE_EXPORT void LB216_old_hbar(Driver * drvthis, int x, int y, int len);
|
||||
MODULE_EXPORT void LB216_num(Driver * drvthis, int x, int num);
|
||||
MODULE_EXPORT int LB216_icon(Driver * drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void LB216_old_vbar(Driver *drvthis, int x, int len);
|
||||
MODULE_EXPORT void LB216_old_hbar(Driver *drvthis, int x, int y, int len);
|
||||
MODULE_EXPORT void LB216_num(Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT int LB216_icon(Driver *drvthis, int x, int y, int icon);
|
||||
|
||||
MODULE_EXPORT void LB216_set_char(Driver * drvthis, int n, char *dat);
|
||||
MODULE_EXPORT void LB216_set_char(Driver *drvthis, int n, char *dat);
|
||||
|
||||
MODULE_EXPORT void LB216_backlight(Driver * drvthis, int on);
|
||||
MODULE_EXPORT void LB216_backlight(Driver *drvthis, int on);
|
||||
|
||||
#endif
|
||||
|
||||
+26
-26
@@ -127,44 +127,44 @@ typedef struct lcd_logical_driver {
|
||||
/* The driver loader will look for symbols with these names ! */
|
||||
|
||||
/* mandatory functions (necessary for all drivers) */
|
||||
int (*init) (struct lcd_logical_driver* drvthis);
|
||||
void (*close) (struct lcd_logical_driver* drvthis);
|
||||
int (*init) (struct lcd_logical_driver *drvthis);
|
||||
void (*close) (struct lcd_logical_driver *drvthis);
|
||||
|
||||
/* essential output functions (necessary for output drivers) */
|
||||
int (*width) (struct lcd_logical_driver* drvthis);
|
||||
int (*height) (struct lcd_logical_driver* drvthis);
|
||||
void (*clear) (struct lcd_logical_driver* drvthis);
|
||||
void (*flush) (struct lcd_logical_driver* drvthis);
|
||||
void (*string) (struct lcd_logical_driver* drvthis, int x, int y, char *str);
|
||||
void (*chr) (struct lcd_logical_driver* drvthis, int x, int y, char c);
|
||||
int (*width) (struct lcd_logical_driver *drvthis);
|
||||
int (*height) (struct lcd_logical_driver *drvthis);
|
||||
void (*clear) (struct lcd_logical_driver *drvthis);
|
||||
void (*flush) (struct lcd_logical_driver *drvthis);
|
||||
void (*string) (struct lcd_logical_driver *drvthis, int x, int y, const char *str);
|
||||
void (*chr) (struct lcd_logical_driver *drvthis, int x, int y, char c);
|
||||
|
||||
/* essential input functions (necessary for all input drivers) */
|
||||
const char *(*get_key) (struct lcd_logical_driver* drvthis);
|
||||
const char *(*get_key) (struct lcd_logical_driver *drvthis);
|
||||
|
||||
/* extended output functions (optional; core provides alternatives) */
|
||||
void (*vbar) (struct lcd_logical_driver* drvthis, int x, int y, int len, int promille, int pattern);
|
||||
void (*hbar) (struct lcd_logical_driver* drvthis, int x, int y, int len, int promille, int pattern);
|
||||
void (*num) (struct lcd_logical_driver* drvthis, int x, int num);
|
||||
void (*heartbeat) (struct lcd_logical_driver* drvthis, int state);
|
||||
int (*icon) (struct lcd_logical_driver* drvthis, int x, int y, int icon);
|
||||
void (*cursor) (struct lcd_logical_driver* drvthis, int x, int y, int type);
|
||||
void (*vbar) (struct lcd_logical_driver *drvthis, int x, int y, int len, int promille, int pattern);
|
||||
void (*hbar) (struct lcd_logical_driver *drvthis, int x, int y, int len, int promille, int pattern);
|
||||
void (*num) (struct lcd_logical_driver *drvthis, int x, int num);
|
||||
void (*heartbeat) (struct lcd_logical_driver *drvthis, int state);
|
||||
int (*icon) (struct lcd_logical_driver *drvthis, int x, int y, int icon);
|
||||
void (*cursor) (struct lcd_logical_driver *drvthis, int x, int y, int type);
|
||||
|
||||
/* user-defined character functions, are those still supported ? */
|
||||
void (*set_char) (struct lcd_logical_driver* drvthis, int n, unsigned char *dat);
|
||||
int (*get_free_chars) (struct lcd_logical_driver* drvthis);
|
||||
int (*cellwidth) (struct lcd_logical_driver* drvthis);
|
||||
int (*cellheight) (struct lcd_logical_driver* drvthis);
|
||||
void (*set_char) (struct lcd_logical_driver *drvthis, int n, unsigned char *dat);
|
||||
int (*get_free_chars) (struct lcd_logical_driver *drvthis);
|
||||
int (*cellwidth) (struct lcd_logical_driver *drvthis);
|
||||
int (*cellheight) (struct lcd_logical_driver *drvthis);
|
||||
|
||||
/* Hardware functions */
|
||||
int (*get_contrast) (struct lcd_logical_driver* drvthis);
|
||||
void (*set_contrast) (struct lcd_logical_driver* drvthis, int promille);
|
||||
int (*get_brightness) (struct lcd_logical_driver* drvthis, int state);
|
||||
void (*set_brightness) (struct lcd_logical_driver* drvthis, int state, int promille);
|
||||
void (*backlight) (struct lcd_logical_driver* drvthis, int on);
|
||||
void (*output) (struct lcd_logical_driver* drvthis, int state);
|
||||
int (*get_contrast) (struct lcd_logical_driver *drvthis);
|
||||
void (*set_contrast) (struct lcd_logical_driver *drvthis, int promille);
|
||||
int (*get_brightness) (struct lcd_logical_driver *drvthis, int state);
|
||||
void (*set_brightness) (struct lcd_logical_driver *drvthis, int state, int promille);
|
||||
void (*backlight) (struct lcd_logical_driver *drvthis, int on);
|
||||
void (*output) (struct lcd_logical_driver *drvthis, int state);
|
||||
|
||||
/* informational functions */
|
||||
const char * (*get_info) (struct lcd_logical_driver* drvthis);
|
||||
const char * (*get_info) (struct lcd_logical_driver *drvthis);
|
||||
|
||||
|
||||
/******** Variables in server core available for drivers ********/
|
||||
|
||||
@@ -339,7 +339,7 @@ lcdm001_chr (Driver *drvthis, int x, int y, char c)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
lcdm001_string (Driver *drvthis, int x, int y, char *string)
|
||||
lcdm001_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -39,7 +39,7 @@ MODULE_EXPORT int lcdm001_width (Driver *drvthis);
|
||||
MODULE_EXPORT int lcdm001_height (Driver *drvthis);
|
||||
MODULE_EXPORT void lcdm001_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void lcdm001_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void lcdm001_string (Driver *drvthis, int x, int y, char *string);
|
||||
MODULE_EXPORT void lcdm001_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void lcdm001_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void lcdm001_old_vbar (Driver *drvthis, int x, int len);
|
||||
|
||||
@@ -384,7 +384,7 @@ ms6931_clear (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (16,2).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
ms6931_string (Driver *drvthis, int x, int y, char string[])
|
||||
ms6931_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -45,7 +45,7 @@ MODULE_EXPORT void ms6931_backlight (Driver *drvthis, int on);
|
||||
|
||||
MODULE_EXPORT void ms6931_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void ms6931_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void ms6931_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void ms6931_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT const char *ms6931_get_key (Driver *drvthis);
|
||||
MODULE_EXPORT void ms6931_hbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
|
||||
MODULE_EXPORT void ms6931_heartbeat (Driver *drvthis, int state);
|
||||
|
||||
@@ -118,7 +118,7 @@ MODULE_EXPORT char *symbol_prefix = "MTC_S16209X_";
|
||||
// Opens com port and sets baud correctly...
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
MTC_S16209X_init (Driver * drvthis)
|
||||
MTC_S16209X_init (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p;
|
||||
struct termios portset;
|
||||
@@ -228,7 +228,7 @@ MTC_S16209X_init (Driver * drvthis)
|
||||
// Clean-up
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_close (Driver * drvthis)
|
||||
MTC_S16209X_close (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -258,7 +258,7 @@ MTC_S16209X_close (Driver * drvthis)
|
||||
// Returns the display width
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
MTC_S16209X_width (Driver * drvthis)
|
||||
MTC_S16209X_width (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -269,7 +269,7 @@ MTC_S16209X_width (Driver * drvthis)
|
||||
// Returns the display height
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
MTC_S16209X_height (Driver * drvthis)
|
||||
MTC_S16209X_height (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -280,7 +280,7 @@ MTC_S16209X_height (Driver * drvthis)
|
||||
// Returns the display's cell width
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
MTC_S16209X_cellwidth (Driver * drvthis)
|
||||
MTC_S16209X_cellwidth (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -291,7 +291,7 @@ MTC_S16209X_cellwidth (Driver * drvthis)
|
||||
// Returns the display's cell height
|
||||
//
|
||||
MODULE_EXPORT int
|
||||
MTC_S16209X_cellheight (Driver * drvthis)
|
||||
MTC_S16209X_cellheight (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -302,7 +302,7 @@ MTC_S16209X_cellheight (Driver * drvthis)
|
||||
// Clears the LCD screen
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_clear (Driver * drvthis)
|
||||
MTC_S16209X_clear (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -314,7 +314,7 @@ MTC_S16209X_clear (Driver * drvthis)
|
||||
// Flushes the framebuffer to the LCD
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_flush (Driver * drvthis)
|
||||
MTC_S16209X_flush (Driver *drvthis)
|
||||
{
|
||||
/* TODO: Do we really have a flush for this thing? Do we need to? How do we do it? */
|
||||
/* TODO Update: yes, we need to buffer and flush - else the LCD looks slow, and flicker a lot */
|
||||
@@ -353,7 +353,7 @@ MTC_S16209X_flush (Driver * drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (16,2).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_chr (Driver * drvthis, int x, int y, char c)
|
||||
MTC_S16209X_chr (Driver *drvthis, int x, int y, char c)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -371,7 +371,7 @@ MTC_S16209X_chr (Driver * drvthis, int x, int y, char c)
|
||||
// an intermediate brightness...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_backlight (Driver * drvthis, int on)
|
||||
MTC_S16209X_backlight (Driver *drvthis, int on)
|
||||
{
|
||||
/* TODO: Can the backlights be controlled? Can't find anything in the docs */
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
@@ -384,7 +384,7 @@ MTC_S16209X_backlight (Driver * drvthis, int on)
|
||||
// Get rid of the blinking cursor
|
||||
//
|
||||
static void
|
||||
MTC_S16209X_hidecursor (Driver * drvthis)
|
||||
MTC_S16209X_hidecursor (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int result;
|
||||
@@ -406,7 +406,7 @@ MTC_S16209X_hidecursor (Driver * drvthis)
|
||||
// Reset the display bios
|
||||
//
|
||||
static void
|
||||
MTC_S16209X_reboot (Driver * drvthis)
|
||||
MTC_S16209X_reboot (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int result;
|
||||
@@ -418,7 +418,7 @@ MTC_S16209X_reboot (Driver * drvthis)
|
||||
#endif // CAN_REBOOT_LCD
|
||||
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_string (Driver * drvthis, int x, int y, char string[])
|
||||
MTC_S16209X_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -439,7 +439,7 @@ MTC_S16209X_string (Driver * drvthis, int x, int y, char string[])
|
||||
// Sets up for vertical bars. Call before MTC_S16209X->vbar()
|
||||
//
|
||||
static void
|
||||
MTC_S16209X_init_vbar (Driver * drvthis)
|
||||
MTC_S16209X_init_vbar (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
static char a[] = {
|
||||
@@ -529,7 +529,7 @@ MTC_S16209X_init_vbar (Driver * drvthis)
|
||||
// Inits horizontal bars...
|
||||
//
|
||||
static void
|
||||
MTC_S16209X_init_hbar (Driver * drvthis)
|
||||
MTC_S16209X_init_hbar (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
static char a[] = {
|
||||
@@ -597,7 +597,7 @@ MTC_S16209X_init_hbar (Driver * drvthis)
|
||||
// Draws a vertical bar...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_vbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
MTC_S16209X_vbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -610,7 +610,7 @@ MTC_S16209X_vbar (Driver * drvthis, int x, int y, int len, int promille, int opt
|
||||
// Draws a horizontal bar to the right.
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_hbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
MTC_S16209X_hbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -628,7 +628,7 @@ MTC_S16209X_hbar (Driver * drvthis, int x, int y, int len, int promille, int opt
|
||||
// The input is just an array of characters...
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
MTC_S16209X_set_char (Driver * drvthis, int n, char *dat)
|
||||
MTC_S16209X_set_char (Driver *drvthis, int n, char *dat)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char out[4];
|
||||
@@ -664,7 +664,7 @@ MTC_S16209X_set_char (Driver * drvthis, int n, char *dat)
|
||||
}
|
||||
|
||||
MODULE_EXPORT int
|
||||
MTC_S16209X_icon (Driver * drvthis, int x, int y, int icon)
|
||||
MTC_S16209X_icon (Driver *drvthis, int x, int y, int icon)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
static char heart_open[] = {
|
||||
|
||||
@@ -40,23 +40,23 @@
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
MODULE_EXPORT int MTC_S16209X_init(Driver * drvthis);
|
||||
MODULE_EXPORT void MTC_S16209X_close(Driver * drvthis);
|
||||
MODULE_EXPORT int MTC_S16209X_init(Driver *drvthis);
|
||||
MODULE_EXPORT void MTC_S16209X_close(Driver *drvthis);
|
||||
MODULE_EXPORT int MTC_S16209X_width (Driver *drvthis);
|
||||
MODULE_EXPORT int MTC_S16209X_height (Driver *drvthis);
|
||||
MODULE_EXPORT int MTC_S16209X_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int MTC_S16209X_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void MTC_S16209X_clear (Driver * drvthis);
|
||||
MODULE_EXPORT void MTC_S16209X_flush(Driver * drvthis);
|
||||
MODULE_EXPORT void MTC_S16209X_string (Driver * drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void MTC_S16209X_chr(Driver * drvthis, int x, int y, char c) ;
|
||||
MODULE_EXPORT void MTC_S16209X_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void MTC_S16209X_flush(Driver *drvthis);
|
||||
MODULE_EXPORT void MTC_S16209X_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void MTC_S16209X_chr(Driver *drvthis, int x, int y, char c) ;
|
||||
|
||||
MODULE_EXPORT void MTC_S16209X_vbar(Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void MTC_S16209X_hbar(Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT int MTC_S16209X_icon(Driver * drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void MTC_S16209X_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void MTC_S16209X_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT int MTC_S16209X_icon(Driver *drvthis, int x, int y, int icon);
|
||||
|
||||
MODULE_EXPORT void MTC_S16209X_set_char(Driver * drvthis, int n, char *dat);
|
||||
MODULE_EXPORT void MTC_S16209X_set_char(Driver *drvthis, int n, char *dat);
|
||||
|
||||
MODULE_EXPORT void MTC_S16209X_backlight(Driver * drvthis, int on);
|
||||
MODULE_EXPORT void MTC_S16209X_backlight(Driver *drvthis, int on);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -301,7 +301,7 @@ sed1520_flush (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
sed1520_string (Driver *drvthis, int x, int y, char string[])
|
||||
sed1520_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -11,7 +11,7 @@ MODULE_EXPORT int sed1520_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int sed1520_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void sed1520_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void sed1520_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void sed1520_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void sed1520_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void sed1520_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void sed1520_old_vbar (Driver *drvthis, int x, int len);
|
||||
|
||||
@@ -462,7 +462,7 @@ MtxcOrb_cellheight (Driver *drvthis)
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
serialPOS_string (Driver *drvthis, int x, int y, char string[])
|
||||
serialPOS_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -712,7 +712,7 @@ serialPOS_get_info (Driver *drvthis)
|
||||
* \param options Options (currently unused).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
serialPOS_vbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
serialPOS_vbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
// map
|
||||
@@ -765,7 +765,7 @@ serialPOS_vbar (Driver * drvthis, int x, int y, int len, int promille, int optio
|
||||
* \param options Options (currently unused).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
serialPOS_hbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
serialPOS_hbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int pixels = ((long) 2 * len * p->cellwidth) * promille / 2000;
|
||||
|
||||
@@ -20,12 +20,12 @@ MODULE_EXPORT int serialPOS_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int serialPOS_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void serialPOS_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void serialPOS_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void serialPOS_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void serialPOS_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void serialPOS_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT const char * serialPOS_get_key (Driver *drvthis);
|
||||
|
||||
MODULE_EXPORT void serialPOS_vbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void serialPOS_hbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void serialPOS_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void serialPOS_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT int serialPOS_icon (Driver *drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void serialPOS_num (Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT void serialPOS_cursor (Driver *drvthis, int x, int y, int state);
|
||||
|
||||
+54
-53
@@ -129,11 +129,11 @@ serialVFD_init (Driver *drvthis)
|
||||
p->refresh_timer = 480;
|
||||
p->hw_brightness = 0;
|
||||
|
||||
debug(RPT_INFO, "%s(%p)", __FUNCTION__, drvthis );
|
||||
debug(RPT_INFO, "%s(%p)", __FUNCTION__, drvthis);
|
||||
|
||||
/* Read config file */
|
||||
|
||||
p->use_parallel = drvthis->config_get_bool( drvthis->name, "use_parallel", 0, 0 );
|
||||
p->use_parallel = drvthis->config_get_bool(drvthis->name, "use_parallel", 0, 0);
|
||||
|
||||
/* Which device should be used */
|
||||
strncpy(p->device, drvthis->config_get_string(drvthis->name, "Device", 0, DEFAULT_DEVICE), sizeof(p->device));
|
||||
@@ -141,12 +141,12 @@ serialVFD_init (Driver *drvthis)
|
||||
report(RPT_INFO, "%s: using Device %s", drvthis->name, p->device);
|
||||
|
||||
if (p->use_parallel) {
|
||||
p->port = drvthis->config_get_int( drvthis->name, "port", 0, LPTPORT );
|
||||
p->port = drvthis->config_get_int(drvthis->name, "port", 0, LPTPORT);
|
||||
}
|
||||
else {
|
||||
|
||||
/* Which speed */
|
||||
tmp = drvthis->config_get_int (drvthis->name, "Speed", 0, DEFAULT_SPEED);
|
||||
tmp = drvthis->config_get_int(drvthis->name, "Speed", 0, DEFAULT_SPEED);
|
||||
if ((tmp != 1200) && (tmp != 2400) && (tmp != 9600) && (tmp != 19200) && (tmp != 115200)) {
|
||||
report(RPT_WARNING, "%s: Speed must be 1200, 2400, 9600, 19200 or 115200. Using default %d.\n",
|
||||
drvthis->name, DEFAULT_SPEED);
|
||||
@@ -158,7 +158,7 @@ serialVFD_init (Driver *drvthis)
|
||||
else if (tmp == 19200) p->speed = B19200;
|
||||
else if (tmp == 115200) p->speed = B115200;
|
||||
}
|
||||
// report(RPT_ERR, "%s: Port: %X\n", __FUNCTION__, p->port, strerror (errno));
|
||||
// report(RPT_ERR, "%s: Port: %X\n", __FUNCTION__, p->port, strerror(errno));
|
||||
|
||||
/* Which size */
|
||||
strncpy(size, drvthis->config_get_string(drvthis->name, "Size", 0, DEFAULT_SIZE), sizeof(size));
|
||||
@@ -206,7 +206,7 @@ serialVFD_init (Driver *drvthis)
|
||||
p->display_type = tmp;
|
||||
|
||||
/* Number of custom characters */
|
||||
tmp = drvthis->config_get_int (drvthis->name, "Custom-Characters", 0, -83);
|
||||
tmp = drvthis->config_get_int(drvthis->name, "Custom-Characters", 0, -83);
|
||||
if ((tmp < 0) || (tmp > 99)) {
|
||||
report(RPT_WARNING, "%s: The number of Custom-Characters must be between 0 and 99. Using default.",
|
||||
drvthis->name, 0);
|
||||
@@ -215,10 +215,10 @@ serialVFD_init (Driver *drvthis)
|
||||
p->customchars = tmp;
|
||||
|
||||
|
||||
// report (RPT_ERR, "%s: Port: %X\n", __FUNCTION__, p->port, strerror (errno));
|
||||
// report(RPT_ERR, "%s: Port: %X\n", __FUNCTION__, p->port, strerror(errno));
|
||||
|
||||
// Do connection type specific io-port init
|
||||
if (Port_Function[p->use_parallel].init_fkt (drvthis) == -1) {
|
||||
if (Port_Function[p->use_parallel].init_fkt(drvthis) == -1) {
|
||||
report(RPT_ERR, "%s: unable to initialize io-port.", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
@@ -243,11 +243,11 @@ serialVFD_init (Driver *drvthis)
|
||||
//setup displayspecific data
|
||||
serialVFD_load_display_data(drvthis);
|
||||
|
||||
// report (RPT_ERR, "%s: Port: %X\n", drvthis->name, p->port, strerror (errno));
|
||||
// report(RPT_ERR, "%s: Port: %X\n", drvthis->name, p->port, strerror(errno));
|
||||
|
||||
//initialise display
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[reset][1],p->hw_cmd[reset][0]);
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[init_cmds][1],p->hw_cmd[init_cmds][0]);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[reset][1],p->hw_cmd[reset][0]);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[init_cmds][1],p->hw_cmd[init_cmds][0]);
|
||||
serialVFD_backlight(drvthis, 1);
|
||||
report(RPT_DEBUG, "%s: init() done", drvthis->name);
|
||||
return 0;
|
||||
@@ -304,9 +304,9 @@ serialVFD_backlight (Driver *drvthis, int on)
|
||||
// map range [0, 1000] -> [0, 4] that the hardware understands
|
||||
//(4 steps 0-250, 251-500, 501-750, 751-1000)
|
||||
hardware_value /= 251;
|
||||
if(hardware_value != p->hw_brightness){
|
||||
p->hw_brightness=hardware_value;
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[p->hw_brightness][1],\
|
||||
if (hardware_value != p->hw_brightness) {
|
||||
p->hw_brightness = hardware_value;
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[p->hw_brightness][1],\
|
||||
p->hw_cmd[p->hw_brightness][0]);
|
||||
}
|
||||
|
||||
@@ -322,11 +322,11 @@ serialVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int option
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
if (p->customchars >= p->cellheight || p->predefined_vbar == 1){
|
||||
if (p->customchars >= p->cellheight || p->predefined_vbar == 1) {
|
||||
serialVFD_init_vbar(drvthis);
|
||||
lib_vbar_static(drvthis, x, y, len, promille, options, p->cellheight, p->vbar_cc_offset);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
lib_vbar_static(drvthis, x, y, len, promille, options, 2, 0x5E);
|
||||
}
|
||||
}
|
||||
@@ -340,11 +340,11 @@ serialVFD_hbar (Driver *drvthis, int x, int y, int len, int promille, int option
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
if (p->customchars >= p->cellwidth || p->predefined_hbar == 1){
|
||||
if (p->customchars >= p->cellwidth || p->predefined_hbar == 1) {
|
||||
serialVFD_init_hbar(drvthis);
|
||||
lib_hbar_static(drvthis, x, y, len, promille, options, p->cellwidth, p->hbar_cc_offset);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
lib_hbar_static(drvthis, x, y, len, promille, options, 2, 0x2C);
|
||||
}
|
||||
}
|
||||
@@ -391,10 +391,10 @@ serialVFD_put_char (Driver *drvthis, int n)
|
||||
{ // put char in display
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[set_user_char][1],\
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[set_user_char][1],\
|
||||
p->hw_cmd[set_user_char][0]);// substitute and select Character to overwrite
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, (char*)&p->usr_chr_mapping[n], 1);
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->custom_char[n][0], p->usr_chr_dot_assignment[0]);// overwrite selected Character
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, (char*)&p->usr_chr_mapping[n], 1);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->custom_char[n][0], p->usr_chr_dot_assignment[0]);// overwrite selected Character
|
||||
}
|
||||
|
||||
|
||||
@@ -415,37 +415,37 @@ serialVFD_flush (Driver *drvthis)
|
||||
for (i = 0; i < p->customchars; i++) {
|
||||
for (j = 0; j < p->usr_chr_dot_assignment[0]; j++) {
|
||||
if (p->custom_char[i][j] != p->custom_char_store[i][j]) {
|
||||
custom_char_changed[i]=1;
|
||||
// report (RPT_ERR, "%s: Char: %X %i\n", __FUNCTION__, i, j, strerror (errno));
|
||||
custom_char_changed[i] = 1;
|
||||
// report(RPT_ERR, "%s: Char: %X %i\n", __FUNCTION__, i, j, strerror(errno));
|
||||
}
|
||||
p->custom_char_store[i][j]=p->custom_char[i][j];
|
||||
p->custom_char_store[i][j] = p->custom_char[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
if (p->refresh_timer > 500) { // Do a full refresh every 500 refreshs.
|
||||
// With this it is possible to switch display on and off while lcdproc is running
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[init_cmds][1],p->hw_cmd[init_cmds][0]);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[init_cmds][1],p->hw_cmd[init_cmds][0]);
|
||||
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[p->hw_brightness][1],\
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[p->hw_brightness][1],\
|
||||
p->hw_cmd[p->hw_brightness][0]); // restore brightness
|
||||
|
||||
memset(p->backingstore, 0, p->width * p->height); // clear Backing-store
|
||||
|
||||
for(i=0;i<p->customchars;i++) // refresh all customcharacters
|
||||
custom_char_changed[i]=1;
|
||||
for (i = 0; i < p->customchars; i++) // refresh all customcharacters
|
||||
custom_char_changed[i] = 1;
|
||||
p->refresh_timer = 0;
|
||||
}
|
||||
|
||||
p->refresh_timer++;
|
||||
|
||||
if (p->display_type != 1) { //not KD Rev 2.1
|
||||
for(i=0;i<p->customchars;i++) // set customcharacters
|
||||
if(custom_char_changed[i])
|
||||
serialVFD_put_char (drvthis, i);
|
||||
for (i = 0; i < p->customchars; i++) // set customcharacters
|
||||
if (custom_char_changed[i])
|
||||
serialVFD_put_char(drvthis, i);
|
||||
}
|
||||
|
||||
if(custom_char_changed[p->last_custom])
|
||||
p->last_custom=-10;
|
||||
if (custom_char_changed[p->last_custom])
|
||||
p->last_custom = -10;
|
||||
|
||||
for (i = 0; i < (p->height * p->width); i++) {
|
||||
|
||||
@@ -453,37 +453,38 @@ serialVFD_flush (Driver *drvthis)
|
||||
* on the screen, don't put it there again
|
||||
*/
|
||||
|
||||
if(p->framebuf[i] != p->backingstore[i] || (p->framebuf[i] <=30 && custom_char_changed[(int)p->framebuf[i]])) {
|
||||
if (last_chr < i-1){ // if not last char written cursor has to be moved.
|
||||
if(last_chr < i-2-p->hw_cmd[mv_cursor][0]) {
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[mv_cursor][1],\
|
||||
if ((p->framebuf[i] != p->backingstore[i]) ||
|
||||
((p->framebuf[i] <= 30) && (custom_char_changed[(int)p->framebuf[i]]))) {
|
||||
if (last_chr < i-1) { // if not last char written cursor has to be moved.
|
||||
if (last_chr < i-2-p->hw_cmd[mv_cursor][0]) {
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[mv_cursor][1],\
|
||||
p->hw_cmd[mv_cursor][0]);
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, (char*)&i, 1);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, (char*)&i, 1);
|
||||
}
|
||||
else {
|
||||
for (j = last_chr; j < (i-1); j++)
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->hw_cmd[hor_tab][1], p->hw_cmd[hor_tab][0]);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[hor_tab][1], p->hw_cmd[hor_tab][0]);
|
||||
}
|
||||
}
|
||||
|
||||
if(p->framebuf[i] <= 30) { // custom character
|
||||
if (p->framebuf[i] <= 30) { // custom character
|
||||
if (p->display_type == 1) { // KD Rev 2.1 only
|
||||
if (p->last_custom != p->framebuf[i]){
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, "\x1A\xDB", 2); // substitute and select character to overwrite (237)
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->custom_char[(int)p->framebuf[i]][0], 7);// overwrite selected character
|
||||
if (p->last_custom != p->framebuf[i]) {
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, "\x1A\xDB", 2); // substitute and select character to overwrite (237)
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->custom_char[(int)p->framebuf[i]][0], 7);// overwrite selected character
|
||||
}
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, "\xDB", 1); // write character
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, "\xDB", 1); // write character
|
||||
p->last_custom = p->framebuf[i];
|
||||
}
|
||||
else { // all other displays
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, (char*)&p->usr_chr_mapping[(int)p->framebuf[i]], 1);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, (char*)&p->usr_chr_mapping[(int)p->framebuf[i]], 1);
|
||||
}
|
||||
}
|
||||
else if(p->framebuf[i] > 127 && (p->ISO_8859_1 != 0)) { // ISO_8859_1 translation for 129 ... 255
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->charmap[p->framebuf[i] - 128], 1);
|
||||
else if (p->framebuf[i] > 127 && (p->ISO_8859_1 != 0)) { // ISO_8859_1 translation for 129 ... 255
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->charmap[p->framebuf[i] - 128], 1);
|
||||
}
|
||||
else {
|
||||
Port_Function[p->use_parallel].write_fkt (drvthis, &p->framebuf[i], 1);
|
||||
Port_Function[p->use_parallel].write_fkt(drvthis, &p->framebuf[i], 1);
|
||||
}
|
||||
|
||||
last_chr = i;
|
||||
@@ -496,7 +497,7 @@ serialVFD_flush (Driver *drvthis)
|
||||
|
||||
|
||||
MODULE_EXPORT void
|
||||
serialVFD_num( Driver * drvthis, int x, int num )
|
||||
serialVFD_num(Driver * drvthis, int x, int num)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int do_init = 0;
|
||||
@@ -544,7 +545,7 @@ serialVFD_icon (Driver *drvthis, int x, int y, int icon)
|
||||
serialVFD_chr(drvthis, x, y, 127);
|
||||
break;
|
||||
case ICON_HEART_FILLED:
|
||||
if (p->customchars > 0){
|
||||
if (p->customchars > 0) {
|
||||
p->ccmode = CCMODE_STANDARD;
|
||||
serialVFD_set_char(drvthis, 0, heart_filled);
|
||||
serialVFD_chr(drvthis, x, y, 0);
|
||||
@@ -553,7 +554,7 @@ serialVFD_icon (Driver *drvthis, int x, int y, int icon)
|
||||
serialVFD_icon(drvthis, x, y, ICON_BLOCK_FILLED);
|
||||
break;
|
||||
case ICON_HEART_OPEN:
|
||||
if (p->customchars > 0){
|
||||
if (p->customchars > 0) {
|
||||
p->ccmode = CCMODE_STANDARD;
|
||||
serialVFD_set_char(drvthis, 0, heart_open);
|
||||
serialVFD_chr(drvthis, x, y, 0);
|
||||
@@ -637,7 +638,7 @@ serialVFD_clear (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
serialVFD_string (Driver *drvthis, int x, int y, char string[])
|
||||
serialVFD_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -660,7 +661,7 @@ serialVFD_close (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
if (p != NULL) {
|
||||
Port_Function[p->use_parallel].close_fkt (drvthis);
|
||||
Port_Function[p->use_parallel].close_fkt(drvthis);
|
||||
if (p->framebuf)
|
||||
free(p->framebuf);
|
||||
if (p->backingstore)
|
||||
|
||||
@@ -54,7 +54,7 @@ MODULE_EXPORT int serialVFD_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int serialVFD_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void serialVFD_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void serialVFD_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void serialVFD_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void serialVFD_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void serialVFD_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void serialVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
@@ -67,7 +67,7 @@ MODULE_EXPORT int serialVFD_get_brightness (Driver *drvthis, int state);
|
||||
MODULE_EXPORT void serialVFD_set_brightness (Driver *drvthis, int state, int promille);
|
||||
MODULE_EXPORT void serialVFD_backlight (Driver *drvthis, int on);
|
||||
MODULE_EXPORT void serialVFD_output (Driver *drvthis, int state);
|
||||
MODULE_EXPORT void serialVFD_num (Driver * drvthis, int x, int num);
|
||||
MODULE_EXPORT void serialVFD_num (Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT int serialVFD_get_free_chars (Driver *drvthis);
|
||||
MODULE_EXPORT const char * serialVFD_get_info( Driver *drvthis );
|
||||
|
||||
|
||||
+253
-253
@@ -41,304 +41,304 @@ void serialVFD_load_Futaba (Driver *drvthis);
|
||||
void serialVFD_load_display_data(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
switch (p->display_type)
|
||||
{
|
||||
switch (p->display_type) {
|
||||
case 0:
|
||||
serialVFD_load_NEC_FIPC (drvthis);
|
||||
serialVFD_load_NEC_FIPC(drvthis);
|
||||
break;
|
||||
case 1:
|
||||
serialVFD_load_KD (drvthis);
|
||||
serialVFD_load_KD(drvthis);
|
||||
break;
|
||||
case 2:
|
||||
serialVFD_load_Noritake (drvthis);
|
||||
serialVFD_load_Noritake(drvthis);
|
||||
break;
|
||||
case 3:
|
||||
serialVFD_load_Futaba (drvthis);
|
||||
serialVFD_load_Futaba(drvthis);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
serialVFD_load_NEC_FIPC (Driver *drvthis)
|
||||
{ //nec_fipc
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
|
||||
if (p->customchars == -83)
|
||||
p->customchars=1; // number of custom characters the display provides
|
||||
p->vbar_cc_offset=5; // character offset of the bars
|
||||
p->hbar_cc_offset=12; // character offset of the bars
|
||||
p->predefined_hbar=1; // the display has predefined hbar-characters
|
||||
p->predefined_vbar=1; // the display has predefined vbar-characters
|
||||
if (p->customchars == -83)
|
||||
p->customchars = 1; // number of custom characters the display provides
|
||||
p->vbar_cc_offset = 5; // character offset of the bars
|
||||
p->hbar_cc_offset = 12; // character offset of the bars
|
||||
p->predefined_hbar = 1; // the display has predefined hbar-characters
|
||||
p->predefined_vbar = 1; // the display has predefined vbar-characters
|
||||
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4]={{1 ,0x04}, // dark
|
||||
{1 ,0x03},
|
||||
{1 ,0x02},
|
||||
{1 ,0x01}, // bright
|
||||
{1 ,0x0D}, // pos1
|
||||
{1 ,0x1B}, // move cursor
|
||||
{1 ,0x0C}, // reset
|
||||
{2 ,0x14, 0x11}, // init
|
||||
{1 ,0x1A}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp=0;tmp < (10) ;tmp++)
|
||||
for (w=0;w < (4) ;w++)
|
||||
p->hw_cmd[tmp][w]=hw_cmd[tmp][w];
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4] = {{1 ,0x04}, // dark
|
||||
{1 ,0x03},
|
||||
{1 ,0x02},
|
||||
{1 ,0x01}, // bright
|
||||
{1 ,0x0D}, // pos1
|
||||
{1 ,0x1B}, // move cursor
|
||||
{1 ,0x0C}, // reset
|
||||
{2 ,0x14, 0x11}, // init
|
||||
{1 ,0x1A}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp = 0; tmp < 10; tmp++)
|
||||
for (w = 0; w < 4; w++)
|
||||
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
|
||||
|
||||
// Translates ISO 8859-1 to display charset.
|
||||
const unsigned char charmap[] = {
|
||||
/* #128 = 0x80 */
|
||||
128, 129, 130, 131, 132, 133, 134, 135,
|
||||
136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 154, 155, 156, 157, 158, 159,
|
||||
/* #160 = 0xA0 */
|
||||
160, '!', 0xF7, 0xF8, '?', '?', 0x7C, 0xF9,
|
||||
'"', '?', '?', '?', '?', '-', '?', '?',
|
||||
0x8B, 0xF3, 0x89, 0x8A, 0x27, 0x98, '?', '.',
|
||||
',', '?', '?', '?', '?', 0x8C, '?', 0xAA,
|
||||
/* #192 = 0xC0 */
|
||||
'A', 'A', 'A', 'A', 0xA2, 0xA8, 'A', 'C',
|
||||
'E', 'E', 'E', 0xB6, 'I', 'I', 'I', 'I',
|
||||
'D', 0xA9, 'O', 'O', 'O', 'O', 0xA3, 0x8D,
|
||||
'0', 'U', 'U', 'U', 0xA4, 'Y', 'p', 0x91,
|
||||
/* #224 = 0xE0 */
|
||||
'a', 'a', 'a', 'a', 0xA5, 'a', 'a', 'c',
|
||||
'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
|
||||
'o', 'n', 'o', 'o', 'o', 'o', 0xA6, 0x8E,
|
||||
'0', 'u', 'u', 'u', 0xA7, 'y', 'p', 'y'
|
||||
};
|
||||
for (tmp=0;tmp < 128 ;tmp++)
|
||||
p->charmap[tmp]=charmap[tmp];
|
||||
// Translates ISO 8859-1 to display charset.
|
||||
const unsigned char charmap[] = {
|
||||
/* #128 = 0x80 */
|
||||
128, 129, 130, 131, 132, 133, 134, 135,
|
||||
136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 154, 155, 156, 157, 158, 159,
|
||||
/* #160 = 0xA0 */
|
||||
160, '!', 0xF7, 0xF8, '?', '?', 0x7C, 0xF9,
|
||||
'"', '?', '?', '?', '?', '-', '?', '?',
|
||||
0x8B, 0xF3, 0x89, 0x8A, 0x27, 0x98, '?', '.',
|
||||
',', '?', '?', '?', '?', 0x8C, '?', 0xAA,
|
||||
/* #192 = 0xC0 */
|
||||
'A', 'A', 'A', 'A', 0xA2, 0xA8, 'A', 'C',
|
||||
'E', 'E', 'E', 0xB6, 'I', 'I', 'I', 'I',
|
||||
'D', 0xA9, 'O', 'O', 'O', 'O', 0xA3, 0x8D,
|
||||
'0', 'U', 'U', 'U', 0xA4, 'Y', 'p', 0x91,
|
||||
/* #224 = 0xE0 */
|
||||
'a', 'a', 'a', 'a', 0xA5, 'a', 'a', 'c',
|
||||
'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
|
||||
'o', 'n', 'o', 'o', 'o', 'o', 0xA6, 0x8E,
|
||||
'0', 'u', 'u', 'u', 0xA7, 'y', 'p', 'y' };
|
||||
for (tmp = 0; tmp < 128; tmp++)
|
||||
p->charmap[tmp] = charmap[tmp];
|
||||
|
||||
//{bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57]={7, 1, 2, 3, 4, 5, 0, 0, 0,
|
||||
6, 7, 8, 9,10, 0, 0, 0,
|
||||
11,12,13,14,15, 0, 0, 0,
|
||||
16,17,18,19,20, 0, 0, 0,
|
||||
21,22,23,24,25, 0, 0, 0,
|
||||
26,27,28,29,30, 0, 0, 0,
|
||||
31,32,33,34,35, 0, 0, 0};
|
||||
for (tmp=0;tmp < 57 ;tmp++)
|
||||
p->usr_chr_dot_assignment[tmp]=usr_chr_dot_assignment[tmp];
|
||||
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57] = { 7,
|
||||
1, 2, 3, 4, 5, 0, 0, 0,
|
||||
6, 7, 8, 9,10, 0, 0, 0,
|
||||
11,12,13,14,15, 0, 0, 0,
|
||||
16,17,18,19,20, 0, 0, 0,
|
||||
21,22,23,24,25, 0, 0, 0,
|
||||
26,27,28,29,30, 0, 0, 0,
|
||||
31,32,33,34,35, 0, 0, 0 };
|
||||
for (tmp = 0; tmp < 57; tmp++)
|
||||
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
|
||||
|
||||
//Where to place the usercharacters (0..30) in the asciicode.
|
||||
//Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
//(useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31]=
|
||||
{0xAF,0,0,0,0,0, 0x5F, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0, 0x5F, 0xE1, 0xE3, 0xE4};
|
||||
for (tmp=0;tmp < 31 ;tmp++)
|
||||
p->usr_chr_mapping[tmp]=usr_chr_mapping[tmp];
|
||||
// Where to place the usercharacters (0..30) in the asciicode.
|
||||
// Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
// (useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31] =
|
||||
{0xAF,0,0,0,0,0, 0x5F, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0, 0x5F, 0xE1, 0xE3, 0xE4};
|
||||
for (tmp = 0; tmp < 31; tmp++)
|
||||
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
serialVFD_load_KD (Driver *drvthis)
|
||||
{ //KD Rev2.1
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
|
||||
if (p->customchars == -83)
|
||||
p->customchars=31; // number of custom characters the display provides
|
||||
p->vbar_cc_offset=0; // character offset of the bars
|
||||
p->hbar_cc_offset=0; // character offset of the bars
|
||||
p->predefined_hbar=0; // the display has predefined hbar-characters
|
||||
p->predefined_vbar=0; // the display has predefined vbar-characters
|
||||
if (p->customchars == -83)
|
||||
p->customchars = 31; // number of custom characters the display provides
|
||||
p->vbar_cc_offset = 0; // character offset of the bars
|
||||
p->hbar_cc_offset = 0; // character offset of the bars
|
||||
p->predefined_hbar = 0; // the display has predefined hbar-characters
|
||||
p->predefined_vbar = 0; // the display has predefined vbar-characters
|
||||
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4]={{1 ,0x04}, // dark
|
||||
{1 ,0x03},
|
||||
{1 ,0x02},
|
||||
{1 ,0x01}, // bright
|
||||
{1 ,0x0D}, // pos1
|
||||
{1 ,0x1B}, // move cursor
|
||||
{1 ,0x0C}, // reset
|
||||
{2 ,0x14, 0x11}, // init
|
||||
{1 ,0x1A}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp=0;tmp < (10) ;tmp++)
|
||||
for (w=0;w < (4) ;w++)
|
||||
p->hw_cmd[tmp][w]=hw_cmd[tmp][w];
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4] = {{1 ,0x04}, // dark
|
||||
{1 ,0x03},
|
||||
{1 ,0x02},
|
||||
{1 ,0x01}, // bright
|
||||
{1 ,0x0D}, // pos1
|
||||
{1 ,0x1B}, // move cursor
|
||||
{1 ,0x0C}, // reset
|
||||
{2 ,0x14, 0x11}, // init
|
||||
{1 ,0x1A}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp = 0; tmp < 10; tmp++)
|
||||
for (w = 0; w < 4; w++)
|
||||
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
|
||||
|
||||
const unsigned char charmap[] = {
|
||||
/* #128 = 0x80 */
|
||||
128, 129, 130, 131, 132, 133, 134, 135,
|
||||
136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 154, 155, 156, 157, 158, 159,
|
||||
/* #160 = 0xA0 */
|
||||
160, '!', 0xF7, 0xF8, '?', '?', 0x7C, 0xF9,
|
||||
'"', '?', '?', '?', '?', '-', '?', '?',
|
||||
0xA9, 0xBA, '?', '?', 0x27, '?', '?', '.',
|
||||
',', '?', '?', '?', '?', '?', '?', '?',
|
||||
/* #192 = 0xC0 */
|
||||
0xB2, 'A', 'A', 'A', 0xA2, 0xA1, 'A', 'C',
|
||||
'E', 'E', 0xA8, 0xB6, 0xAB, 0xAA, 0xAC, 0xA9,
|
||||
'D', 0xAE, 0xB1, 0xB0, 0xBF, 'O', 0xA3, 'x',
|
||||
0xAF, 0xB7, 0xB6, 0xB8, 0xA4, 'Y', 'p', 0x91,
|
||||
/* #224 = 0xE0 */
|
||||
0xD2, 0xC2, 0xC4, 'a', 0xA5, 0xC1, 0xC5, 0xC3,
|
||||
0xC7, 0xC6, 0xC8, 0xD4, 0xCC, 0xCB, 0xCD, 0xCA,
|
||||
'o', 0xCF, 0xD1, 0xD0, 0xCE, 'o', 0xA6, 0xBB,
|
||||
0xD0, 0xD7, 0xD6, 0xD8, 0xA7, 'y', 'p', 'y'
|
||||
};
|
||||
for (tmp=0;tmp < 128 ;tmp++)
|
||||
p->charmap[tmp]=charmap[tmp];
|
||||
const unsigned char charmap[] = {
|
||||
/* #128 = 0x80 */
|
||||
128, 129, 130, 131, 132, 133, 134, 135,
|
||||
136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 154, 155, 156, 157, 158, 159,
|
||||
/* #160 = 0xA0 */
|
||||
160, '!', 0xF7, 0xF8, '?', '?', 0x7C, 0xF9,
|
||||
'"', '?', '?', '?', '?', '-', '?', '?',
|
||||
0xA9, 0xBA, '?', '?', 0x27, '?', '?', '.',
|
||||
',', '?', '?', '?', '?', '?', '?', '?',
|
||||
/* #192 = 0xC0 */
|
||||
0xB2, 'A', 'A', 'A', 0xA2, 0xA1, 'A', 'C',
|
||||
'E', 'E', 0xA8, 0xB6, 0xAB, 0xAA, 0xAC, 0xA9,
|
||||
'D', 0xAE, 0xB1, 0xB0, 0xBF, 'O', 0xA3, 'x',
|
||||
0xAF, 0xB7, 0xB6, 0xB8, 0xA4, 'Y', 'p', 0x91,
|
||||
/* #224 = 0xE0 */
|
||||
0xD2, 0xC2, 0xC4, 'a', 0xA5, 0xC1, 0xC5, 0xC3,
|
||||
0xC7, 0xC6, 0xC8, 0xD4, 0xCC, 0xCB, 0xCD, 0xCA,
|
||||
'o', 0xCF, 0xD1, 0xD0, 0xCE, 'o', 0xA6, 0xBB,
|
||||
0xD0, 0xD7, 0xD6, 0xD8, 0xA7, 'y', 'p', 'y' };
|
||||
for (tmp = 0; tmp < 128; tmp++)
|
||||
p->charmap[tmp] = charmap[tmp];
|
||||
|
||||
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57] = { 7,
|
||||
1, 2, 3, 4, 5, 0, 0, 0,
|
||||
6, 7, 8, 9,10, 0, 0, 0,
|
||||
11,12,13,14,15, 0, 0, 0,
|
||||
16,17,18,19,20, 0, 0, 0,
|
||||
21,22,23,24,25, 0, 0, 0,
|
||||
26,27,28,29,30, 0, 0, 0,
|
||||
31,32,33,34,35, 0, 0, 0 };
|
||||
for (tmp = 0; tmp < 57; tmp++)
|
||||
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
|
||||
|
||||
//{bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57]={7, 1, 2, 3, 4, 5, 0, 0, 0,
|
||||
6, 7, 8, 9,10, 0, 0, 0,
|
||||
11,12,13,14,15, 0, 0, 0,
|
||||
16,17,18,19,20, 0, 0, 0,
|
||||
21,22,23,24,25, 0, 0, 0,
|
||||
26,27,28,29,30, 0, 0, 0,
|
||||
31,32,33,34,35, 0, 0, 0};
|
||||
for (tmp=0;tmp < 57 ;tmp++)
|
||||
p->usr_chr_dot_assignment[tmp]=usr_chr_dot_assignment[tmp];
|
||||
|
||||
//Where to place the usercharacters (0..30) in the asciicode.
|
||||
//Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
//(useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31]=
|
||||
{0xAF};
|
||||
for (tmp=0;tmp < 31 ;tmp++)
|
||||
p->usr_chr_mapping[tmp]=usr_chr_mapping[tmp];
|
||||
// Where to place the usercharacters (0..30) in the asciicode.
|
||||
// Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
// (useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31]=
|
||||
{0xAF};
|
||||
for (tmp = 0; tmp < 31; tmp++)
|
||||
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
serialVFD_load_Noritake (Driver *drvthis)
|
||||
{ //Noritake
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
|
||||
if (p->customchars == -83)
|
||||
p->customchars=16; // number of custom characters the display provides
|
||||
p->vbar_cc_offset=0; // character offset of the bars
|
||||
p->hbar_cc_offset=0; // character offset of the bars
|
||||
p->predefined_hbar=0; // the display has predefined hbar-characters
|
||||
p->predefined_vbar=0; // the display has predefined vbar-characters
|
||||
if (p->customchars == -83)
|
||||
p->customchars = 16; // number of custom characters the display provides
|
||||
p->vbar_cc_offset = 0; // character offset of the bars
|
||||
p->hbar_cc_offset = 0; // character offset of the bars
|
||||
p->predefined_hbar = 0; // the display has predefined hbar-characters
|
||||
p->predefined_vbar = 0; // the display has predefined vbar-characters
|
||||
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4]={{3 ,0x1B, 0x4C, 0x00}, // dark
|
||||
{3 ,0x1B, 0x4C, 0x50},
|
||||
{3 ,0x1B, 0x4C, 0x90},
|
||||
{3 ,0x1B, 0x4C, 0xFF}, // bright
|
||||
{1 ,0x0C}, // pos1
|
||||
{2 ,0x1B, 0x48}, // move cursor
|
||||
{2 ,0x1B, 0x49}, // reset
|
||||
{2 ,0x14, 0x11}, // init
|
||||
{2 ,0x1B, 0x43}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp=0;tmp < (10) ;tmp++)
|
||||
for (w=0;w < (4) ;w++)
|
||||
p->hw_cmd[tmp][w]=hw_cmd[tmp][w];
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4] = {{3 ,0x1B, 0x4C, 0x00}, // dark
|
||||
{3 ,0x1B, 0x4C, 0x50},
|
||||
{3 ,0x1B, 0x4C, 0x90},
|
||||
{3 ,0x1B, 0x4C, 0xFF}, // bright
|
||||
{1 ,0x0C}, // pos1
|
||||
{2 ,0x1B, 0x48}, // move cursor
|
||||
{2 ,0x1B, 0x49}, // reset
|
||||
{2 ,0x14, 0x11}, // init
|
||||
{2 ,0x1B, 0x43}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp = 0; tmp < 10; tmp++)
|
||||
for (w = 0; w < 4; w++)
|
||||
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
|
||||
|
||||
// no charmap needed
|
||||
for (tmp=128;tmp <= 255 ;tmp++)
|
||||
p->charmap[tmp]=tmp;
|
||||
// no charmap needed
|
||||
for (tmp = 128; tmp <= 255; tmp++)
|
||||
p->charmap[tmp] = tmp;
|
||||
|
||||
//{bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57]={5, 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, 0, 0, 0, 0, 0};
|
||||
for (tmp=0;tmp < 57 ;tmp++)
|
||||
p->usr_chr_dot_assignment[tmp]=usr_chr_dot_assignment[tmp];
|
||||
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57] = { 5,
|
||||
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, 0, 0, 0, 0, 0 };
|
||||
for (tmp = 0; tmp < 57; tmp++)
|
||||
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
|
||||
|
||||
//Where to place the usercharacters (0..30) in the asciicode.
|
||||
//Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
//(useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31]=
|
||||
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\
|
||||
0x0F, 0x10, 0x13 , 0x14, 0x1C, 0x1D, 0x1E, 0x1F};
|
||||
for (tmp=0;tmp < 31 ;tmp++)
|
||||
p->usr_chr_mapping[tmp]=usr_chr_mapping[tmp];
|
||||
// Where to place the usercharacters (0..30) in the asciicode.
|
||||
// Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
// (useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31]=
|
||||
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\
|
||||
0x0F, 0x10, 0x13 , 0x14, 0x1C, 0x1D, 0x1E, 0x1F};
|
||||
for (tmp = 0; tmp < 31; tmp++)
|
||||
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
serialVFD_load_Futaba (Driver *drvthis)
|
||||
{ //Futaba
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
int tmp, w;
|
||||
|
||||
if (p->customchars == -83)
|
||||
p->customchars=3; // number of custom characters the display provides
|
||||
p->vbar_cc_offset=0; // character offset of the bars
|
||||
p->hbar_cc_offset=0; // character offset of the bars
|
||||
p->predefined_hbar=0; // the display has predefined hbar-characters
|
||||
p->predefined_vbar=0; // the display has predefined vbar-characters
|
||||
if (p->customchars == -83)
|
||||
p->customchars = 3; // number of custom characters the display provides
|
||||
p->vbar_cc_offset = 0; // character offset of the bars
|
||||
p->hbar_cc_offset = 0; // character offset of the bars
|
||||
p->predefined_hbar = 0; // the display has predefined hbar-characters
|
||||
p->predefined_vbar = 0; // the display has predefined vbar-characters
|
||||
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4]={{2 ,0x04, 0x20}, // dark
|
||||
{2 ,0x04, 0x40},
|
||||
{2 ,0x04, 0x60},
|
||||
{2 ,0x04, 0xFF}, // bright
|
||||
{2 ,0x10, 0x00}, // pos1
|
||||
{1 ,0x10,}, // move cursor
|
||||
{1 ,0x1F}, // reset
|
||||
{2 ,0x11,0x14}, // init
|
||||
{1 ,0x03}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp=0;tmp < (10) ;tmp++)
|
||||
for (w=0;w < (4) ;w++)
|
||||
p->hw_cmd[tmp][w]=hw_cmd[tmp][w];
|
||||
// hardwarespecific commands:
|
||||
// hw_cmd[Command][data] = {{commandlength , command 1},
|
||||
// .....
|
||||
// {commandlength , command N}}
|
||||
const char hw_cmd[10][4] = {{2 ,0x04, 0x20}, // dark
|
||||
{2 ,0x04, 0x40},
|
||||
{2 ,0x04, 0x60},
|
||||
{2 ,0x04, 0xFF}, // bright
|
||||
{2 ,0x10, 0x00}, // pos1
|
||||
{1 ,0x10,}, // move cursor
|
||||
{1 ,0x1F}, // reset
|
||||
{2 ,0x11,0x14}, // init
|
||||
{1 ,0x03}, // set user char
|
||||
{1 ,0x09}}; // tab
|
||||
for (tmp = 0; tmp < 10; tmp++)
|
||||
for (w = 0; w < 4; w++)
|
||||
p->hw_cmd[tmp][w] = hw_cmd[tmp][w];
|
||||
|
||||
// Translates ISO 8859-1 to display charset.
|
||||
const unsigned char charmap[] = {
|
||||
/* #128 = 0x80 */
|
||||
128, 129, 130, 131, 132, 133, 134, 135,
|
||||
136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 154, 155, 156, 157, 158, 159,
|
||||
/* #160 = 0xA0 */
|
||||
160, 0xAD, 0x9B, 0x9C, 0xC8, 0x9D, 0x7C, 0xC0,
|
||||
'"', '?', 0xA6, 0xAE, 0xAA, '-', '?', '?',
|
||||
0xEF, 0xCA, 0xC6, 0xC7, 0x27, 0xB8, '?', '.',
|
||||
',', '?', 0xA7, 0xAF, 0xAC, 0xAB, '?', 0xA8,
|
||||
/* #192 = 0xC0 */
|
||||
0xD0, 'A', 0xD5, 'A', 0x8E, 0x8F, 0x92, 0x80,
|
||||
0xD1, 0x90, 0xD6, 0xD3, 'I', 'I', 0xD7, 0xD4,
|
||||
'D', 0xA5, 'O', 'O', 0xD8, 'O', 0x99, 'x',
|
||||
'0', 0xD2, 'U', 0xD9, 0x9A, 'Y', 'p', 0xB1,
|
||||
/* #224 = 0xE0 */
|
||||
0x85, 0xA0, 0x83, 'a', 0x84, 0x86, 0x91, 0x87,
|
||||
0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B,
|
||||
'o', 0xA4, 0x95, 0xA9, 0x93, 'o', 0x94, '/',
|
||||
'0', 0x97, 0xA3, 0x96, 0x81, 'y', 'p', 0x89
|
||||
};
|
||||
for (tmp=0;tmp < 128 ;tmp++)
|
||||
p->charmap[tmp]=charmap[tmp];
|
||||
// Translates ISO 8859-1 to display charset.
|
||||
const unsigned char charmap[] = {
|
||||
/* #128 = 0x80 */
|
||||
128, 129, 130, 131, 132, 133, 134, 135,
|
||||
136, 137, 138, 139, 140, 141, 142, 143,
|
||||
144, 145, 146, 147, 148, 149, 150, 151,
|
||||
152, 153, 154, 155, 156, 157, 158, 159,
|
||||
/* #160 = 0xA0 */
|
||||
160, 0xAD, 0x9B, 0x9C, 0xC8, 0x9D, 0x7C, 0xC0,
|
||||
'"', '?', 0xA6, 0xAE, 0xAA, '-', '?', '?',
|
||||
0xEF, 0xCA, 0xC6, 0xC7, 0x27, 0xB8, '?', '.',
|
||||
',', '?', 0xA7, 0xAF, 0xAC, 0xAB, '?', 0xA8,
|
||||
/* #192 = 0xC0 */
|
||||
0xD0, 'A', 0xD5, 'A', 0x8E, 0x8F, 0x92, 0x80,
|
||||
0xD1, 0x90, 0xD6, 0xD3, 'I', 'I', 0xD7, 0xD4,
|
||||
'D', 0xA5, 'O', 'O', 0xD8, 'O', 0x99, 'x',
|
||||
'0', 0xD2, 'U', 0xD9, 0x9A, 'Y', 'p', 0xB1,
|
||||
/* #224 = 0xE0 */
|
||||
0x85, 0xA0, 0x83, 'a', 0x84, 0x86, 0x91, 0x87,
|
||||
0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B,
|
||||
'o', 0xA4, 0x95, 0xA9, 0x93, 'o', 0x94, '/',
|
||||
'0', 0x97, 0xA3, 0x96, 0x81, 'y', 'p', 0x89 };
|
||||
for (tmp = 0; tmp < 128; tmp++)
|
||||
p->charmap[tmp] = charmap[tmp];
|
||||
|
||||
// {bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57] = { 5,
|
||||
8, 7, 6, 5, 4, 3, 2, 1,
|
||||
16,15,14,13,12,11,10, 9,
|
||||
24,23,22,21,20,19,18,17,
|
||||
32,31,30,29,28,27,26,25,
|
||||
0, 0, 0, 0, 0,35,34,33 };
|
||||
for (tmp = 0; tmp < 57; tmp++)
|
||||
p->usr_chr_dot_assignment[tmp] = usr_chr_dot_assignment[tmp];
|
||||
|
||||
//{bytes to send, icon bit mapped to bit 0, icon bit mapped to bit 1, ...}
|
||||
const int usr_chr_dot_assignment[57]={5, 8, 7, 6, 5, 4, 3, 2, 1,
|
||||
16,15,14,13,12,11,10, 9,
|
||||
24,23,22,21,20,19,18,17,
|
||||
32,31,30,29,28,27,26,25,
|
||||
0, 0, 0, 0, 0,35,34,33};
|
||||
for (tmp=0;tmp < 57 ;tmp++)
|
||||
p->usr_chr_dot_assignment[tmp]=usr_chr_dot_assignment[tmp];
|
||||
|
||||
//Where to place the usercharacters (0..30) in the asciicode.
|
||||
//Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
//(useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31]=
|
||||
{0xCD, 0xCE, 0xCF};
|
||||
for (tmp=0;tmp < 31 ;tmp++)
|
||||
p->usr_chr_mapping[tmp]=usr_chr_mapping[tmp];
|
||||
}
|
||||
// Where to place the usercharacters (0..30) in the asciicode.
|
||||
// Also used to map standardcharacters in the usercharacterspace(0..30)
|
||||
// (useful for displays with less then 30 usercharacters and predefined bars)
|
||||
const unsigned int usr_chr_mapping[31] = { 0xCD, 0xCE, 0xCF };
|
||||
for (tmp = 0; tmp < 31; tmp++)
|
||||
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void
|
||||
serialVFD_write_serial (Driver *drvthis, unsigned char *dat, size_t length)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
write (p->fd,dat,length);
|
||||
write(p->fd,dat,length);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -55,15 +55,15 @@ serialVFD_write_parallel (Driver *drvthis, unsigned char *dat, size_t length)
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i_para, j_para;
|
||||
|
||||
for(i_para = 0; i_para < length; i_para++) {
|
||||
for (i_para = 0; i_para < length; i_para++) {
|
||||
port_out(p->port, dat[i_para]);
|
||||
// port_in(p->port+1);
|
||||
port_out(p->port+2, WR_on);
|
||||
port_in(p->port+1);
|
||||
port_out(p->port+2, WR_off);
|
||||
port_in(p->port+1);
|
||||
for(j_para=0; j_para < MAXBUSY; j_para++) {
|
||||
if((port_in(p->port+1)) & Busy)
|
||||
for (j_para = 0; j_para < MAXBUSY; j_para++) {
|
||||
if ((port_in(p->port+1)) & Busy)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -78,14 +78,14 @@ serialVFD_init_serial (Driver *drvthis)
|
||||
|
||||
/* Set up io port correctly, and open it...*/
|
||||
debug( RPT_DEBUG, "%s: Opening device: %s", __FUNCTION__, p->device);
|
||||
p->fd = open (p->device, O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
p->fd = open(p->device, O_RDWR | O_NOCTTY | O_NDELAY);
|
||||
|
||||
if (p->fd == -1) {
|
||||
report (RPT_ERR, "%s: open() of %s failed (%s)\n", __FUNCTION__, p->device, strerror (errno));
|
||||
report(RPT_ERR, "%s: open() of %s failed (%s)\n", __FUNCTION__, p->device, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
tcgetattr (p->fd, &portset);
|
||||
tcgetattr(p->fd, &portset);
|
||||
|
||||
// We use RAW mode
|
||||
#ifdef HAVE_CFMAKERAW
|
||||
@@ -102,11 +102,11 @@ serialVFD_init_serial (Driver *drvthis)
|
||||
#endif
|
||||
|
||||
// Set port speed
|
||||
cfsetospeed (&portset, p->speed);
|
||||
cfsetispeed (&portset, B0);
|
||||
cfsetospeed(&portset, p->speed);
|
||||
cfsetispeed(&portset, B0);
|
||||
|
||||
// Do it...
|
||||
tcsetattr (p->fd, TCSANOW, &portset);
|
||||
tcsetattr(p->fd, TCSANOW, &portset);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -115,14 +115,14 @@ serialVFD_init_parallel (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
#ifdef HAVE_PCSTYLE_LPT_CONTROL
|
||||
debug( RPT_DEBUG, "%s: Opening parallelport at: 0x%X", __FUNCTION__, p->port);
|
||||
if(port_access_multiple(p->port,3)) {
|
||||
report (RPT_ERR, "%s: port_access_multiple() of 0x%X failed (%s)\n", __FUNCTION__, p->port, strerror (errno));
|
||||
debug(RPT_DEBUG, "%s: Opening parallelport at: 0x%X", __FUNCTION__, p->port);
|
||||
if (port_access_multiple(p->port,3)) {
|
||||
report(RPT_ERR, "%s: port_access_multiple() of 0x%X failed (%s)\n", __FUNCTION__, p->port, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
report (RPT_ERR, "%s: LCDproc was compiled without PCstyle LPT support\n", __FUNCTION__);
|
||||
report(RPT_ERR, "%s: LCDproc was compiled without PCstyle LPT support\n", __FUNCTION__);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@@ -141,9 +141,9 @@ serialVFD_close_parallel (Driver *drvthis)
|
||||
#ifdef HAVE_PCSTYLE_LPT_CONTROL
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
debug( RPT_DEBUG, "%s: Closing parallelport at: 0x%X", __FUNCTION__, p->port);
|
||||
if(port_deny_multiple(p->port,3)) {
|
||||
report (RPT_ERR, "%s: port_deny_multiple() of 0x%X failed (%s)\n", __FUNCTION__, p->port, strerror (errno));
|
||||
debug(RPT_DEBUG, "%s: Closing parallelport at: 0x%X", __FUNCTION__, p->port);
|
||||
if (port_deny_multiple(p->port,3)) {
|
||||
report(RPT_ERR, "%s: port_deny_multiple() of 0x%X failed (%s)\n", __FUNCTION__, p->port, strerror(errno));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -513,7 +513,7 @@ stv5730_flush (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (28,11).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
stv5730_string (Driver *drvthis, int x, int y, char string[])
|
||||
stv5730_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -11,7 +11,7 @@ MODULE_EXPORT int stv5730_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int stv5730_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void stv5730_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void stv5730_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void stv5730_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void stv5730_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void stv5730_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void stv5730_old_vbar (Driver *drvthis, int x, int len);
|
||||
MODULE_EXPORT void stv5730_old_hbar (Driver *drvthis, int x, int y, int len);
|
||||
|
||||
@@ -441,7 +441,7 @@ svga_cellheight (Driver *drvthis)
|
||||
* Clear screen
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
svga_clear (Driver * drvthis)
|
||||
svga_clear (Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s(%p)", __FUNCTION__, drvthis);
|
||||
|
||||
@@ -465,20 +465,21 @@ svga_flush (Driver *drvthis)
|
||||
* upper-left is (1,1), and the lower right should be (p->width,p->height).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
svga_string (Driver *drvthis, int x, int y, char string[])
|
||||
svga_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
char *buffer = strdup(string);
|
||||
char *ptr;
|
||||
|
||||
debug(RPT_DEBUG, "%s(%p, %d, %d, \"%s\")", __FUNCTION__, drvthis, x, y, string);
|
||||
|
||||
for (i = 0; string[i] != '\0'; i++) {
|
||||
char *c = &string[i];
|
||||
for (ptr = buffer; *ptr != '\0'; ptr++) {
|
||||
|
||||
if ((unsigned char) *c == 255) // TODO: Is this still necessary ?
|
||||
*c = '#';
|
||||
if ((unsigned char) *ptr == 255) // TODO: Is this still necessary ?
|
||||
*ptr = '#';
|
||||
}
|
||||
gl_writen(x * p->cellwidth + p->xoffs, y * p->cellheight + p->yoffs, i, string);
|
||||
gl_writen(x * p->cellwidth + p->xoffs, y * p->cellheight + p->yoffs, (ptr - buffer), buffer);
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ MODULE_EXPORT int svga_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int svga_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void svga_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void svga_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void svga_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void svga_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void svga_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void svga_vbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
|
||||
|
||||
@@ -312,7 +312,7 @@ t6963_flush (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,6).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
t6963_string (Driver *drvthis, int x, int y, char string[])
|
||||
t6963_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ MODULE_EXPORT int t6963_width (Driver *drvthis);
|
||||
MODULE_EXPORT int t6963_height (Driver *drvthis);
|
||||
MODULE_EXPORT void t6963_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void t6963_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void t6963_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void t6963_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void t6963_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void t6963_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
|
||||
@@ -185,7 +185,7 @@ text_flush (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
text_string (Driver *drvthis, int x, int y, char string[])
|
||||
text_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
MODULE_EXPORT int text_init (Driver * drvthis);
|
||||
MODULE_EXPORT int text_init (Driver *drvthis);
|
||||
MODULE_EXPORT void text_close (Driver *drvthis);
|
||||
MODULE_EXPORT int text_width (Driver *drvthis);
|
||||
MODULE_EXPORT int text_height (Driver *drvthis);
|
||||
MODULE_EXPORT void text_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void text_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void text_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void text_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void text_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void text_set_contrast (Driver *drvthis, int promille);
|
||||
MODULE_EXPORT void text_backlight (Driver *drvthis, int on);
|
||||
|
||||
+12
-12
@@ -67,7 +67,7 @@ static unsigned char tyan_lcdm_read_key(int fd);
|
||||
* Opens com port and sets baud correctly...
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
tyan_lcdm_init (Driver * drvthis, char *args)
|
||||
tyan_lcdm_init (Driver *drvthis, char *args)
|
||||
{
|
||||
PrivateData *p;
|
||||
struct termios portset;
|
||||
@@ -183,7 +183,7 @@ tyan_lcdm_init (Driver * drvthis, char *args)
|
||||
* Clean-up
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_close (Driver * drvthis)
|
||||
tyan_lcdm_close (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -255,7 +255,7 @@ PrivateData *p = drvthis->private_data;
|
||||
* Flushes all output to the lcd...
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_flush (Driver * drvthis)
|
||||
tyan_lcdm_flush (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
@@ -333,7 +333,7 @@ tyan_lcdm_get_key (Driver *drvthis)
|
||||
* The upper-left is (1,1), and the lower right should be (16,2).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_chr (Driver * drvthis, int x, int y, char c)
|
||||
tyan_lcdm_chr (Driver *drvthis, int x, int y, char c)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -351,7 +351,7 @@ tyan_lcdm_chr (Driver * drvthis, int x, int y, char c)
|
||||
* Need to find out if we have support for intermediate value.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_backlight (Driver * drvthis, int on)
|
||||
tyan_lcdm_backlight (Driver *drvthis, int on)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ tyan_lcdm_backlight (Driver * drvthis, int on)
|
||||
* Draws a vertical bar...
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_vbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
tyan_lcdm_vbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
/* x and y are the start position of the bar.
|
||||
* The bar by default grows in the 'up' direction
|
||||
@@ -399,7 +399,7 @@ tyan_lcdm_vbar (Driver * drvthis, int x, int y, int len, int promille, int optio
|
||||
* Draws a horizontal bar to the right.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_hbar (Driver * drvthis, int x, int y, int len, int promille, int options)
|
||||
tyan_lcdm_hbar (Driver *drvthis, int x, int y, int len, int promille, int options)
|
||||
{
|
||||
/* x and y are the start position of the bar.
|
||||
* The bar by default grows in the 'right' direction
|
||||
@@ -436,7 +436,7 @@ tyan_lcdm_hbar (Driver * drvthis, int x, int y, int len, int promille, int optio
|
||||
* Writes a big number.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_num (Driver * drvthis, int x, int num)
|
||||
tyan_lcdm_num (Driver *drvthis, int x, int num)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int do_init = 0;
|
||||
@@ -483,7 +483,7 @@ tyan_lcdm_get_free_chars(Driver *drvthis)
|
||||
* (least significant bit) is the rightmost pixel in each pixel row
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_set_char (Driver * drvthis, int n, unsigned char *dat)
|
||||
tyan_lcdm_set_char (Driver *drvthis, int n, unsigned char *dat)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
unsigned char mask = (1 << p->cellwidth) - 1;
|
||||
@@ -511,7 +511,7 @@ tyan_lcdm_set_char (Driver * drvthis, int n, unsigned char *dat)
|
||||
* Places an icon on screen
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
tyan_lcdm_icon (Driver * drvthis, int x, int y, int icon)
|
||||
tyan_lcdm_icon (Driver *drvthis, int x, int y, int icon)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
static unsigned char heart_open[] =
|
||||
@@ -693,7 +693,7 @@ tyan_lcdm_icon (Driver * drvthis, int x, int y, int icon)
|
||||
* Clears the LCD screen
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_clear (Driver * drvthis)
|
||||
tyan_lcdm_clear (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -706,7 +706,7 @@ tyan_lcdm_clear (Driver * drvthis)
|
||||
* upper-left is (1,1), and the lower right should be (16,2).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
tyan_lcdm_string (Driver * drvthis, int x, int y, char string[])
|
||||
tyan_lcdm_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
+16
-16
@@ -84,25 +84,25 @@ MODULE_EXPORT int supports_multiple = 0;
|
||||
MODULE_EXPORT char *symbol_prefix = "tyan_lcdm_";
|
||||
|
||||
/* API: functions for the server core */
|
||||
MODULE_EXPORT int tyan_lcdm_init (Driver * drvthis, char *device);
|
||||
MODULE_EXPORT void tyan_lcdm_close (Driver * drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_width (Driver * drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_height (Driver * drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_cellwidth (Driver * drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_cellheight (Driver * drvthis);
|
||||
MODULE_EXPORT void tyan_lcdm_clear (Driver * drvthis);
|
||||
MODULE_EXPORT void tyan_lcdm_flush (Driver * drvthis);
|
||||
MODULE_EXPORT void tyan_lcdm_string (Driver * drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void tyan_lcdm_chr (Driver * drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT int tyan_lcdm_init (Driver *drvthis, char *device);
|
||||
MODULE_EXPORT void tyan_lcdm_close (Driver *drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_width (Driver *drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_height (Driver *drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int tyan_lcdm_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void tyan_lcdm_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void tyan_lcdm_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void tyan_lcdm_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void tyan_lcdm_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void tyan_lcdm_vbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void tyan_lcdm_hbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void tyan_lcdm_num (Driver * drvthis, int x, int num);
|
||||
MODULE_EXPORT int tyan_lcdm_icon(Driver * drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void tyan_lcdm_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void tyan_lcdm_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void tyan_lcdm_num (Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT int tyan_lcdm_icon(Driver *drvthis, int x, int y, int icon);
|
||||
|
||||
MODULE_EXPORT int tyan_lcdm_get_free_chars (Driver *drvthis);
|
||||
MODULE_EXPORT void tyan_lcdm_set_char (Driver * drvthis, int n, unsigned char *dat);
|
||||
MODULE_EXPORT void tyan_lcdm_set_char (Driver *drvthis, int n, unsigned char *dat);
|
||||
|
||||
MODULE_EXPORT void tyan_lcdm_backlight (Driver * drvthis, int on);
|
||||
MODULE_EXPORT void tyan_lcdm_backlight (Driver *drvthis, int on);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -456,7 +456,7 @@ ula200_ftdi_rawdata(Driver *drvthis, unsigned char flags, unsigned char ch)
|
||||
// Displays a string
|
||||
//
|
||||
static int
|
||||
ula200_ftdi_string(Driver *drvthis, unsigned char *string, int len)
|
||||
ula200_ftdi_string(Driver *drvthis, const unsigned char *string, int len)
|
||||
{
|
||||
//PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
unsigned char buffer[128];
|
||||
@@ -626,7 +626,7 @@ ula200_init(Driver *drvthis)
|
||||
EmptyKeyRing(&p->keyring);
|
||||
|
||||
// Get and parse size
|
||||
s = drvthis->config_get_string( drvthis->name, "size", 0, "20x4");
|
||||
s = drvthis->config_get_string(drvthis->name, "size", 0, "20x4");
|
||||
if ((sscanf(s, "%dx%d", &(p->width), &(p->height)) != 2)
|
||||
|| (p->width <= 0) || (p->width > LCD_MAX_WIDTH)
|
||||
|| (p->height <= 0) || (p->height > LCD_MAX_HEIGHT)) {
|
||||
@@ -798,7 +798,7 @@ ula200_chr (Driver *drvthis, int x, int y, char ch)
|
||||
// Place a string in the framebuffer
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
ula200_string (Driver *drvthis, int x, int y, char *s)
|
||||
ula200_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = (PrivateData *) drvthis->private_data;
|
||||
int i;
|
||||
@@ -806,11 +806,11 @@ ula200_string (Driver *drvthis, int x, int y, char *s)
|
||||
x --; // Convert 1-based coords to 0-based
|
||||
y --;
|
||||
|
||||
for (i = 0; s[i]; i++) {
|
||||
for (i = 0; string[i] != '\0'; i++) {
|
||||
// Check for buffer overflows...
|
||||
if ((y * p->width) + x + i > (p->width * p->height))
|
||||
break;
|
||||
p->framebuf[(y*p->width) + x + i] = s[i];
|
||||
p->framebuf[(y*p->width) + x + i] = string[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -32,15 +32,15 @@ MODULE_EXPORT int ula200_init(Driver *drvthis);
|
||||
MODULE_EXPORT void ula200_close (Driver *drvthis);
|
||||
MODULE_EXPORT int ula200_width (Driver *drvthis);
|
||||
MODULE_EXPORT int ula200_height (Driver *drvthis);
|
||||
MODULE_EXPORT void ula200_clear (Driver * drvthis);
|
||||
MODULE_EXPORT void ula200_string (Driver * drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void ula200_chr (Driver * drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void ula200_set_char (Driver * drvthis, int n, char *dat);
|
||||
MODULE_EXPORT void ula200_backlight (Driver * drvthis, int on);
|
||||
MODULE_EXPORT void ula200_flush (Driver * drvthis);
|
||||
MODULE_EXPORT void ula200_vbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void ula200_hbar (Driver * drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void ula200_num (Driver * drvthis, int x, int num);
|
||||
MODULE_EXPORT int ula200_icon(Driver * drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void ula200_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void ula200_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void ula200_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void ula200_set_char (Driver *drvthis, int n, char *dat);
|
||||
MODULE_EXPORT void ula200_backlight (Driver *drvthis, int on);
|
||||
MODULE_EXPORT void ula200_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void ula200_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void ula200_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void ula200_num (Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT int ula200_icon(Driver *drvthis, int x, int y, int icon);
|
||||
|
||||
#endif /* ULA200_H */
|
||||
|
||||
@@ -261,7 +261,7 @@ sli_clear (Driver *drvthis)
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
//
|
||||
MODULE_EXPORT void
|
||||
sli_string (Driver *drvthis, int x, int y, char string[])
|
||||
sli_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -17,7 +17,7 @@ MODULE_EXPORT int sli_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int sli_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT void sli_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void sli_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void sli_string (Driver *drvthis, int x, int y, char *string);
|
||||
MODULE_EXPORT void sli_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void sli_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void sli_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
|
||||
@@ -228,7 +228,7 @@ xosdlib_drv_height (Driver *drvthis)
|
||||
* Clear screen
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
xosdlib_drv_clear (Driver * drvthis)
|
||||
xosdlib_drv_clear (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
@@ -265,7 +265,7 @@ xosdlib_drv_flush (Driver *drvthis)
|
||||
* upper-left is (1,1), and the lower right should be (p->width,p->height).
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
xosdlib_drv_string (Driver *drvthis, int x, int y, char string[])
|
||||
xosdlib_drv_string (Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int i;
|
||||
|
||||
@@ -40,7 +40,7 @@ MODULE_EXPORT int xosdlib_drv_width (Driver *drvthis);
|
||||
MODULE_EXPORT int xosdlib_drv_height (Driver *drvthis);
|
||||
MODULE_EXPORT void xosdlib_drv_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void xosdlib_drv_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void xosdlib_drv_string (Driver *drvthis, int x, int y, char string[]);
|
||||
MODULE_EXPORT void xosdlib_drv_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void xosdlib_drv_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void xosdlib_drv_vbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
|
||||
|
||||
Reference in New Issue
Block a user