IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2011-04-10 22:34:46 (12 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 7be700df117fd33c76d96eca9a801502a88329cc |
Message: | tools/lib/atrf.c: perform driver-specific operations only if using
that driver - atrf.c (atrf_usb_handle): only return the handle if using the atusb driver - atrf.c (atrf_ben_regs): only call atben_regs if using the atben driver |
Files: |
tools/lib/atrf.c (1 diff) |
Change Details
tools/lib/atrf.c | ||
---|---|---|
31 | 31 | void *atrf_usb_handle(struct atrf_dsc *dsc) |
32 | 32 | { |
33 | 33 | #ifdef HAVE_USB |
34 | return dsc->handle; | |
35 | #else | |
36 | return NULL; | |
34 | if (dsc->driver == &atusb_driver) | |
35 | return dsc->handle; | |
37 | 36 | #endif |
37 | return NULL; | |
38 | 38 | } |
39 | 39 | |
40 | 40 | |
41 | 41 | void *atrf_ben_regs(struct atrf_dsc *dsc) |
42 | 42 | { |
43 | 43 | #ifdef HAVE_BEN |
44 | return atben_regs(dsc->handle); | |
45 | #else | |
46 | return NULL; | |
44 | if (dsc->driver == &atben_driver) | |
45 | return atben_regs(dsc->handle); | |
47 | 46 | #endif |
47 | return NULL; | |
48 | 48 | } |
49 | 49 | |
50 | 50 |