Lines Matching refs:iot
61 #define MPU_GETSTATUS(iot, ioh) (bus_space_read_1(iot, ioh, MPU_STATUS)) argument
85 if (MPU_GETSTATUS(sc->iot, sc->ioh) == 0xff) { in mpu_find()
103 if (!(MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_OUTPUT_BUSY)) in mpu_waitready()
113 bus_space_tag_t iot = sc->iot; in mpu_reset() local
122 bus_space_write_1(iot, ioh, MPU_COMMAND, MPU_RESET); in mpu_reset()
124 if (!(MPU_GETSTATUS(iot, ioh) & MPU_INPUT_EMPTY) && in mpu_reset()
125 bus_space_read_1(iot, ioh, MPU_DATA) == MPU_ACK) { in mpu_reset()
148 bus_space_write_1(sc->iot, sc->ioh, MPU_COMMAND, MPU_UART_MODE); in mpu_open()
170 bus_space_tag_t iot = sc->iot; in mpu_readinput() local
174 while(!(MPU_GETSTATUS(iot, ioh) & MPU_INPUT_EMPTY)) { in mpu_readinput()
175 data = bus_space_read_1(iot, ioh, MPU_DATA); in mpu_readinput()
191 if (!(MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_INPUT_EMPTY)) { in mpu_output()
194 if (MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_OUTPUT_BUSY) in mpu_output()
196 if (MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_OUTPUT_BUSY) in mpu_output()
198 bus_space_write_1(sc->iot, sc->ioh, MPU_DATA, d); in mpu_output()
215 if (MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_INPUT_EMPTY) { in mpu_intr()