diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-07-01 09:56:44 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-07-01 09:56:44 +0200 |
| commit | 912703d3c9567d52a41ce19dcd42f129e4e1798e (patch) | |
| tree | 9612bdef4691463783ad45783c50cb6a53a8418f | |
| parent | 9e4a472c109d91ae9550b9474425ce16e081894b (diff) | |
IMP: MBCI
- Magic number.
- Two types of frames.
- 8 bytes of padding beetwen each frames.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
| -rw-r--r-- | Kernel/Modules/MBCI/MBCI.hxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Kernel/Modules/MBCI/MBCI.hxx b/Kernel/Modules/MBCI/MBCI.hxx index 473013a2..f19a0192 100644 --- a/Kernel/Modules/MBCI/MBCI.hxx +++ b/Kernel/Modules/MBCI/MBCI.hxx @@ -9,13 +9,40 @@ #include <NewKit/Defines.hpp> #include <Modules/ACPI/ACPI.hxx> +/** +- VCC (IN) (OUT for MCU) +- CLK (IN) (OUT for MCU) +- ACK (BI) (Contains an Acknowledge Packet Frame) +- D0- (IN) (Starts with the Host Imterface Packet Frame) +- D1- (IN) (Starts with the Host Imterface Packet Frame) +- D0+ (OUT) (Starts with the Host Imterface Packet Frame) +- D1+ (OUT) (Starts with the Host Imterface Packet Frame) +- GND (IN) (OUT for MCU) + */ + +#define cMBCIZeroSz (8) +#define cMBCIMagic "MBCI " + namespace NewOS { struct MBCIHostInterface; + struct MBCIPacketACK; + + /// @brief MBCI Acknowledge header. + struct PACKED MBCIPacketACK final + { + UInt32 Magic; + UInt32 HostId; + UInt16 VendorId; + UInt16 DeviceId; + Bool Acknowleged; + Char Zero[cMBCIZeroSz]; + }; /// @brief MBCI Host Interface header. struct PACKED MBCIHostInterface final { + UInt32 Magic; UInt32 HostId; UInt16 VendorId; UInt16 DeviceId; @@ -27,6 +54,7 @@ namespace NewOS UInt8 InterruptEnable; UInt64 BaseAddressRegister; UInt64 BaseAddressRegisterSize; + Char Zero[cMBCIZeroSz]; }; /// @brief MBCI host flags. |
