diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-11-19 18:48:45 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-11-19 18:48:45 +0100 |
| commit | ade3a2578ca8d6836b8e73160455df80d49cf045 (patch) | |
| tree | 8444cddccdf80261d268c3a3cd06bbcee5c030f1 /dev/ZKAKit | |
| parent | 9e5339aed47bdb25a811a00bc5e376006aaadcf4 (diff) | |
IMP: Implement NVME device as ZKA_DEVICE type.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKAKit')
| -rw-r--r-- | dev/ZKAKit/StorageKit/NVME.h | 16 | ||||
| -rw-r--r-- | dev/ZKAKit/StorageKit/StorageKit.h (renamed from dev/ZKAKit/StorageKit/Storage.h) | 0 | ||||
| -rw-r--r-- | dev/ZKAKit/src/Storage/NVMEDeviceInterface.cc | 8 |
3 files changed, 11 insertions, 13 deletions
diff --git a/dev/ZKAKit/StorageKit/NVME.h b/dev/ZKAKit/StorageKit/NVME.h index b2af9734..3cab60c3 100644 --- a/dev/ZKAKit/StorageKit/NVME.h +++ b/dev/ZKAKit/StorageKit/NVME.h @@ -8,29 +8,27 @@ #include <KernelKit/DeviceMgr.h> #include <KernelKit/DriveMgr.h> -#include <NewKit/OwnPtr.h> namespace Kernel { - class NVMEDeviceInterface final : public DeviceInterface<MountpointInterface*> + class NVMEDeviceInterface final ZKA_DEVICE<MountpointInterface*> { public: - explicit NVMEDeviceInterface(void (*Out)(MountpointInterface* outpacket), - void (*In)(MountpointInterface* inpacket), - void (*Cleanup)(void)); + explicit NVMEDeviceInterface(Void (*out)(MountpointInterface* out_packet), + Void (*in)(MountpointInterface* in_packet), + Void (*cleanup)(Void)); ~NVMEDeviceInterface() override; public: - NVMEDeviceInterface& operator=(const NVMEDeviceInterface&) = default; - NVMEDeviceInterface(const NVMEDeviceInterface&) = default; + ZKA_COPY_DEFAULT(NVMEDeviceInterface); const Char* Name() const override; public: - OwnPtr<MountpointInterface*> operator()(UInt32 dmaLow, UInt32 dmaHigh, SizeT sz); + OwnPtr<MountpointInterface*> operator()(UInt32 dma_low, UInt32 dma_high, SizeT dma_sz); private: - void (*fCleanup)(void) = {nullptr}; + Void (*fCleanup)(Void) = {nullptr}; }; } // namespace Kernel diff --git a/dev/ZKAKit/StorageKit/Storage.h b/dev/ZKAKit/StorageKit/StorageKit.h index 4b8b2411..4b8b2411 100644 --- a/dev/ZKAKit/StorageKit/Storage.h +++ b/dev/ZKAKit/StorageKit/StorageKit.h diff --git a/dev/ZKAKit/src/Storage/NVMEDeviceInterface.cc b/dev/ZKAKit/src/Storage/NVMEDeviceInterface.cc index 5e5f9160..89ce4fb2 100644 --- a/dev/ZKAKit/src/Storage/NVMEDeviceInterface.cc +++ b/dev/ZKAKit/src/Storage/NVMEDeviceInterface.cc @@ -8,10 +8,10 @@ namespace Kernel { - NVMEDeviceInterface::NVMEDeviceInterface(void (*Out)(MountpointInterface* outpacket), - void (*In)(MountpointInterface* inpacket), - void (*Cleanup)(void)) - : DeviceInterface(Out, In), fCleanup(Cleanup) + NVMEDeviceInterface::NVMEDeviceInterface(void (*out)(MountpointInterface* outpacket), + void (*in)(MountpointInterface* inpacket), + void (*cleanup)(void)) + : DeviceInterface(out, in), fCleanup(cleanup) { } |
