Blame src/delay.h

Packit d36e9b
/*
Packit d36e9b
 * libieee1284 - IEEE 1284 library
Packit d36e9b
 * Copyright (C) 2001  Tim Waugh <twaugh@redhat.com>
Packit d36e9b
 *
Packit d36e9b
 * This program is free software; you can redistribute it and/or modify
Packit d36e9b
 * it under the terms of the GNU General Public License as published by
Packit d36e9b
 * the Free Software Foundation; either version 2 of the License, or
Packit d36e9b
 * (at your option) any later version.
Packit d36e9b
 *
Packit d36e9b
 * This program is distributed in the hope that it will be useful,
Packit d36e9b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit d36e9b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit d36e9b
 * GNU General Public License for more details.
Packit d36e9b
 *
Packit d36e9b
 * You should have received a copy of the GNU General Public License
Packit d36e9b
 * along with this program; if not, write to the Free Software
Packit d36e9b
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Packit d36e9b
 */
Packit d36e9b
Packit d36e9b
#ifndef _DELAY_H_
Packit d36e9b
#define _DELAY_H_
Packit d36e9b
Packit d36e9b
enum Delays {
Packit d36e9b
  IO_POLL_DELAY = 0,
Packit d36e9b
  TIMEVAL_SIGNAL_TIMEOUT = 1,
Packit d36e9b
  TIMEVAL_STROBE_DELAY = 2,
Packit d36e9b
};
Packit d36e9b
Packit d36e9b
static const long delay_table[] = {
Packit d36e9b
	1, /* IO_POLL_DELAY */
Packit d36e9b
	100000, /* TIMEVAL_SIGNAL_TIMEOUT */
Packit d36e9b
	1 /* TIMEVAL_STROBE_DELAY */  };
Packit d36e9b
				
Packit d36e9b
#define lookup_delay(which, tv) ((tv)->tv_sec = 0, \
Packit d36e9b
	(tv)->tv_usec = delay_table[which])
Packit d36e9b
Packit d36e9b
void udelay(unsigned long usec);
Packit d36e9b
Packit d36e9b
#endif /* _DELAY_H_ */
Packit d36e9b
Packit d36e9b
/*
Packit d36e9b
 * Local Variables:
Packit d36e9b
 * eval: (c-set-style "gnu")
Packit d36e9b
 * End:
Packit d36e9b
 */