summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/StorageKit/AHCI.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-02 19:38:46 +0200
committerGitHub <noreply@github.com>2025-05-02 19:38:46 +0200
commit997be16e5ac9a68d54882ab69529815860d62955 (patch)
tree19d6129c2d776bb1edc5d4a7325e39ca176c3403 /dev/kernel/StorageKit/AHCI.h
parent618104e74c195d7508a18450524f8ed7f9af8cc6 (diff)
parentb3b4b1ebdcd6adeac914869017c86d892b7a8ced (diff)
Merge pull request #28 from nekernel-org/dev
0.0.2
Diffstat (limited to 'dev/kernel/StorageKit/AHCI.h')
-rw-r--r--dev/kernel/StorageKit/AHCI.h58
1 files changed, 28 insertions, 30 deletions
diff --git a/dev/kernel/StorageKit/AHCI.h b/dev/kernel/StorageKit/AHCI.h
index 68a42c46..d40feb36 100644
--- a/dev/kernel/StorageKit/AHCI.h
+++ b/dev/kernel/StorageKit/AHCI.h
@@ -1,6 +1,6 @@
/* -------------------------------------------
- Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+ Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
------------------------------------------- */
@@ -10,42 +10,40 @@
#include <KernelKit/DriveMgr.h>
#include <NewKit/OwnPtr.h>
-namespace Kernel
-{
- /// @brief AHCIDeviceInterface class
- /// @details This class is used to send and receive data from the AHCI device.
- /// @note The class is derived from the IDeviceObject class.
- class AHCIDeviceInterface NE_DEVICE<MountpointInterface*>
- {
- public:
- explicit AHCIDeviceInterface(void (*out)(IDeviceObject* self, MountpointInterface* out),
- void (*in)(IDeviceObject* self, MountpointInterface* in));
+namespace Kernel {
+/// @brief AHCIDeviceInterface class
+/// @details This class is used to send and receive data from the AHCI device.
+/// @note The class is derived from the IDeviceObject class.
+class AHCIDeviceInterface NE_DEVICE<MountpointInterface*> {
+ public:
+ explicit AHCIDeviceInterface(void (*out)(IDeviceObject* self, MountpointInterface* out),
+ void (*in)(IDeviceObject* self, MountpointInterface* in));
- virtual ~AHCIDeviceInterface() override;
+ virtual ~AHCIDeviceInterface() override;
- public:
- AHCIDeviceInterface& operator=(const AHCIDeviceInterface&) = default;
- AHCIDeviceInterface(const AHCIDeviceInterface&) = default;
+ public:
+ AHCIDeviceInterface& operator=(const AHCIDeviceInterface&) = default;
+ AHCIDeviceInterface(const AHCIDeviceInterface&) = default;
- const Char* Name() const override;
+ const Char* Name() const override;
- const UInt16& GetPortsImplemented();
+ const UInt16& GetPortsImplemented();
- Void SetPortsImplemented(const UInt16& pi);
+ Void SetPortsImplemented(const UInt16& pi);
- const UInt32& GetIndex();
+ const UInt32& GetIndex();
- Void SetIndex(const UInt32& drv);
+ Void SetIndex(const UInt32& drv);
- public:
- AHCIDeviceInterface& operator<<(MountpointInterface* Data) override;
- AHCIDeviceInterface& operator>>(MountpointInterface* Data) override;
+ public:
+ AHCIDeviceInterface& operator<<(MountpointInterface* Data) override;
+ AHCIDeviceInterface& operator>>(MountpointInterface* Data) override;
- private:
- UInt16 fPortsImplemented{0U};
- UInt32 fDriveIndex{0U};
- };
+ private:
+ UInt16 fPortsImplemented{0U};
+ UInt32 fDriveIndex{0U};
+};
- UInt16 sk_init_ahci_device(BOOL atapi);
- ErrorOr<AHCIDeviceInterface> sk_acquire_ahci_device(Int32 drv_index);
-} // namespace Kernel
+UInt16 sk_init_ahci_device(BOOL atapi);
+ErrorOr<AHCIDeviceInterface> sk_acquire_ahci_device(Int32 drv_index);
+} // namespace Kernel