From: Martin Z. <co...@mz...> - 2010-02-13 23:25:48
|
Hello everybody, I had written that polling the button states using LCD::GPI(1) considerably slows down output on my picoLCD 256x64 and located the problem in this function: static int drv_pLG_read(unsigned char *data, int size) { return usb_interrupt_read(lcd, USB_ENDPOINT_IN + 1, (char *) data, size, 1000); } On second thoughts, I have made the mistake to think that this function times out *every* time. When a key is pressed, however, the function exits directly and thus only times out when no data are present for usb_interrupt_read(). This means that the time-out value is *much* too high. The driver usually waits a *full second* for key data before going on and doing (more important) things like updating the LCD. As this makes the display rather unresponsive, I think that the time-out value should be changed. My problem is that I don't know what time-out value should be used. I have experimented a little: 1 ms is too low, while 2 ms work fine on my desktop. On my embedded system, 3 ms are needed. But what about people using the display with an old USB 1.0 port? I propose 5 ms or 10 ms -- what do you think? Thanks, Martin -- www.mzuther.de www.radix-musik.de |