diff options
| author | 2000-08-06 02:44:00 +0000 | |
|---|---|---|
| committer | 2000-08-06 02:44:00 +0000 | |
| commit | 6ac98fd9fd300bc1b8969b6e7a4cf251fa85cdd4 (patch) | |
| tree | 730147c0d668eb9812227d3d0df0bfa211fd7ccb /src/readwrite.c | |
| parent | Added raw1394_reset_bus() call. (diff) | |
Added support for isochronous sending.
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@34 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to 'src/readwrite.c')
| -rw-r--r-- | src/readwrite.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/readwrite.c b/src/readwrite.c index 8670920..1e12b6c 100644 --- a/src/readwrite.c +++ b/src/readwrite.c @@ -94,6 +94,27 @@ int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node, return (int)write(handle->fd, req, sizeof(*req)); } +int raw1394_start_iso_write(struct raw1394_handle *handle, unsigned int channel, + unsigned int tag, unsigned int sy, + unsigned int speed, size_t length, quadlet_t *data, + unsigned long rawtag) +{ + struct raw1394_request *req = &handle->req; + + CLEAR_REQ(req); + + req->type = RAW1394_REQ_ISO_SEND; + req->generation = handle->generation; + req->tag = tag; + + req->address = ((__u64)channel << 48) | speed; + req->misc = (tag << 16) | sy; + req->length = length; + req->sendb = data; + + return (int)write(handle->fd, req, sizeof(*req)); +} + #define SYNCFUNC_VARS \ struct sync_cb_data sd = { 0, 0 }; \ @@ -142,5 +163,17 @@ int raw1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr, SYNCFUNC_BODY; } +int raw1394_iso_write(struct raw1394_handle *handle, unsigned int channel, + unsigned int tag, unsigned int sy, unsigned int speed, + size_t length, quadlet_t *data) +{ + SYNCFUNC_VARS; + + err = raw1394_start_iso_write(handle, channel, tag, sy, speed, length, + data, (unsigned long)&rh); + + SYNCFUNC_BODY; +} + #undef SYNCFUNC_VARS #undef SYNCFUNC_BODY |
