Exemplo n.º 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;
}
Exemplo n.º 2
0
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;
}