mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 05:29:43 +00:00
atabasedevice: Set dev_id.
Extracted from @Wack0's Wack0/dingusppc-nt@529991bd78 Co-authored-by: Rairii <2650838+Wack0@users.noreply.github.com>
This commit is contained in:
parent
7d6e87a0d3
commit
7fdfd6109f
@ -40,7 +40,10 @@ public:
|
||||
AtaBaseDevice(const std::string name, uint8_t type);
|
||||
~AtaBaseDevice() = default;
|
||||
|
||||
void set_host(IdeChannel* host) { this->host_obj = host; };
|
||||
void set_host(IdeChannel* host, uint8_t dev_id) {
|
||||
this->host_obj = host;
|
||||
this->my_dev_id = dev_id;
|
||||
};
|
||||
|
||||
uint16_t read(const uint8_t reg_addr) override;
|
||||
void write(const uint8_t reg_addr, const uint16_t value) override;
|
||||
|
@ -66,7 +66,7 @@ void IdeChannel::register_device(int id, AtaInterface* dev_obj) {
|
||||
|
||||
this->devices[id] = dev_obj;
|
||||
|
||||
((AtaBaseDevice*)dev_obj)->set_host(this);
|
||||
((AtaBaseDevice*)dev_obj)->set_host(this, id);
|
||||
}
|
||||
|
||||
uint32_t IdeChannel::read(const uint8_t reg_addr, const int size)
|
||||
|
Loading…
x
Reference in New Issue
Block a user