MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / erase

Method erase

lib/usb/fluxengineusb.cc:292–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290 }
291
292 void erase(int side, nanoseconds_t hardSectorThreshold) override
293 {
294 struct erase_frame f = {
295 .f = {.type = F_FRAME_ERASE_CMD, .size = sizeof(f)},
296 .side = (uint8_t)side,
297 };
298 f.hardsec_threshold_ms =
299 (hardSectorThreshold + 5e5) / 1e6; /* round to nearest ms */
300 usb_cmd_send(&f, f.f.size);
301
302 await_reply<struct any_frame>(F_FRAME_ERASE_REPLY);
303 }
304
305 void setDrive(int drive, bool high_density, int index_mode) override
306 {

Callers 1

usbEraseFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected