diff options
Diffstat (limited to 'include/libfdt_env.h')
| -rw-r--r-- | include/libfdt_env.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 7d00910..589100b 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -11,13 +11,45 @@ #include <apos/string.h> #include <apos/bits.h> +/** 16bit integer. */ typedef int16_t fdt16_t; + +/** 32bit integer. */ typedef int32_t fdt32_t; + +/** 64bit integer. */ typedef int64_t fdt64_t; +/** + * Convert FDT 32bit integer to cpu endianness. + * + * @param x Integer to convert. + * @return Value of \c x in cpu endianness. + */ #define fdt32_to_cpu(x) be32_to_cpu(x) + +/** + * Convert 32bit cpu endian integer to FDT endianness. + * + * @param x Integer to convert. + * @return Value of \c x in FDT endianness. + */ #define cpu_to_fdt32(x) cpu_to_be32(x) + +/** + * Convert FDT 64bit integer to cpu endianness. + * + * @param x Integer to convert. + * @return Value of \c x in cpu endianness. + */ #define fdt64_to_cpu(x) be64_to_cpu(x) + +/** + * Convert 64bit cpu endian integer to FDT endianness. + * + * @param x Integer to convert. + * @return Value of \c x in FDT endianness. + */ #define cpu_to_fdt64(x) cpu_to_be64(x) #endif /* LIBFDT_ENV_H */ |
