예제 #1
0
static void
iicbb_setscl(device_t dev, int val, int timeout)
{
	int k = 0;

	IICBB_SETSCL(device_get_parent(dev), val);
	DELAY(IIC_DELAY);

	while (val && !I2C_GETSCL(dev) && k++ < timeout) {
		IICBB_SETSCL(device_get_parent(dev), val);
		DELAY(IIC_DELAY);
	}
		
	return;
}
예제 #2
0
파일: iicbb.c 프로젝트: coyizumi/cs111
static void
iicbb_setscl(device_t dev, int val, int timeout)
{
	struct iicbb_softc *sc = device_get_softc(dev);
	int k = 0;

	IICBB_SETSCL(device_get_parent(dev), val);
	DELAY(sc->udelay);

	while (val && !I2C_GETSCL(dev) && k++ < timeout) {
		IICBB_SETSCL(device_get_parent(dev), val);
		DELAY(sc->udelay);
	}

	return;
}