Clean-up code a bit
This commit is contained in:
parent
2e8cb91027
commit
c26623ecef
|
@ -4,9 +4,8 @@
|
||||||
namespace JabyEngine {
|
namespace JabyEngine {
|
||||||
namespace CD {
|
namespace CD {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
extern State current_state;
|
extern State current_state;
|
||||||
extern CD_IO::Interrupt::Type last_interrupt;
|
extern uint8_t cmd_interrupt_bit;
|
||||||
extern uint8_t cmd_interrupt_bit;
|
|
||||||
|
|
||||||
struct Command {
|
struct Command {
|
||||||
static void wait_completed() {
|
static void wait_completed() {
|
||||||
|
|
|
@ -16,7 +16,6 @@ namespace JabyEngine {
|
||||||
static uint32_t cur_lba;
|
static uint32_t cur_lba;
|
||||||
static uint32_t dst_lba;
|
static uint32_t dst_lba;
|
||||||
|
|
||||||
CD_IO::Interrupt::Type last_interrupt = CD_IO::Interrupt::Type::None;
|
|
||||||
uint8_t cmd_interrupt_bit = 0;
|
uint8_t cmd_interrupt_bit = 0;
|
||||||
State current_state = State::Free;
|
State current_state = State::Free;
|
||||||
SysCall::InterrupCallback callback = {
|
SysCall::InterrupCallback callback = {
|
||||||
|
@ -84,7 +83,6 @@ namespace JabyEngine {
|
||||||
|
|
||||||
CD_IO::PortIndex1::change_to();
|
CD_IO::PortIndex1::change_to();
|
||||||
const auto cur_irq = CD_IO::Interrupt::get_type(CD_IO::PortIndex1::InterruptFlag);
|
const auto cur_irq = CD_IO::Interrupt::get_type(CD_IO::PortIndex1::InterruptFlag);
|
||||||
last_interrupt = cur_irq;
|
|
||||||
CD_IO::Interrupt::ack_extended(CD_IO::PortIndex1::InterruptFlag);
|
CD_IO::Interrupt::ack_extended(CD_IO::PortIndex1::InterruptFlag);
|
||||||
|
|
||||||
cmd_interrupt_bit = bit::clear(cmd_interrupt_bit, cur_irq);
|
cmd_interrupt_bit = bit::clear(cmd_interrupt_bit, cur_irq);
|
||||||
|
|
Loading…
Reference in New Issue