raw1394_start_read

Name

raw1394_start_read --  initiate a read transaction

Synopsis

int raw1394_start_read (raw1394handle_t handle, nodeid_t node, nodeaddr_t addr, size_t length, quadlet_t * buffer, unsigned long tag);

Arguments

handle

libraw1394 handle

node

target node ID

addr

address to read from

length

amount of bytes of data to read

buffer

pointer to buffer where data will be saved

tag

data to identify the request to completion handler

Description

This function starts the specified read request. If length is 4 a quadlet read is initiated and a block read otherwise.

The transaction is only started, no success of the transaction is implied with a successful return of this function. When the transaction completes, a raw1394_loop_iterate will call the tag handler and pass it the tag and error code of the transaction. tag should therefore be set to something that uniquely identifies this transaction (e.g. a struct pointer casted to unsigned long).

Returns

0 on success or -1 on failure (sets errno)