mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Be consistent in expression of logic.
This commit is contained in:
parent
f371221dba
commit
964d2d4fa4
@ -290,12 +290,12 @@ Cycles TimedInterruptSource::get_next_sequence_point() const {
|
|||||||
switch(rate_) {
|
switch(rate_) {
|
||||||
case InterruptRate::OnekHz:
|
case InterruptRate::OnekHz:
|
||||||
case InterruptRate::FiftyHz:
|
case InterruptRate::FiftyHz:
|
||||||
result = std::min(result, programmable_offset_ + (!programmable_level_)*programmble_reload(rate_));
|
result = std::min(result, programmable_offset_ + (!programmable_level_) * programmble_reload(rate_));
|
||||||
break;
|
break;
|
||||||
case InterruptRate::ToneGenerator0:
|
case InterruptRate::ToneGenerator0:
|
||||||
case InterruptRate::ToneGenerator1: {
|
case InterruptRate::ToneGenerator1: {
|
||||||
const auto &channel = channels_[int(rate_) - int(InterruptRate::ToneGenerator0)];
|
const auto &channel = channels_[int(rate_) - int(InterruptRate::ToneGenerator0)];
|
||||||
const int cycles_until_interrupt = channel.value + 1 + (channel.level ? 0 : channel.reload + 1);
|
const int cycles_until_interrupt = channel.value + 1 + (!channel.level) * (channel.reload + 1);
|
||||||
result = std::min(result, cycles_until_interrupt);
|
result = std::min(result, cycles_until_interrupt);
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user