Date:2011-06-23 18:17:31 (8 years 3 months ago)
Author:Werner Almesberger
Commit:d8363d853cca327be948d2691a336436cace02bb
Message:tools/lib/misctxrx.c (wait_for_interrupt): enforce a minimum timeout of 10 ms

Seems that just one millisecond isn't enough to get a byte from
the USB device, even if the byte is already waiting in the endpoint
FIFO there.
Files: tools/lib/misctxrx.c (2 diffs)

Change Details

tools/lib/misctxrx.c
2424#include "misctxrx.h"
2525
2626
27#define MIN_TIMEOUT_MS 10
28
29
2730/* ----- Interrupts -------------------------------------------------------- */
2831
2932
...... 
5962
6063    sigint = 0;
6164    old_sig = signal(SIGINT, die);
62    if (timeout_ms)
65    if (timeout_ms) {
66        if (timeout_ms < MIN_TIMEOUT_MS)
67            timeout_ms = MIN_TIMEOUT_MS;
6368        timeout_start(&to, timeout_ms);
69    }
6470    while (!sigint && !timedout) {
6571        while (!sigint && !timedout) {
6672            if (timeout_ms) {

Archive Download the corresponding diff file



interactive