User Manual

29
Example
int st;
unsigned long value;
value=10;
st=fw_increment(icdev,1,value); /*Increment 10 to the value of block 1*/
st=fw_transfer(icdev,1);
Remark
After call this function,the function fw_transfer should be called immediately,
otherwise,the value will not be updated.
fw_readval(int icdev,unsigned char _Adr,unsigned long *_Value);
Description
Read value of certain block.
Parameters
icdev:Value of Device Handle.
_Adr:Address of block
_Value:[out]Value for read
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned long value;
st=fw_readval(icdev,1,&value); / * Read out the value of block 1, and
assign to value * /
int fw_decrement(int icdev,unsigned char _Adr,unsigned long _Value);
Description
Decrement value of certain block.
Parameters
icdev:Value of Device Handle.
_Adr:Address of block
_Value:Value for decrement
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned long value;
value=10;
st=fw_decrement(icdev,1,value); /*reduce value to the value of block 1 */
st=fw_transfer(icdev,1);
Remark
After call this function,the function fw_transfer should be called immediately ,
otherwise, the value will not be updated.
int fw_restore(int icdev,unsigned char _Adr);
Description