aboutsummaryrefslogtreecommitdiffstats
path: root/lcd4linux.conf.sample (follow)
AgeCommit message (Expand)AuthorFilesLines
2004-05-31[lcd4linux @ 2004-05-31 21:05:13 by reinelt]reinelt1-0/+11
2004-05-31[lcd4linux @ 2004-05-31 06:24:42 by reinelt]reinelt1-2/+2
2004-05-30[lcd4linux @ 2004-05-30 08:25:50 by reinelt]reinelt1-4/+16
2004-05-29[lcd4linux @ 2004-05-29 15:53:28 by reinelt]reinelt1-6/+6
2004-05-29[lcd4linux @ 2004-05-29 01:07:56 by reinelt]reinelt1-16/+16
2004-05-29[lcd4linux @ 2004-05-29 00:27:14 by reinelt]reinelt1-0/+6
2004-05-28[lcd4linux @ 2004-05-28 13:51:41 by reinelt]reinelt1-6/+6
2004-05-26[lcd4linux @ 2004-05-26 11:37:35 by reinelt]reinelt1-3/+9
2004-05-26[lcd4linux @ 2004-05-26 05:03:24 by reinelt]reinelt1-2/+11
2004-05-25[lcd4linux @ 2004-05-25 14:26:28 by reinelt]reinelt1-1/+15
2004-05-23[lcd4linux @ 2004-05-23 08:58:30 by reinelt]reinelt1-2/+5
2004-05-22[lcd4linux @ 2004-05-22 18:30:01 by reinelt]reinelt1-4/+13
2004-04-12[lcd4linux @ 2004-04-12 04:55:59 by reinelt]reinelt1-2/+2
2004-04-08[lcd4linux @ 2004-04-08 11:59:26 by reinelt]reinelt1-0/+8
2004-03-21[lcd4linux @ 2004-03-21 22:05:53 by reinelt]reinelt1-14/+14
2004-03-20[lcd4linux @ 2004-03-20 23:09:01 by reinelt]reinelt1-0/+38
2004-03-13[lcd4linux @ 2004-03-13 06:49:20 by reinelt]reinelt1-0/+6
2004-03-08[lcd4linux @ 2004-03-08 16:26:26 by reinelt]reinelt1-1/+1
2004-03-01[lcd4linux @ 2004-03-01 04:29:51 by reinelt]reinelt1-8/+13
2004-02-29[lcd4linux @ 2004-02-29 17:09:53 by reinelt]reinelt1-2/+2
2004-02-24[lcd4linux @ 2004-02-24 05:54:57 by reinelt]reinelt1-9/+22
2004-02-23[lcd4linux @ 2004-02-23 06:44:27 by reinelt]reinelt1-0/+16
2004-02-22[lcd4linux @ 2004-02-22 17:35:41 by reinelt]reinelt1-11/+61
2004-02-18[lcd4linux @ 2004-02-18 06:39:20 by reinelt]reinelt1-1/+29
2004-02-15[lcd4linux @ 2004-02-15 21:43:43 by reinelt]reinelt1-1/+13
2004-02-15[lcd4linux @ 2004-02-15 08:22:47 by reinelt]reinelt1-2/+11
2004-02-15[lcd4linux @ 2004-02-15 07:23:04 by reinelt]reinelt1-0/+9
2004-02-14[lcd4linux @ 2004-02-14 11:56:11 by reinelt]reinelt1-3/+16
2004-02-05[lcd4linux @ 2004-02-05 07:10:23 by reinelt]reinelt1-9/+9
2004-02-04[lcd4linux @ 2004-02-04 19:10:51 by reinelt]reinelt1-1/+3
2004-01-30[lcd4linux @ 2004-01-30 20:57:55 by reinelt]reinelt1-2/+11
2004-01-29[lcd4linux @ 2004-01-29 04:40:02 by reinelt]reinelt1-2/+2
2004-01-27[lcd4linux @ 2004-01-27 08:13:39 by reinelt]reinelt1-0/+1
2004-01-25[lcd4linux @ 2004-01-25 05:30:08 by reinelt]reinelt1-1/+10
2004-01-23[lcd4linux @ 2004-01-23 07:04:03 by reinelt]reinelt1-5/+94
2004-01-23[lcd4linux @ 2004-01-23 04:53:23 by reinelt]reinelt1-0/+18
2004-01-22[lcd4linux @ 2004-01-22 07:57:45 by reinelt]reinelt1-5/+27
2004-01-21[lcd4linux @ 2004-01-21 06:39:27 by reinelt]reinelt1-0/+1
2004-01-20[lcd4linux @ 2004-01-20 15:32:48 by reinelt]reinelt1-7/+18
2004-01-20[lcd4linux @ 2004-01-20 12:45:47 by reinelt]reinelt1-1/+12
2004-01-20[lcd4linux @ 2004-01-20 05:36:59 by reinelt]reinelt1-1/+1
2004-01-20[lcd4linux @ 2004-01-20 04:51:39 by reinelt]reinelt1-5/+14
2004-01-18[lcd4linux @ 2004-01-18 09:01:45 by reinelt]reinelt1-0/+12
2004-01-16[lcd4linux @ 2004-01-16 05:04:53 by reinelt]reinelt1-1/+1
2004-01-15[lcd4linux @ 2004-01-15 07:47:02 by reinelt]reinelt1-21/+22
2004-01-15[lcd4linux @ 2004-01-15 04:29:45 by reinelt]reinelt1-323/+76
2003-10-27[lcd4linux @ 2003-10-27 09:05:42 by reinelt]reinelt1-77/+251
2002-08-17[lcd4linux @ 2002-08-17 13:10:22 by reinelt]reinelt1-0/+4
2001-03-15[lcd4linux @ 2001-03-15 14:25:05 by ltoetsch]ltoetsch1-6/+10
2001-03-15[lcd4linux @ 2001-03-15 09:47:13 by reinelt]reinelt1-6/+6
pan> char *Section = NULL; static char *Driver = NULL; static int GPI[MAX_GPIS]; static int GPO[MAX_GPOS]; int GPOS = 0; int GPIS = 0; int (*drv_generic_gpio_real_set) () = NULL; int (*drv_generic_gpio_real_get) () = NULL; static void drv_generic_gpio_plugin_gpi(RESULT * result, RESULT * arg1) { int num; double val; num = R2N(arg1); if (num <= 0 || num > GPIS) { error("%s::GPI(%d): GPI out of range (1..%d)", Driver, num, GPIS); SetResult(&result, R_STRING, ""); return; } val = drv_generic_gpio_get(num - 1); SetResult(&result, R_NUMBER, &val); } static void drv_generic_gpio_plugin_gpo(RESULT * result, const int argc, RESULT * argv[]) { int num, val; double gpo; switch (argc) { case 1: num = R2N(argv[0]); if (num <= 0 || num > GPOS) { error("%s::GPO(%d): GPO out of range (1..%d)", Driver, num, GPOS); SetResult(&result, R_STRING, ""); return; } gpo = GPO[num - 1]; SetResult(&result, R_NUMBER, &gpo); break; case 2: num = R2N(argv[0]); val = R2N(argv[1]); if (num <= 0 || num > GPOS) { error("%s::GPO(%d): GPO out of range (1..%d)", Driver, num, GPOS); SetResult(&result, R_STRING, ""); return; } if (GPO[num - 1] != val) { if (drv_generic_gpio_real_set) GPO[num - 1] = drv_generic_gpio_real_set(num - 1, val); } gpo = GPO[num - 1]; SetResult(&result, R_NUMBER, &gpo); break; default: error("%s::GPO(): wrong number of parameters", Driver); SetResult(&result, R_STRING, ""); } } int drv_generic_gpio_init(const char *section, const char *driver) { WIDGET_CLASS wc; Section = (char *) section; Driver = (char *) driver; info("%s: using %d GPI's and %d GPO's", Driver, GPIS, GPOS); /* reset all GPO's */ drv_generic_gpio_clear(); /* register gpo widget */ wc = Widget_GPO; wc.draw = drv_generic_gpio_draw; widget_register(&wc); /* register plugins */ AddFunction("LCD::GPI", 1, drv_generic_gpio_plugin_gpi); AddFunction("LCD::GPO", -1, drv_generic_gpio_plugin_gpo); return 0; } int drv_generic_gpio_clear(void) { int i; /* clear GPI buffer */ for (i = 0; i < MAX_GPIS; i++) { GPI[i] = 0; } /* clear GPO buffer */ for (i = 0; i < MAX_GPOS; i++) { GPO[i] = 0; } /* really clear GPO's */ for (i = 0; i < GPOS; i++) { if (drv_generic_gpio_real_set) GPO[i] = drv_generic_gpio_real_set(i, 0); } return 0; } int drv_generic_gpio_get(const int num) { int val = 0; if (num < 0 || num >= GPIS) { error("%s: gpio_get(%d): GPI out of range (0..%d)", Driver, num + 1, GPIS); return -1; } if (drv_generic_gpio_real_get) val = drv_generic_gpio_real_get(num); GPI[num] = val; return val; } int drv_generic_gpio_draw(WIDGET * W) { WIDGET_GPO *gpo = W->data; int num, val; num = W->row; val = P2N(&gpo->expression); if (num < 0 || num >= GPOS) { error("%s: gpio_draw(%d): GPO out of range (0..%d)", Driver, num + 1, GPOS); return -1; } if (GPO[num] != val) { if (drv_generic_gpio_real_set) GPO[num] = drv_generic_gpio_real_set(num, val); } return 0; } int drv_generic_gpio_quit(void) { info("%s: shutting down GPIO driver.", Driver); drv_generic_gpio_clear(); return 0; }