From 912703d3c9567d52a41ce19dcd42f129e4e1798e Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Mon, 1 Jul 2024 09:56:44 +0200 Subject: IMP: MBCI - Magic number. - Two types of frames. - 8 bytes of padding beetwen each frames. Signed-off-by: Amlal EL Mahrouss --- Kernel/Modules/MBCI/MBCI.hxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Kernel') 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 #include +/** +- 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. -- cgit v1.2.3