Lines Matching defs:counter
484 /* see if counter/timer in use */
485 if (dp->counter &&
489 /* program counter/timer only if necessary */
490 if (dp->counter != dp->ocounter) {
496 for (i = 0; i < DIVS && divs[i].speed <= dp->counter; i++) {
497 if (divs[i].speed == dp->counter) {
505 div = ((long)SCN_CLOCK/16/2 + dp->counter/2) / dp->counter;
520 dp->ocounter = dp->counter;
523 /* counter not in use; mark as free */
524 dp->counter = 0;
549 scniter(int *index, int wanted, int *counter, int *mode, struct chan *other,
576 * use of counter/timer
579 if (*counter != wanted && *counter != 0)
580 continue; /* counter busy */
581 *counter = wanted;
592 if (wanted <= 57600 && (*counter == wanted || *counter == 0)) {
593 *counter = wanted;
612 int counter;
635 * preferences, and use of counter timer?
639 * mode 0a and use counter/timer. Better solution might be
640 * mode 0b, leaving counter/timer free!
643 * leaving counter timer free, or not flipping A/B group?
649 * Find speed codes compatible with current mode/counter.
655 counter = dp->counter;
658 ic = scniter(&i, ispeed, &counter, &mode, ocp, c92);
663 if ((oc = scniter(&o, ospeed, &counter,
669 * save score,codes,mode,counter if score
689 counter = 0;
691 oic = scniter(&oi, ocp->ispeed, &counter, &mode, NULL, c92);
696 while ((ooc = scniter(&oo, ocp->ospeed, &counter,
699 while ((ic = scniter(&i, ispeed, &counter,
702 if ((oc = scniter(&o, ospeed, &counter,
709 * score,codes,mode,counter
736 dp->counter = counter;