SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Functions
fdt_wrapper.c File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <log.h>
#include "ctype.h"
#include "fdt_wrapper.h"
#include "libfdt.h"
Include dependency graph for fdt_wrapper.c:

Functions

int fdt_parse_prop (char const **newval, int count, char *data, int *len)
 Parse the property values in the data buffer and return the new value pointers and lengths.
 
static int is_printable_string (const void *data, int len)
 
static void print_data (const void *data, int len)
 
int fdt_print (unsigned char *working_fdt, const char *pathp, char *prop, int depth)
 Print the contents of the device tree at the specified path with a given property and depth.
 
int fdt_increase_size (void *fdt, int add_len)
 Increase the size of the flattened device tree by adding additional length.
 
int fdt_find_or_add_subnode (void *fdt, int parent_offset, const char *name)
 
int fdt_overlay_apply_verbose (void *fdt, void *fdto)
 fdt_overlay_apply_verbose - Apply an overlay with verbose error reporting
 

Function Documentation

◆ fdt_find_or_add_subnode()

int fdt_find_or_add_subnode ( void *  fdt,
int  parent_offset,
const char *  name 
)

◆ fdt_increase_size()

int fdt_increase_size ( void *  fdt,
int  add_len 
)

Increase the size of the flattened device tree by adding additional length.

Parameters
fdtThe pointer to the flattened device tree.
add_lenThe additional length to be added to the device tree.
Returns
0 success, other fail

◆ fdt_overlay_apply_verbose()

int fdt_overlay_apply_verbose ( void *  fdt,
void *  fdto 
)

fdt_overlay_apply_verbose - Apply an overlay with verbose error reporting

@fdt: ptr to device tree @fdto: ptr to device tree overlay

Convenience function to apply an overlay and display helpful messages in the case of an error

◆ fdt_parse_prop()

int fdt_parse_prop ( char const **  newval,
int  count,
char *  data,
int *  len 
)

Parse the property values in the data buffer and return the new value pointers and lengths.

Parameters
newvalThe pointer to store the new value pointers.
countThe number of properties in the data buffer.
dataThe buffer containing the property values.
lenThe pointer to store the length of each property value.
Returns
The number of parsed properties.

◆ fdt_print()

int fdt_print ( unsigned char *  working_fdt,
const char *  pathp,
char *  prop,
int  depth 
)

Print the contents of the device tree at the specified path with a given property and depth.

Parameters
working_fdtThe pointer to the device tree.
pathpThe path of the node to start printing from.
propThe property name to print.
depthThe maximum depth to traverse while printing.
Returns
The number of printed properties.

◆ is_printable_string()

static int is_printable_string ( const void *  data,
int  len 
)
static

◆ print_data()

static void print_data ( const void *  data,
int  len 
)
static