mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-27 22:30:49 +00:00
Ensure the motor goes off for unselected drives.
This commit is contained in:
parent
49f0ab0f15
commit
5351ac560f
@ -48,8 +48,13 @@ void EXDos::set_control_register(uint8_t control) {
|
||||
get_drive(c).set_head(head);
|
||||
}
|
||||
|
||||
// Select drive.
|
||||
// Select drive, ensuring handover of the motor-on state.
|
||||
const bool motor_state = get_drive().get_motor_on();
|
||||
for_all_drives([] (Storage::Disk::Drive &drive, size_t) {
|
||||
drive.set_motor_on(false);
|
||||
});
|
||||
set_drive(control & 0xf);
|
||||
get_drive().set_motor_on(motor_state);
|
||||
}
|
||||
|
||||
uint8_t EXDos::get_control_register() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user