| 694 | } |
| 695 | |
| 696 | static void cmd_erase(struct erase_frame* f) |
| 697 | { |
| 698 | SIDE_REG_Write(f->side); |
| 699 | seek_to(current_track); |
| 700 | /* Disk is now spinning. */ |
| 701 | |
| 702 | print("start erasing"); |
| 703 | hardsec_index_threshold = f->hardsec_threshold_ms; |
| 704 | index_irq = false; |
| 705 | while (!index_irq) |
| 706 | ; |
| 707 | ERASE_REG_Write(1); |
| 708 | index_irq = false; |
| 709 | while (!index_irq) |
| 710 | ; |
| 711 | ERASE_REG_Write(0); |
| 712 | hardsec_index_threshold = 0; |
| 713 | print("stop erasing"); |
| 714 | |
| 715 | DECLARE_REPLY_FRAME(struct any_frame, F_FRAME_ERASE_REPLY); |
| 716 | send_reply((struct any_frame*) &r); |
| 717 | } |
| 718 | |
| 719 | static void cmd_set_drive(struct set_drive_frame* f) |
| 720 | { |
no test coverage detected