IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2011-06-21 02:14:14 (12 years 9 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 10b6d88af91815681e16f8e44a803a6b35fffbdf |
Message: | libatrf: simplify use of atrf_interrupt_wait now this it is mandatory - lib/atrf.c (atrf_interrupt_wait): interrupt_wait is no longer optional - atrf-proxy/atrf-proxy.c (cmd_more): we no longer need to handle atrf_interrupt_wait being unsupported - lib/atusb-common.c (atusb_interrupt_wait): clarify what we don't want to return -1 on error |
Files: |
tools/atrf-proxy/atrf-proxy.c (1 diff) tools/lib/atrf.c (1 diff) tools/lib/atusb-common.c (1 diff) |
Change Details
tools/atrf-proxy/atrf-proxy.c | ||
---|---|---|
176 | 176 | res = atrf_interrupt_wait(dsc, n); |
177 | 177 | if (atrf_error(dsc)) |
178 | 178 | return netio_printf(netio, "-I/O error\n"); |
179 | if (res < 0) | |
180 | return netio_printf(netio, "-not supported\n"); | |
181 | 179 | return netio_printf(netio, "+0x%02x\n", res); |
182 | 180 | } |
183 | 181 | if (!strcasecmp(cmd, "getram")) { |
tools/lib/atrf.c | ||
---|---|---|
320 | 320 | |
321 | 321 | int atrf_interrupt_wait(struct atrf_dsc *dsc, int timeout_ms) |
322 | 322 | { |
323 | return dsc->driver->interrupt_wait ? | |
324 | dsc->driver->interrupt_wait(dsc->handle, timeout_ms) : -1; | |
323 | return dsc->driver->interrupt_wait(dsc->handle, timeout_ms); | |
325 | 324 | } |
tools/lib/atusb-common.c | ||
---|---|---|
221 | 221 | if (res < 0) { |
222 | 222 | fprintf(stderr, "usb_bulk_read: %d\n", res); |
223 | 223 | dsc->error = 1; |
224 | return 0; | |
225 | /* < 0 is already taken by atrf_interrupt_wait */ | |
224 | return 0; /* handle this via atrf_error */ | |
226 | 225 | } |
227 | 226 | timeout_ms = 1; |
228 | 227 | for (i = 0; i != res; i++) |