Configuration File handling

A configuration file serves the purpose to store device properties in a human readable, standard INI file format. More...

Data Structures

struct  BufStream
 Buffered stream structure. More...
struct  ConfHandler
 Configuration handler. More...

Functions

int conf_parse (BufStream *s, ConfHandler *h)
 Parses configuration from BufStream s using ConfHandler h.

Detailed Description

For example:

[Blackfin]
irsize = 5                # Size of Instruction register
idcmd  = 2                # Command for requesting IDCODE
desc   = "Blackfin BF527" # Description
id     = 0x027e00cb       # IDCODE
idmask = 0x0fffffff       # Mask (ANDed with IDCODE before comparison)

For example, for each device in a JTAG chain, an entry like the above needs to be specified in the file.

The main function to read the INI file is conf_parse(). Before parsing the configuration, a BufStream structure and a ConfHandler structure need to be instantiated in the caller.

The ConfHandler::add_group and ConfHandler::set_property members are callback function pointers and must be initialized to appropriate functions. These are called by conf_parse().


Generated on Thu Feb 24 13:50:16 2011 for Device Control library by  doxygen 1.6.1