<< Previous | Next >>

_GetSysMacroIndex

int _GetSysMacroIndex( int n, char * buf, uint32 * value );

Description

Skips to the nth macro entry and retrieves the macro name (as defined by the compiler), and the value of the macro as defined in the system macro table. The system macro table contains board specific configuration parameters that are defined by the compiler and can be retrieved at runtime through this interface. The flash driver must be initialized and the System ID block must be read before this function will return accurate results.

This function only applies to boards with Version 5 or later System ID blocks.

Parameters

n
The index in the system macro table.

buf
Character array to contain and return macro name (copied from system macro table). MUST BE AT LEAST SYS_MACRO_LENGTH bytes or function will overflow buffer and can crash system!

value
Pointer to macro value to return to caller.

Return Value

 0: if successful
-1: invalid address or range (use to find end of table)
-2: ID block or macro table invalid

Library

IDBLOCK.LIB

See Also

_GetSysMacroValue


Dynamic C Functions << Previous | Next >> rabbit.com