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

Method send_cmd

src/dev/mouse.rs:236–247  ·  view source on GitHub ↗
(&mut self, cmd: Cmd)

Source from the content-addressed store, hash-verified

234 }
235
236 fn send_cmd(&mut self, cmd: Cmd) -> Result<(), &'static str>
237 {
238 self.write_cmd_port(0xD4)?;
239 self.write_data_port(cmd as u8)?;
240
241 if self.read_data_port()? != 0xFA
242 {
243 return Err("[ERR] MOUSE IS UNRESPONSIVE");
244 }
245
246 Ok(())
247 }
248
249 fn sign_ext(&self, packet: u8) -> i16
250 {

Callers 1

initMethod · 0.80

Calls 4

write_cmd_portMethod · 0.80
write_data_portMethod · 0.80
read_data_portMethod · 0.80
ErrEnum · 0.50

Tested by

no test coverage detected