Date:2011-06-21 04:15:30 (12 years 9 months ago)
Author:Werner Almesberger
Commit:b0b04ed226984ba52dcbf343a0381ddaea4d6f97
Message:tools/atrf-gpio/atusb.c (restore_gpios): send ATUSB_GPIO_CLEANUP

Files: tools/atrf-gpio/atusb.c (2 diffs)

Change Details

tools/atrf-gpio/atusb.c
2323
2424
2525#define FROM_DEV ATUSB_FROM_DEV(0)
26#define TO_DEV ATUSB_TO_DEV(0)
2627
2728
2829static const char *name[24] = {
...... 
105106
106107static void restore_gpios(void)
107108{
108    int i;
109    int i, res;
109110
110111    for (i = 0; i != 3; i++)
111112        gpio(orig_dsc, i+1, orig_data+i, orig_dir+i, 0xff);
113
114    res = usb_control_msg(atrf_usb_handle(orig_dsc),
115        TO_DEV, ATUSB_GPIO_CLEANUP, 0, 0, NULL, 0, 1000);
116    if (res < 0) {
117        fprintf(stderr, "ATUSB_GPIO_CLEANUP: %s\n", usb_strerror());
118        _exit(1);
119    }
112120}
113121
114122

Archive Download the corresponding diff file



interactive