diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 15:37:39 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 15:37:39 +0300 |
| commit | de99380f12f8e2fe4acf7734db0e1e37a356c45f (patch) | |
| tree | 086f4456c71f740d1198602a958aca1e79b3d672 /include/libfdt_env.h | |
| parent | 45b51617a0e3513a453c20229e02fd8fc9fbbfe1 (diff) | |
| download | kmi-de99380f12f8e2fe4acf7734db0e1e37a356c45f.tar.gz kmi-de99380f12f8e2fe4acf7734db0e1e37a356c45f.zip | |
continue documentation
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 */ |
