Date:2011-06-06 02:47:02 (3 years 4 months ago)
Author:Werner Almesberger
Commit:33b0400e5314c36716a5807d88da24f5411b7cee
Message:atrf-gpio: accept 'o' as an alias for 'l'

This, while being slightly unsystematic, reduces the risk of confusing
"1" (one) and "l" (lower-case ell).

- tools/atrf-gpio/atben.c (do_atben), tools/atrf-gpio/atusb.c
(do_atusb): treat 'o' as an alias of 'l'
- tools/atrf-gpio/atrf-gpio.c (usage): list 'o' as alternative for 'l'
Files: tools/atrf-gpio/atben.c (1 diff)
tools/atrf-gpio/atrf-gpio.c (3 diffs)
tools/atrf-gpio/atusb.c (1 diff)

Change Details

tools/atrf-gpio/atben.c
159159            expect |= bit;
160160            /* fall through */
161161        case 'l':
162        case 'o':
162163            read |= bit;
163164            /* fall through */
164165        case 'z':
tools/atrf-gpio/atrf-gpio.c
118118" addr/value read and verify one byte from SRAM\n"
119119" #... comment\n\n"
120120" pattern is a sequence of the following characters:\n"
121" 0 = output a strong 0 1 = output a strong 1\n"
122" L = pull up, expect to read 0 H = pull up, expect to read 1\n"
123" l = no pull-up, expect to read 0 h = no pull-up, expect to read 1\n"
124" Z = pull up, don't read z = no pull-up, don't read\n"
125" x = don't care . = separator\n"
121" 0 = output a strong 0 1 = output a strong 1\n"
122" L = pull up, expect to read 0 H = pull up, expect to read 1\n"
123" l/o = no pull-up, expect to read 0 h = no pull-up, expect to read 1\n"
124" Z = pull up, don't read z = no pull-up, don't read\n"
125" x = don't care . = separator\n"
126126    , name, atrf_default_driver_name());
127127    exit(1);
128128}
...... 
134134 * H pull-up, read 1
135135 * L pull-up, read 0
136136 * h no pull-up, read 1
137 * l no pull-up, read 0
137 * l/o no pull-up, read 0
138138 * Z pull-up, don't read
139139 * z no pull-up, don't read
140140 * x don't care
...... 
168168        if (reg_op(NULL, argv[i], 0))
169169            continue;
170170        for (s = argv[i]; *s; s++)
171            if (!strchr("01HLhlZzx.", *s))
171            if (!strchr("01HLhloZzx.", *s))
172172                fprintf(stderr,
173173                    "invalid configuration '%c' in \"%s\"\n",
174174                    *s, argv[i]);
tools/atrf-gpio/atusb.c
160160            expect[port] |= bit;
161161            /* fall through */
162162        case 'l':
163        case 'o':
163164            read[port] |= bit;
164165            /* fall through */
165166        case 'z':

Archive Download the corresponding diff file

Branches:
buffer-frames
master



interactive