| 138 | } |
| 139 | |
| 140 | static void set_drive_flags(struct set_drive_frame* flags) |
| 141 | { |
| 142 | if (current_drive_flags.drive != flags->drive) |
| 143 | { |
| 144 | stop_motor(); |
| 145 | homed = false; |
| 146 | } |
| 147 | |
| 148 | current_drive_flags = *flags; |
| 149 | DRIVESELECT_REG_Write(flags->drive ? 2 : 1); /* select drive 1 or 0 */ |
| 150 | DENSITY_REG_Write(!flags->high_density); /* double density bit */ |
| 151 | INDEX_REG_Write(flags->index_mode); |
| 152 | } |
| 153 | |
| 154 | static void start_motor(void) |
| 155 | { |
no test coverage detected