diff options
| author | Amlal <amlal@nekernel.org> | 2025-04-25 13:08:33 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-04-25 13:08:33 +0200 |
| commit | fb790b07aeba8e22e4190cf3e1834d11ecde6c96 (patch) | |
| tree | 4cec7d1b321307b1d5935577631dae116a658a37 /dev/kernel/StorageKit/ATA.h | |
| parent | 63a2d92c5dfe976175cda024ec01905d11b43738 (diff) | |
dev: better .clang-format, ran format command.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/StorageKit/ATA.h')
| -rw-r--r-- | dev/kernel/StorageKit/ATA.h | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/dev/kernel/StorageKit/ATA.h b/dev/kernel/StorageKit/ATA.h index 04cf88d7..d2950228 100644 --- a/dev/kernel/StorageKit/ATA.h +++ b/dev/kernel/StorageKit/ATA.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. ------------------------------------------- */ @@ -11,48 +11,46 @@ #include <NewKit/OwnPtr.h> #include <NewKit/Utils.h> -namespace Kernel -{ - /// @brief ATA device interface class. - class ATADeviceInterface : public IDeviceObject<MountpointInterface*> - { - public: - explicit ATADeviceInterface(void (*Out)(IDeviceObject*, MountpointInterface* outpacket), - void (*In)(IDeviceObject*, MountpointInterface* inpacket)); +namespace Kernel { +/// @brief ATA device interface class. +class ATADeviceInterface : public IDeviceObject<MountpointInterface*> { + public: + explicit ATADeviceInterface(void (*Out)(IDeviceObject*, MountpointInterface* outpacket), + void (*In)(IDeviceObject*, MountpointInterface* inpacket)); - virtual ~ATADeviceInterface(); + virtual ~ATADeviceInterface(); - public: - ATADeviceInterface& operator<<(MountpointInterface* Data) override; - ATADeviceInterface& operator>>(MountpointInterface* Data) override; + public: + ATADeviceInterface& operator<<(MountpointInterface* Data) override; + ATADeviceInterface& operator>>(MountpointInterface* Data) override; - public: - ATADeviceInterface& operator=(const ATADeviceInterface&) = default; - ATADeviceInterface(const ATADeviceInterface&) = default; + public: + ATADeviceInterface& operator=(const ATADeviceInterface&) = default; + ATADeviceInterface(const ATADeviceInterface&) = default; - const Char* Name() const override; + const Char* Name() const override; - const UInt16& GetIO(); - Void SetIO(const UInt16& io); + const UInt16& GetIO(); + Void SetIO(const UInt16& io); - const UInt16& GetMaster(); - Void SetMaster(const UInt16& master); + const UInt16& GetMaster(); + Void SetMaster(const UInt16& master); - const UInt32& GetIndex(); - Void SetIndex(const UInt32& drv); + const UInt32& GetIndex(); + Void SetIndex(const UInt32& drv); - private: - UInt32 fDriveIndex{0U}; - UInt16 fIO, fMaster{0U}; - }; + private: + UInt32 fDriveIndex{0U}; + UInt16 fIO, fMaster{0U}; +}; - /// @brief Initialize an PIO device (StorageKit function) - /// @param is_master is the current PIO master? - /// @return [io:master] for PIO device. - BOOL sk_init_pio_device(BOOL is_master, UInt16& io, UInt8& master); +/// @brief Initialize an PIO device (StorageKit function) +/// @param is_master is the current PIO master? +/// @return [io:master] for PIO device. +BOOL sk_init_pio_device(BOOL is_master, UInt16& io, UInt8& master); - /// @brief Acquires a new PIO device with drv_index in mind. - /// @param drv_index The drive index to assign. - /// @return A wrapped device interface if successful, or error code. - ErrorOr<ATADeviceInterface> sk_acquire_pio_device(Int32 drv_index); -} // namespace Kernel +/// @brief Acquires a new PIO device with drv_index in mind. +/// @param drv_index The drive index to assign. +/// @return A wrapped device interface if successful, or error code. +ErrorOr<ATADeviceInterface> sk_acquire_pio_device(Int32 drv_index); +} // namespace Kernel |
