MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / wait_for_read

Method wait_for_read

src/dev/mouse.rs:278–295  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

276 }
277
278 fn wait_for_read(&mut self) -> Result<(), &'static str>
279 {
280 let timeout = 100_000;
281 for _ in 0..timeout
282 {
283 let value = unsafe
284 {
285 self.cmdport.read()
286 };
287
288 if (value & 0x1) == 0x1
289 {
290 return Ok(());
291 }
292 }
293
294 Err("[ERR] WAIT FOR MOUSE READ TIMEOUT")
295 }
296
297
298 fn wait_for_write(&mut self) -> Result<(), &'static str>

Callers 1

read_data_portMethod · 0.80

Calls 2

ErrEnum · 0.50
readMethod · 0.45

Tested by

no test coverage detected