add get_free_chars() method
This commit is contained in:
@@ -1261,6 +1261,18 @@ char bignum_map[11][4][3] = {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Gets number of custom chars (always NUM_CCs)
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
CFontzPacket_get_free_chars (Driver *drvthis)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
|
||||
return NUM_CCs;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sets a custom character from 0 - (NUM_CCs-1)
|
||||
*
|
||||
|
||||
@@ -35,7 +35,9 @@ MODULE_EXPORT void CFontzPacket_vbar (Driver *drvthis, int x, int y, int len, in
|
||||
MODULE_EXPORT void CFontzPacket_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void CFontzPacket_num (Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT int CFontzPacket_icon(Driver *drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void CFontzPacket_cursor (Driver *drvthis, int x, int y, int state);
|
||||
|
||||
MODULE_EXPORT int CFontzPacket_get_free_chars (Driver *drvthis);
|
||||
MODULE_EXPORT void CFontzPacket_set_char (Driver *drvthis, int n, char *dat);
|
||||
|
||||
MODULE_EXPORT int CFontzPacket_get_contrast (Driver *drvthis);
|
||||
|
||||
@@ -1020,6 +1020,46 @@ char bignum_map[11][4][3] = {
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* API: set cursor position and state
|
||||
*/
|
||||
/* not yet tested (needs input)
|
||||
* maybe better: set only variables here and update when flushing
|
||||
MODULE_EXPORT void
|
||||
IOWarrior_cursor (Driver *drvthis, int x, int y, int state)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
iowlcd_set_pos(p->udh, x, y);
|
||||
|
||||
switch (state) {
|
||||
case CURSOR_OFF:
|
||||
iowlcd_display_on_off(p->udh, 1, 0, 0);
|
||||
break;
|
||||
case CURSOR_UNDER:
|
||||
iowlcd_display_on_off(p->udh, 1, 1, 0);
|
||||
break;
|
||||
case CURSOR_BLOCK:
|
||||
case CURSOR_DEFAULT_ON:
|
||||
default:
|
||||
iowlcd_display_on_off(p->udh, 1, 1, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* API: get number of custom chars (always NUM_CCs)
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
IOWarrior_get_free_chars (Driver *drvthis)
|
||||
{
|
||||
//PrivateData *p = drvthis->private_data;
|
||||
|
||||
return NUM_CCs;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* API: Sets a custom character from 0 - (NUM_CCs-1)
|
||||
*
|
||||
|
||||
@@ -129,6 +129,7 @@ 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);
|
||||
MODULE_EXPORT void IOWarrior_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
|
||||
MODULE_EXPORT void IOWarrior_num(Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT int IOWarrior_get_free_chars(Driver *drvthis);
|
||||
MODULE_EXPORT void IOWarrior_set_char(Driver *drvthis, int n, char *dat);
|
||||
MODULE_EXPORT int IOWarrior_icon(Driver *drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT void IOWarrior_output(Driver *drvthis, int on);
|
||||
|
||||
Reference in New Issue
Block a user