Velocity Userspace
Functions
Ini2bin Utility Functions

ini2bin API functions More...

Functions

int switchtec_convert_ini2bin (FILE *szINIFileName, char *pclog, BYTE *m_pBinConfig, int *binlength)
 Converts an INI configuration file to a binary format. More...
 

Detailed Description

ini2bin API functions

These are functions used for converting INI file to BIN for OTP configuration record

Function Documentation

◆ switchtec_convert_ini2bin()

int switchtec_convert_ini2bin ( FILE *  szINIFileName,
char *  pclog,
BYTE *  m_pBinConfig,
int *  binlength 
)

Converts an INI configuration file to a binary format.

This function reads an INI configuration file, processes its key-value pairs, and generates a binary configuration buffer. It supports various modes such as writing bytes, setting bits, clearing bits, and patching code. The function ensures valid addressing and handles mode switches appropriately.

Parameters
szINIFileNamePointer to the INI file to be converted.
pclogPointer to a log buffer for storing debug or error messages.
m_pBinConfigPointer to the output binary configuration buffer.
binlengthPointer to an integer where the length of the binary buffer will be stored.
Returns
TRUE (non-zero) if the conversion is successful, FALSE (zero) otherwise.

Definition at line 444 of file ini.c.