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

Method reset

src/fs/ata.rs:301–317  ·  view source on GitHub ↗

RESET

(&mut self)

Source from the content-addressed store, hash-verified

299
300 // RESET
301 fn reset(&mut self)
302 {
303 unsafe
304 {
305 // SET SRST
306 self.ctl_reg.write(4);
307
308 // Wait for 5 nanoseconds
309 self.wait(5);
310
311 // Clear ctl_reg
312 self.ctl_reg.write(0);
313
314 // Wait for 2000 nanoseconds (2 milliseconds)
315 self.wait(2000);
316 }
317 }
318
319
320 // SETUP PIO

Callers

nothing calls this directly

Calls 2

waitMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected