mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +02:00
hwaccess: add endianness converting deserialization functions
Add functions like `uint32_t read_le32(const void *base, size_t offset);` Read a 32 bit unsigned from a base with an offset. Having prototypes and a macro generated implementation makes it easier to read, understand and spot errors in one of them. Change-Id: Idde177acf8bc5f94cd046b6539dc31532c98e452 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/31016 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:

committed by
Nico Huber

parent
c456944170
commit
82604bd738
@ -135,6 +135,8 @@ if cc.check_header('sys/utsname.h')
|
||||
add_project_arguments('-DHAVE_UTSNAME=1', language : 'c')
|
||||
endif
|
||||
|
||||
srcs += 'platform/memaccess.c'
|
||||
|
||||
if host_machine.endian() == 'little'
|
||||
srcs += 'platform/endian_little.c'
|
||||
add_project_arguments('-D__FLASHROM_LITTLE_ENDIAN__=1', language : 'c')
|
||||
|
Reference in New Issue
Block a user