Fix No
This commit is contained in:
parent
f8028de6c3
commit
1b563f1335
|
@ -31,7 +31,7 @@ struct XAPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
void change_channel(int8_t step) {
|
void change_channel(int8_t step) {
|
||||||
this->channel = (this->channel + step)%MaxChannels;
|
this->channel = static_cast<uint8_t>((this->channel + step))%MaxChannels;
|
||||||
CDXA::set_channel(this->channel);
|
CDXA::set_channel(this->channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,21 +15,21 @@ namespace JabyEngine {
|
||||||
Error,
|
Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern State current_state;
|
extern State current_state;
|
||||||
extern uint8_t cmd_interrupt_bit;
|
extern volatile uint8_t cmd_interrupt_bit;
|
||||||
|
|
||||||
struct Command {
|
struct Command {
|
||||||
static void wait_completed() {
|
static void wait_completed() {
|
||||||
while(const_cast<volatile uint8_t&>(cmd_interrupt_bit) > 0);
|
while(cmd_interrupt_bit > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename...ARGS>
|
template<typename...ARGS>
|
||||||
static void send(IOPort<CD_IO::CommandFifo>& cmd_fifo, IOPort<CD_IO::ParameterFifo>& parameter_fifo, CD_IO::Command::Desc cmd, ARGS...args) {
|
static void send(IOPort<CD_IO::CommandFifo>& cmd_fifo, IOPort<CD_IO::ParameterFifo>& parameter_fifo, CD_IO::Command::Desc cmd, ARGS...args) {
|
||||||
while(CD_IO::IndexStatus.read().is_set(CD_IO::IndexStatus::IsTransmissionBusy));
|
while(CD_IO::IndexStatus.read().is_set(CD_IO::IndexStatus::IsTransmissionBusy));
|
||||||
|
|
||||||
|
cmd_interrupt_bit = bit::set(0, cmd.complete_irq);
|
||||||
((parameter_fifo.write(CD_IO::ParameterFifo{args})),...);
|
((parameter_fifo.write(CD_IO::ParameterFifo{args})),...);
|
||||||
cmd_fifo.write(CD_IO::CommandFifo {cmd.id});
|
cmd_fifo.write(CD_IO::CommandFifo {cmd.id});
|
||||||
cmd_interrupt_bit = bit::set(0, cmd.complete_irq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, typename...ARGS>
|
template<typename T, typename...ARGS>
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace JabyEngine {
|
||||||
static SectorBufferAllocator sector_allocator;
|
static SectorBufferAllocator sector_allocator;
|
||||||
static File cur_file;
|
static File cur_file;
|
||||||
|
|
||||||
uint8_t cmd_interrupt_bit = 0;
|
volatile uint8_t cmd_interrupt_bit = 0;
|
||||||
State current_state = State::Ready;
|
State current_state = State::Ready;
|
||||||
SysCall::InterrupCallback callback = {
|
SysCall::InterrupCallback callback = {
|
||||||
.next = nullptr,
|
.next = nullptr,
|
||||||
|
|
Loading…
Reference in New Issue