+ case PATTERN_WALKING_ONE:
+ /* j contains the value of the highest bit */
+ j = 1 << (devc->num_logic_channels - 1);
+ for (i = 0; i < size; i++) {
+ devc->logic_data[i] = devc->step;
+ if (devc->step == 0)
+ devc->step = 1;
+ else
+ if (devc->step == j)
+ devc->step = 0;
+ else
+ devc->step <<= 1;
+ }
+ break;
+ case PATTERN_WALKING_ZERO:
+ /* Same as walking one, only with inverted output */
+ /* j contains the value of the highest bit */
+ j = 1 << (devc->num_logic_channels - 1);
+ for (i = 0; i < size; i++) {
+ devc->logic_data[i] = ~devc->step;
+ if (devc->step == 0)
+ devc->step = 1;
+ else
+ if (devc->step == j)
+ devc->step = 0;
+ else
+ devc->step <<= 1;
+ }
+ break;