From de99380f12f8e2fe4acf7734db0e1e37a356c45f Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 11 Jun 2022 15:37:39 +0300 Subject: continue documentation --- include/libfdt_env.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include/libfdt_env.h') 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 #include +/** 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 */ -- cgit v1.3