mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-06-09 07:29:36 +00:00
sc53c94: self-registration with the device registry.
This commit is contained in:
parent
5f8a927846
commit
2dfc160e30
|
@ -25,6 +25,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#include <devices/common/hwcomponent.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
#include <devices/common/scsi/sc53c94.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <loguru.hpp>
|
||||
#include <machines/machinebase.h>
|
||||
|
||||
|
@ -358,3 +359,9 @@ void Sc53C94::notify(ScsiMsg msg_type, int param)
|
|||
LOG_F(WARNING, "SC53C94: ignore notification message, type: %d", msg_type);
|
||||
}
|
||||
}
|
||||
|
||||
static const DeviceDescription Sc53C94_Descriptor = {
|
||||
Sc53C94::create, {}, {}
|
||||
};
|
||||
|
||||
REGISTER_DEVICE(Sc53C94, Sc53C94_Descriptor);
|
||||
|
|
|
@ -29,10 +29,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
#ifndef SC_53C94_H
|
||||
#define SC_53C94_H
|
||||
|
||||
#include "scsi.h"
|
||||
#include "devices/common/hwinterrupt.h"
|
||||
#include <devices/common/scsi/scsi.h>
|
||||
#include <devices/common/hwinterrupt.h>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <memory>
|
||||
|
||||
/** 53C94 read registers */
|
||||
namespace Read {
|
||||
|
@ -128,6 +129,10 @@ public:
|
|||
Sc53C94(uint8_t chip_id=12, uint8_t my_id=7);
|
||||
~Sc53C94() = default;
|
||||
|
||||
static std::unique_ptr<HWComponent> create() {
|
||||
return std::unique_ptr<Sc53C94>(new Sc53C94());
|
||||
}
|
||||
|
||||
// HWComponent methods
|
||||
int device_postinit();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user