コード例 #1
0
static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip)
{
	int timeout;

	for (timeout = 1000; timeout-- > 0; udelay(10))
		if (inb(AD1816A_REG(AD1816A_CHIP_STATUS)) & AD1816A_READY)
			return 0;

	snd_printk(KERN_WARNING "chip busy.\n");
	return -EBUSY;
}
コード例 #2
0
static inline void snd_ad1816a_out(struct snd_ad1816a *chip, unsigned char reg,
			    unsigned char value)
{
	snd_ad1816a_busy_wait(chip);
	outb(value, AD1816A_REG(reg));
}
コード例 #3
0
static inline unsigned char snd_ad1816a_in(struct snd_ad1816a *chip, unsigned char reg)
{
	snd_ad1816a_busy_wait(chip);
	return inb(AD1816A_REG(reg));
}
コード例 #4
0
inline unsigned char snd_ad1816a_in(ad1816a_t *chip, unsigned char reg)
{
	snd_ad1816a_busy_wait(chip);
	return inb(AD1816A_REG(reg));
}