mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-21 21:33:54 +00:00
Apply changes on trailing edges only.
This commit is contained in:
parent
66bc1fd6fd
commit
54f1c31c94
@ -175,8 +175,8 @@ void Chipset::DiskController::set_mtr_sel_side_dir_step(uint8_t value) {
|
|||||||
const bool is_selected = !(value & select_mask);
|
const bool is_selected = !(value & select_mask);
|
||||||
|
|
||||||
// Both the motor state and the ID shifter are affected upon
|
// Both the motor state and the ID shifter are affected upon
|
||||||
// changes in drive selection only.
|
// the trailing edge of changes in drive selection only.
|
||||||
if(difference & select_mask) {
|
if(difference & select_mask & ~value) {
|
||||||
// If transitioning to inactive, shift the drive ID value;
|
// If transitioning to inactive, shift the drive ID value;
|
||||||
// if transitioning to active, possibly reset the drive
|
// if transitioning to active, possibly reset the drive
|
||||||
// ID and definitely latch the new motor state.
|
// ID and definitely latch the new motor state.
|
||||||
|
Loading…
Reference in New Issue
Block a user