mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-12 09:25:19 +00:00
Switch and -> or for testing transitions from ::PlayingLow.
This commit is contained in:
@@ -233,11 +233,11 @@ void Audio::output() {
|
|||||||
action: percount, and not penhi
|
action: percount, and not penhi
|
||||||
|
|
||||||
-> State::Disabled (000)
|
-> State::Disabled (000)
|
||||||
if: perfin and not (AUDxON and not AUDxIP)
|
if: perfin and not (AUDxON or not AUDxIP)
|
||||||
action: None
|
action: None
|
||||||
|
|
||||||
-> State::PlayingHigh (010)
|
-> State::PlayingHigh (010)
|
||||||
if: perfin and AUDxON and not AUDxIP
|
if: perfin and (AUDxON or not AUDxIP)
|
||||||
action:
|
action:
|
||||||
1. pbufld
|
1. pbufld
|
||||||
2. percntrld
|
2. percntrld
|
||||||
@@ -258,7 +258,7 @@ void Audio::output() {
|
|||||||
|
|
||||||
AUDxIP Audio interrupt pending (input to channel from interrupt circuitry).
|
AUDxIP Audio interrupt pending (input to channel from interrupt circuitry).
|
||||||
|
|
||||||
AUDxIR Audio interrupt request (output from channel to interrupt circuitry)
|
AUDxIR Audio interrupt request (output from channel to interrupt circuitry).
|
||||||
|
|
||||||
intreq1 Interrupt request that combines with intreq2 to form AUDxIR.
|
intreq1 Interrupt request that combines with intreq2 to form AUDxIR.
|
||||||
|
|
||||||
@@ -510,17 +510,15 @@ template <> void Audio::Channel::begin_state<Audio::Channel::State::PlayingLow>(
|
|||||||
template <> bool Audio::Channel::output<Audio::Channel::State::PlayingLow>() {
|
template <> bool Audio::Channel::output<Audio::Channel::State::PlayingLow>() {
|
||||||
-- period_counter;
|
-- period_counter;
|
||||||
|
|
||||||
const bool dma_and_not_done = dma_enabled && !interrupt_pending;
|
if(!period_counter) {
|
||||||
|
const bool dma_or_no_interrupt = dma_enabled || !interrupt_pending;
|
||||||
if(!period_counter && !dma_and_not_done) {
|
if(dma_or_no_interrupt) {
|
||||||
return transit<State::PlayingLow, State::Disabled>();
|
return transit<State::PlayingLow, State::PlayingHigh>();
|
||||||
|
} else {
|
||||||
|
return transit<State::PlayingLow, State::Disabled>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!period_counter && dma_and_not_done) {
|
|
||||||
return transit<State::PlayingLow, State::PlayingHigh>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user