mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-02-08 17:30:36 +00:00
atabasedevice: interrupt support.
This commit is contained in:
parent
4886b4d52a
commit
a4cac2df81
@ -143,3 +143,11 @@ void AtaBaseDevice::device_control(const uint8_t new_ctrl) {
|
|||||||
}
|
}
|
||||||
this->r_dev_ctrl = new_ctrl;
|
this->r_dev_ctrl = new_ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AtaBaseDevice::update_intrq(uint8_t new_intrq_state) {
|
||||||
|
if (!this->is_selected() || (this->r_dev_ctrl & IEN))
|
||||||
|
return;
|
||||||
|
|
||||||
|
this->intrq_state = new_intrq_state;
|
||||||
|
this->host_obj->report_intrq(new_intrq_state);
|
||||||
|
}
|
||||||
|
@ -53,12 +53,14 @@ public:
|
|||||||
virtual void device_reset(bool is_soft_reset);
|
virtual void device_reset(bool is_soft_reset);
|
||||||
virtual void device_set_signature();
|
virtual void device_set_signature();
|
||||||
void device_control(const uint8_t new_ctrl);
|
void device_control(const uint8_t new_ctrl);
|
||||||
|
void update_intrq(uint8_t new_intrq_state);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool is_selected() { return ((this->r_dev_head >> 4) & 1) == this->my_dev_id; };
|
bool is_selected() { return ((this->r_dev_head >> 4) & 1) == this->my_dev_id; };
|
||||||
|
|
||||||
uint8_t my_dev_id = 0; // my IDE device ID configured by the host
|
uint8_t my_dev_id = 0; // my IDE device ID configured by the host
|
||||||
uint8_t device_type = ata_interface::DEVICE_TYPE_UNKNOWN;
|
uint8_t device_type = ata_interface::DEVICE_TYPE_UNKNOWN;
|
||||||
|
uint8_t intrq_state = 0; // INTRQ deasserted
|
||||||
|
|
||||||
IdeChannel* host_obj = nullptr;
|
IdeChannel* host_obj = nullptr;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user