AM263x MCU+ SDK  09.02.00
Configuration Utilities

Introduction

Files

file  ub_confutils.h
 Provides functions for configuring from a file.
 

Functions

int ub_read_config_file (char *fname, ub_set_item_cb_t set_item)
 Read a configuration file and set all items in the file. More...
 

Typedefs

typedef int(* ub_set_item_cb_t) (char *itemp, void *v)
 Callback function for configuring a single item. More...
 

Typedef Documentation

◆ ub_set_item_cb_t

typedef int(* ub_set_item_cb_t) (char *itemp, void *v)

Callback function for configuring a single item.

This function is called for each configuration item in the file. It takes a string itemp indicating the item to configure and a pointer v to the value to set the item to.

Parameters
itempThe configuration item to set.
vA pointer to the value to set the item to.
Returns
0 on success, or a negative value on error.

Function Documentation

◆ ub_read_config_file()

int ub_read_config_file ( char *  fname,
ub_set_item_cb_t  set_item 
)

Read a configuration file and set all items in the file.

This function reads the configuration file specified by fname and calls the set_item callback function for each item in the file.

Parameters
fnameThe name of the configuration file to read.
set_itemThe callback function to call for each configuration item.
Returns
0 on success, or a negative value on error.