@CHIP-RTOS C Library V2.00 - BIOS API
BIOS_Get_Ini_String
Get an entry from CHIP.INI. int BIOS_Get_Ini_String ( const char far *section,
const char far *item_name,
char far *item_text,
unsigned int max_len ); Parameters
section
- Pointer to section string (max. 40 chars)
item_name
- Pointer to item name (max. 40 chars)
item_text
- Output parameter: Pointer to where
up to max_len
characters of item text will be written,
plus a terminating nil character.
max_len
- Maximum characters to output to
item_text
, not including terminating nil character.
Caution:
Buffer at item_text
must be max_len
+ 1
size.
Return Value
- 0: Entry not found
non-zero: Length of the string found
Comments
- Important
:
The API functions
BIOS_Set_Ini_String
and BIOS_Get_Ini_String
are not reentrant. Do not use these in different tasks or in
combination with @CHIP-RTOS commands which write to CHIP.INI e.g.
DHCP. Avoid race conditions with any other API calls which
read or write the CHIP.INI file.
Example:
// Declare an output buffer to receive the item's text
unsigned char item_text[100] ;
unsigned int text_length =
BIOS_Get_Ini_String("MY_SECTION", "MY_ITEM",item_text, sizeof(item_text)-1); See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|