Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

transaction.c File Reference

Transaction functions. More...

#include <config.h>
#include <sw.h>
#include <hal.h>
#include <transaction.h>
#include <types.h>

Functions

bool ta_setdata (iu8 *data, iu8 len, iu16 dst)
 Begins a transaction and sets the data. More...

bool ta_commit (void)
 Commits the data in the transaction buffer. More...


Detailed Description

Transaction functions.

Id:
transaction.c,v 1.11 2002/12/22 15:42:56 m Exp


Function Documentation

bool ta_commit void   
 

Commits the data in the transaction buffer.

Data is written to the destination specified in ta_setdata(). The state is then set to clean.

This function must be called after each reset to commit pending transactions.

Return values:
TRUE  on success.
FALSE  on failure. Error code given in sw.

bool ta_setdata iu8   data,
iu8    len,
iu16    dst
 

Begins a transaction and sets the data.

data/len bytes are written to the transaction buffer. The destination address is also stored there. Then the state is set to TRANSAC_STATE_DATA.

Parameters:
data  Pointer to the data to write into the transaction buffer.
len  Length of the data. (Max.: TRANSAC_DATA_LEN)
dst  Destination of the data in EEPROM.
Return values:
TRUE  on success.
FALSE  on failure. Error code given in sw.


Copyright 2002 by Matthias Bruestle. This is licensed under the GNU General Public License.