Fixed lock transaction to actually return response value.
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@24 53a565d1-3bb7-0310-b661-cf11e63c67ab
This commit is contained in:
parent
8aa036c3f4
commit
9812e4136b
3
NEWS
3
NEWS
|
@ -1,6 +1,9 @@
|
||||||
|
|
||||||
Version 0.7:
|
Version 0.7:
|
||||||
|
|
||||||
|
- fixed lock transaction to actually return the required response; these
|
||||||
|
functions are actually useful now, prototypes for raw1394_start_lock and
|
||||||
|
raw1394_lock changed
|
||||||
- a void pointer can now be stored as user data with a handle
|
- a void pointer can now be stored as user data with a handle
|
||||||
|
|
||||||
Version 0.6:
|
Version 0.6:
|
||||||
|
|
|
@ -143,7 +143,7 @@ int raw1394_start_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||||
size_t length, quadlet_t *data, unsigned long tag);
|
size_t length, quadlet_t *data, unsigned long tag);
|
||||||
int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
|
int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
|
||||||
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
|
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
|
||||||
quadlet_t arg, unsigned long tag);
|
quadlet_t arg, quadlet_t *result, unsigned long tag);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This does the complete transaction and will return when it's finished. It
|
* This does the complete transaction and will return when it's finished. It
|
||||||
|
@ -155,7 +155,8 @@ int raw1394_read(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||||
int raw1394_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
int raw1394_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||||
size_t length, quadlet_t *data);
|
size_t length, quadlet_t *data);
|
||||||
int raw1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
int raw1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||||
unsigned int extcode, quadlet_t data, quadlet_t arg);
|
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||||
|
quadlet_t *result);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start and stop receiving a certain isochronous channel. You have to set an
|
* Start and stop receiving a certain isochronous channel. You have to set an
|
||||||
|
|
|
@ -47,7 +47,7 @@ int raw1394_start_write(struct raw1394_handle *handle, nodeid_t node,
|
||||||
|
|
||||||
int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
|
int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
|
||||||
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
|
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
|
||||||
quadlet_t arg, unsigned long tag)
|
quadlet_t arg, quadlet_t *result, unsigned long tag)
|
||||||
{
|
{
|
||||||
struct raw1394_request *req = &handle->req;
|
struct raw1394_request *req = &handle->req;
|
||||||
quadlet_t sendbuf[2];
|
quadlet_t sendbuf[2];
|
||||||
|
@ -65,6 +65,7 @@ int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
|
||||||
|
|
||||||
req->address = ((u_int64_t)node << 48) | addr;
|
req->address = ((u_int64_t)node << 48) | addr;
|
||||||
req->sendb = sendbuf;
|
req->sendb = sendbuf;
|
||||||
|
req->recvb = result;
|
||||||
|
|
||||||
switch (extcode) {
|
switch (extcode) {
|
||||||
case 3: /* EXTCODE_FETCH_ADD */
|
case 3: /* EXTCODE_FETCH_ADD */
|
||||||
|
@ -119,11 +120,12 @@ int raw1394_write(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
int raw1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
int raw1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||||
unsigned int extcode, quadlet_t data, quadlet_t arg)
|
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||||
|
quadlet_t *result)
|
||||||
{
|
{
|
||||||
SYNCFUNC_VARS;
|
SYNCFUNC_VARS;
|
||||||
|
|
||||||
err = raw1394_start_lock(handle, node, addr, extcode, data, arg,
|
err = raw1394_start_lock(handle, node, addr, extcode, data, arg, result,
|
||||||
(unsigned long)&rh);
|
(unsigned long)&rh);
|
||||||
|
|
||||||
SYNCFUNC_BODY;
|
SYNCFUNC_BODY;
|
||||||
|
|
Reference in New Issue