(&mut self)
| 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> |
no test coverage detected