TianoCore EDK2 master
Loading...
Searching...
No Matches
Unaligned.c
Go to the documentation of this file.
1
9#include "BaseLibInternals.h"
10
24UINT16
25EFIAPI
27 IN CONST UINT16 *Buffer
28 )
29{
30 ASSERT (Buffer != NULL);
31
32 return *Buffer;
33}
34
50UINT16
51EFIAPI
53 OUT UINT16 *Buffer,
54 IN UINT16 Value
55 )
56{
57 ASSERT (Buffer != NULL);
58
59 return *Buffer = Value;
60}
61
75UINT32
76EFIAPI
78 IN CONST UINT32 *Buffer
79 )
80{
81 ASSERT (Buffer != NULL);
82
83 return *Buffer & 0xffffff;
84}
85
101UINT32
102EFIAPI
104 OUT UINT32 *Buffer,
105 IN UINT32 Value
106 )
107{
108 ASSERT (Buffer != NULL);
109
110 *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
111 return Value;
112}
113
127UINT32
128EFIAPI
130 IN CONST UINT32 *Buffer
131 )
132{
133 ASSERT (Buffer != NULL);
134
135 return *Buffer;
136}
137
153UINT32
154EFIAPI
156 OUT UINT32 *Buffer,
157 IN UINT32 Value
158 )
159{
160 ASSERT (Buffer != NULL);
161
162 return *Buffer = Value;
163}
164
178UINT64
179EFIAPI
181 IN CONST UINT64 *Buffer
182 )
183{
184 ASSERT (Buffer != NULL);
185
186 return *Buffer;
187}
188
204UINT64
205EFIAPI
207 OUT UINT64 *Buffer,
208 IN UINT64 Value
209 )
210{
211 ASSERT (Buffer != NULL);
212
213 return *Buffer = Value;
214}
UINT32 EFIAPI WriteUnaligned24(OUT UINT32 *Buffer, IN UINT32 Value)
Definition: Unaligned.c:118
UINT64 EFIAPI ReadUnaligned64(IN CONST UINT64 *Buffer)
Definition: Unaligned.c:204
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
Definition: Unaligned.c:29
UINT32 EFIAPI WriteUnaligned32(OUT UINT32 *Buffer, IN UINT32 Value)
Definition: Unaligned.c:177
UINT16 EFIAPI WriteUnaligned16(OUT UINT16 *Buffer, IN UINT16 Value)
Definition: Unaligned.c:61
UINT32 EFIAPI ReadUnaligned24(IN CONST UINT32 *Buffer)
Definition: Unaligned.c:89
UINT64 EFIAPI WriteUnaligned64(OUT UINT64 *Buffer, IN UINT64 Value)
Definition: Unaligned.c:236
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
Definition: Unaligned.c:145
UINT32 EFIAPI BitFieldWrite32(IN UINT32 Operand, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
Definition: BitField.c:563
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284