diff options
Diffstat (limited to 'drv_Crystalfontz.c')
-rw-r--r-- | drv_Crystalfontz.c | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/drv_Crystalfontz.c b/drv_Crystalfontz.c index aef6fc1..0833629 100644 --- a/drv_Crystalfontz.c +++ b/drv_Crystalfontz.c @@ -1,4 +1,4 @@ -/* $Id: drv_Crystalfontz.c 728 2007-01-14 11:14:38Z michael $ +/* $Id: drv_Crystalfontz.c 781 2007-03-13 12:39:11Z michael $ * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/drv_Crystalfontz.c $ * * new style driver for Crystalfontz display modules @@ -104,7 +104,7 @@ typedef struct { static MODEL Models[] = { {626, "626", 2, 16, 0, 0, 1, 0}, - {631, "631", 2, 20, 0, 0, 3, 22}, + {631, "631", 2, 20, 4, 0, 3, 22}, {632, "632", 2, 16, 0, 0, 1, 0}, {633, "633", 2, 16, 4, 4, 2, 18}, {634, "634", 4, 20, 0, 0, 1, 0}, @@ -531,35 +531,53 @@ static int drv_CF_keypad(const int num) case 2: break; case 3: - if (num < 8) + if ((num < 8) || ((num > 12) && (num < 17))) val = WIDGET_KEY_PRESSED; else val = WIDGET_KEY_RELEASED; switch (num) { case 1: - case 8: + case 7: val += WIDGET_KEY_UP; break; case 2: - case 9: + case 8: val += WIDGET_KEY_DOWN; break; case 3: - case 10: + case 9: val += WIDGET_KEY_LEFT; break; case 4: - case 11: + case 10: val += WIDGET_KEY_RIGHT; break; case 5: - case 12: + case 11: val += WIDGET_KEY_CONFIRM; break; - case 7: - case 13: + case 6: + case 12: val += WIDGET_KEY_CANCEL; break; + + /* added for 631, too lazy to make new WIDGET_KEY defines */ + case 13: + case 17: + val += WIDGET_KEY_UP; /* really UPLEFT */ + break; + case 14: + case 18: + val += WIDGET_KEY_RIGHT; /* really UPRIGHT */ + break; + case 15: + case 19: + val += WIDGET_KEY_LEFT; /* really DOWNLEFT */ + break; + case 16: + case 20: + val += WIDGET_KEY_DOWN; /* really DOWNRIGHT */ + break; } break; } @@ -955,7 +973,7 @@ int drv_CF_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Rev: 728 $"); + info("%s: %s", Name, "$Rev: 781 $"); /* start display */ if ((ret = drv_CF_start(section)) != 0) { @@ -1076,8 +1094,8 @@ int drv_CF_quit(const int quiet) DRIVER drv_Crystalfontz = { - name:Name, - list:drv_CF_list, - init:drv_CF_init, - quit:drv_CF_quit, + .name = Name, + .list = drv_CF_list, + .init = drv_CF_init, + .quit = drv_CF_quit, }; |