Prepare no-wait send for future use
This commit is contained in:
parent
ba016104f0
commit
113d32949a
|
@ -28,9 +28,7 @@ namespace JabyEngine {
|
|||
}
|
||||
|
||||
template<typename...ARGS>
|
||||
static void send(CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
Command::wait_completed();
|
||||
|
||||
static void send_no_wait(CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
while(CD_IO::IndexStatus.read().is_set(CD_IO::IndexStatus::IsTransmissionBusy));
|
||||
|
||||
irq_bit_pending = bit::set(irq_bit_pending, cmd.complete_irq);
|
||||
|
@ -39,6 +37,12 @@ namespace JabyEngine {
|
|||
CD_IO::PortIndex0::CommandFifo.write(CD_IO::CommandFifo{cmd.id});
|
||||
}
|
||||
|
||||
template<typename...ARGS>
|
||||
static void send(CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
Command::wait_completed();
|
||||
Command::send_no_wait(cmd, args...);
|
||||
}
|
||||
|
||||
template<typename...ARGS>
|
||||
static void send_wait_response(CD_IO::Command::Desc cmd, ARGS...args) {
|
||||
Command::send(cmd, args...);
|
||||
|
|
Loading…
Reference in New Issue