/* timer for display redraw (set to zero for "direct updates") */
static int update = 0;
+/* USB read timeout in ms (the picoLCD 256x64 times out on every read
+ unless a key has been pressed!) */
+static int read_timeout = 0;
+
static char Name[] = "picoLCDGraphic";
static unsigned char *pLG_framebuffer;
static int drv_pLG_read(unsigned char *data, int size)
{
- return usb_interrupt_read(lcd, USB_ENDPOINT_IN + 1, (char *) data, size, 1000);
+ return usb_interrupt_read(lcd, USB_ENDPOINT_IN + 1, (char *) data, size, read_timeout);
}
/* set display redraw interval (set to zero for "direct updates") */
cfg_number(section, "update", 200, 0, -1, &update);
+ /* USB read timeout in ms (the picoLCD 256x64 times out on every
+ read unless a key has been pressed!) */
+ cfg_number(section, "Timeout", 5, 0, -1, &read_timeout);
+
s = cfg_get(section, "Size", NULL);
if (s == NULL || *s == '\0') {
error("%s: no '%s.Size' entry from %s", Name, section, cfg_source());