diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-12 16:18:47 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-12 16:18:47 +0300 |
| commit | 62fc51338d7259c2ea39f38bd8c7d9552e9b2002 (patch) | |
| tree | 87eb670ed58b3ce0d5c0e2ad39f5c633d9e10e40 /lib | |
| parent | 6c529c5c6c2d016d77b143171c5e27fbec0d2bfd (diff) | |
| download | kmi-62fc51338d7259c2ea39f38bd8c7d9552e9b2002.tar.gz kmi-62fc51338d7259c2ea39f38bd8c7d9552e9b2002.zip | |
doxygen shows no warnings
+ Does not mean documentation is done, but it's a nice little
achievement nonetheless.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fdt_dbg.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/fdt_dbg.c b/lib/fdt_dbg.c index 5cfacc5..5fd4219 100644 --- a/lib/fdt_dbg.c +++ b/lib/fdt_dbg.c @@ -10,6 +10,12 @@ #include <libfdt.h> #if defined(DEBUG) +/** + * Print single character \c depth number of times. + * + * @param c Character to print. + * @param depth Number of times to print character. + */ static void __print_char(char c, int depth) { /* lol, ugly but good enough for now */ @@ -17,11 +23,27 @@ static void __print_char(char c, int depth) dbg("%c", c); } +/** + * Check if ASCII character is in printable range. + * + * In this case, printable is anything that isn't a control character, line + * feed, bell, etc. + * + * @param c Character to check. + * @return \ref true if in printable range, \ref false otherwise. + */ static int __printable(char c) { return (c >= 32) && (c <= 126); } +/** + * Check if \c data and \c len bytes from it form a reasonable string. + * + * @param data Pointer to some binary data to check. + * @param len Assumed length of string. + * @return \c true if data is likely some string, \c false otherwise. + */ static int __is_string(const void *data, int len) { const char *s = data; @@ -59,6 +81,12 @@ static int __is_string(const void *data, int len) return 1; } +/** + * Print value of FDT property. + * + * @param data Pointer to FDT property. + * @param len Length of property. + */ static void __print_prop_value(const void *data, int len) { if (len == 0) |
