TianoCore EDK2 master
Loading...
Searching...
No Matches
SpiBus.h
Go to the documentation of this file.
1
10#ifndef SPI_BUS_H_
11#define SPI_BUS_H_
12
13#include <PiDxe.h>
14#include <Library/BaseLib.h>
15#include <Protocol/DevicePath.h>
18#include <Protocol/SpiIo.h>
19#include <Protocol/SpiHc.h>
21
22#define SPI_IO_SIGNATURE SIGNATURE_32 ('s', 'i', 'o', 'c')
23
24typedef struct {
25 UINTN Signature;
26 EFI_HANDLE Handle;
27 EFI_SPI_IO_PROTOCOL Protocol;
28 EFI_SPI_BUS_TRANSACTION BusTransaction;
31 EFI_SPI_BUS *SpiBus;
33
34#define SPI_IO_CHIP_FROM_THIS(a) \
35 CR (a, SPI_IO_CHIP, Protocol, \
36 SPI_IO_SIGNATURE)
37
47BOOLEAN
48EFIAPI
52 );
53
128EFIAPI
131 IN EFI_SPI_TRANSACTION_TYPE TransactionType,
132 IN BOOLEAN DebugTransaction,
133 IN UINT32 ClockHz OPTIONAL,
134 IN UINT32 BusWidth,
135 IN UINT32 FrameSize,
136 IN UINT32 WriteBytes,
137 IN UINT8 *WriteBuffer,
138 IN UINT32 ReadBytes,
139 OUT UINT8 *ReadBuffer
140 );
141
161EFIAPI
164 IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral
165 );
166
167#endif //SPI_BUS_H_
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS EFIAPI UpdateSpiPeripheral(IN CONST EFI_SPI_IO_PROTOCOL *This, IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral)
Definition: SpiBus.c:399
EFI_STATUS EFIAPI Transaction(IN CONST EFI_SPI_IO_PROTOCOL *This, IN EFI_SPI_TRANSACTION_TYPE TransactionType, IN BOOLEAN DebugTransaction, IN UINT32 ClockHz OPTIONAL, IN UINT32 BusWidth, IN UINT32 FrameSize, IN UINT32 WriteBytes, IN UINT8 *WriteBuffer, IN UINT32 ReadBytes, OUT UINT8 *ReadBuffer)
Definition: SpiBus.c:231
BOOLEAN EFIAPI DevicePathsAreEqual(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath1, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath2)
Definition: SpiBus.c:28
EFI_SPI_TRANSACTION_TYPE
Definition: SpiIo.h:25
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33