AM261x MCU+ SDK: Configuration Utilities

| AM261x MCU+ SDK 26.00.00 |

Files | Functions | Typedefs
Configuration Utilities
APIs for Unibase Binding

## 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

  itemp | The configuration item to set.
  v | A 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

  fname | The name of the configuration file to read.
  set_item | The callback function to call for each configuration item.

Returns
  0 on success, or a negative value on error.