From d48cbe75ef29a9c67c9d176bf58e56ea6448fb9e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 21 Oct 2024 20:23:36 +0200 Subject: IMP: Major refactor of header and source files extensions. Signed-off-by: Amlal El Mahrouss --- dev/modules/MBCI/Interface.h | 10 +++++ dev/modules/MBCI/Interface.hxx | 10 ----- dev/modules/MBCI/MBCI.h | 99 ++++++++++++++++++++++++++++++++++++++++++ dev/modules/MBCI/MBCI.hxx | 99 ------------------------------------------ 4 files changed, 109 insertions(+), 109 deletions(-) create mode 100644 dev/modules/MBCI/Interface.h delete mode 100644 dev/modules/MBCI/Interface.hxx create mode 100644 dev/modules/MBCI/MBCI.h delete mode 100644 dev/modules/MBCI/MBCI.hxx (limited to 'dev/modules/MBCI') diff --git a/dev/modules/MBCI/Interface.h b/dev/modules/MBCI/Interface.h new file mode 100644 index 00000000..ec51fa3a --- /dev/null +++ b/dev/modules/MBCI/Interface.h @@ -0,0 +1,10 @@ +/* ------------------------------------------- + + Copyright ZKA Web Services Co. + +------------------------------------------- */ + +#pragma once + +#include +#include diff --git a/dev/modules/MBCI/Interface.hxx b/dev/modules/MBCI/Interface.hxx deleted file mode 100644 index 9ab8844f..00000000 --- a/dev/modules/MBCI/Interface.hxx +++ /dev/null @@ -1,10 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Web Services Co. - -------------------------------------------- */ - -#pragma once - -#include -#include diff --git a/dev/modules/MBCI/MBCI.h b/dev/modules/MBCI/MBCI.h new file mode 100644 index 00000000..24c6b180 --- /dev/null +++ b/dev/modules/MBCI/MBCI.h @@ -0,0 +1,99 @@ +/* ------------------------------------------- + + Copyright ZKA Web Services Co. + +------------------------------------------- */ + +#ifndef _INC_MODULE_MBCI_HXX_ +#define _INC_MODULE_MBCI_HXX_ + +#include +#include + +/** +- VCC (IN) (OUT for MCU) +- CLK (IN) (OUT for MCU) +- ACK (BI) (Contains an Acknowledge Packet Frame) +- D0- (IN) (Starts with the Host Interface Packet Frame) +- D1- (IN) (Starts with the Host Interface Packet Frame) +- D0+ (OUT) (Starts with the Host Interface Packet Frame) +- D1+ (OUT) (Starts with the Host Interface Packet Frame) +- GND (IN) (OUT for MCU) + */ + +#define cMBCIZeroSz (8) +#define cMBCIMagic "MBCI " + +namespace Kernel +{ + struct IMBCIHost; + struct IMBCIHostPacketFrame; + + /// @brief MBCI Packet frame header + struct PACKED IMBCIHostPacketFrame final + { + UInt32 Magic; + UInt32 HostId; + UInt32 Flags; + UInt32 VendorId; + UInt32 DeviceId; + UInt32 DeviceSpeed; + Bool Acknowledge; + Char Zero[cMBCIZeroSz]; + }; + + enum + { + eMBCISpeedDeviceInvalid, + eMBCILowSpeedDevice, + eMBCIHighSpeedDevice, + eMBCISpeedDeviceCount, + }; + + /// @brief MBCI Host Interface header. + struct PACKED IMBCIHost final + { + UInt32 Magic; + UInt32 HostId; + UInt16 VendorId; + UInt16 DeviceId; + UInt8 MemoryType; + UInt16 HostType; + UInt16 HostFlags; + UInt8 Error; + UInt8 Status; + UInt8 InterruptEnable; + UInt64 BaseAddressRegister; + UInt64 BaseAddressRegisterSize; + Char Zero[cMBCIZeroSz]; + }; + + /// @brief MBCI host flags. + enum MBCIHostFlags + { + eMBCIHostFlagsSupportsNothing, // Invalid MBCI device. + eMBCIHostFlagsSupportsAPM, // Advanced Power Management. + eMBCIHostFlagsSupportsDaisyChain, // Is daisy chained. + eMBCIHostFlagsSupportsHWInterrupts, // Has HW interrupts. + eMBCIHostFlagsSupportsDMA, // Has DMA. + eMBCIHostFlagsExtended = __UINT16_MAX__, // Extended flags table. + }; + + enum MBCIHostKind + { + eMBCIHostKindHardDisk, + eMBCIHostKindOpticalDisk, + eMBCIHostKindKeyboardLow, + eMBCIHostKindMouseLow, + eMBCIHostKindMouseHigh, + eMBCIHostKindKeyboardHigh, + eMBCIHostKindNetworkInterface, + eMBCIHostKindDaisyChain, + eMBCIHostKindStartExtended = __UINT16_MAX__, // Extended vendor table. + }; + + /// @brief An AuthKey is a context used to decrpy data from an MBCI packet. + typedef UInt64 MBCIAuthyKeyType; +} // namespace Kernel + +#endif // ifndef _INC_MODULE_MBCI_HXX_ diff --git a/dev/modules/MBCI/MBCI.hxx b/dev/modules/MBCI/MBCI.hxx deleted file mode 100644 index 9d14d02f..00000000 --- a/dev/modules/MBCI/MBCI.hxx +++ /dev/null @@ -1,99 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Web Services Co. - -------------------------------------------- */ - -#ifndef _INC_MODULE_MBCI_HXX_ -#define _INC_MODULE_MBCI_HXX_ - -#include -#include - -/** -- VCC (IN) (OUT for MCU) -- CLK (IN) (OUT for MCU) -- ACK (BI) (Contains an Acknowledge Packet Frame) -- D0- (IN) (Starts with the Host Interface Packet Frame) -- D1- (IN) (Starts with the Host Interface Packet Frame) -- D0+ (OUT) (Starts with the Host Interface Packet Frame) -- D1+ (OUT) (Starts with the Host Interface Packet Frame) -- GND (IN) (OUT for MCU) - */ - -#define cMBCIZeroSz (8) -#define cMBCIMagic "MBCI " - -namespace Kernel -{ - struct IMBCIHost; - struct IMBCIHostPacketFrame; - - /// @brief MBCI Packet frame header - struct PACKED IMBCIHostPacketFrame final - { - UInt32 Magic; - UInt32 HostId; - UInt32 Flags; - UInt32 VendorId; - UInt32 DeviceId; - UInt32 DeviceSpeed; - Bool Acknowledge; - Char Zero[cMBCIZeroSz]; - }; - - enum - { - eMBCISpeedDeviceInvalid, - eMBCILowSpeedDevice, - eMBCIHighSpeedDevice, - eMBCISpeedDeviceCount, - }; - - /// @brief MBCI Host Interface header. - struct PACKED IMBCIHost final - { - UInt32 Magic; - UInt32 HostId; - UInt16 VendorId; - UInt16 DeviceId; - UInt8 MemoryType; - UInt16 HostType; - UInt16 HostFlags; - UInt8 Error; - UInt8 Status; - UInt8 InterruptEnable; - UInt64 BaseAddressRegister; - UInt64 BaseAddressRegisterSize; - Char Zero[cMBCIZeroSz]; - }; - - /// @brief MBCI host flags. - enum MBCIHostFlags - { - eMBCIHostFlagsSupportsNothing, // Invalid MBCI device. - eMBCIHostFlagsSupportsAPM, // Advanced Power Management. - eMBCIHostFlagsSupportsDaisyChain, // Is daisy chained. - eMBCIHostFlagsSupportsHWInterrupts, // Has HW interrupts. - eMBCIHostFlagsSupportsDMA, // Has DMA. - eMBCIHostFlagsExtended = __UINT16_MAX__, // Extended flags table. - }; - - enum MBCIHostKind - { - eMBCIHostKindHardDisk, - eMBCIHostKindOpticalDisk, - eMBCIHostKindKeyboardLow, - eMBCIHostKindMouseLow, - eMBCIHostKindMouseHigh, - eMBCIHostKindKeyboardHigh, - eMBCIHostKindNetworkInterface, - eMBCIHostKindDaisyChain, - eMBCIHostKindStartExtended = __UINT16_MAX__, // Extended vendor table. - }; - - /// @brief An AuthKey is a context used to decrpy data from an MBCI packet. - typedef UInt64 MBCIAuthyKeyType; -} // namespace Kernel - -#endif // ifndef _INC_MODULE_MBCI_HXX_ -- cgit v1.2.3