Added raw1394_reset_bus() call.

git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@33 53a565d1-3bb7-0310-b661-cf11e63c67ab
This commit is contained in:
aeb 2000-07-05 20:40:51 +00:00
parent 270561f388
commit c1e3916f70
4 changed files with 23 additions and 0 deletions

4
NEWS
View File

@ -1,4 +1,8 @@
Version 0.8:
- new raw1394_reset_bus() function to reset the bus
Version 0.7: Version 0.7:
- added support for environments where the kernel runs in 64 bit mode whereas - added support for environments where the kernel runs in 64 bit mode whereas

View File

@ -21,6 +21,7 @@
#define RAW1394_REQ_ISO_LISTEN 200 #define RAW1394_REQ_ISO_LISTEN 200
#define RAW1394_REQ_FCP_LISTEN 201 #define RAW1394_REQ_FCP_LISTEN 201
#define RAW1394_REQ_RESET_BUS 202
/* kernel to user */ /* kernel to user */
#define RAW1394_REQ_BUS_RESET 10000 #define RAW1394_REQ_BUS_RESET 10000

View File

@ -201,3 +201,17 @@ int raw1394_set_port(struct raw1394_handle *handle, int port)
return -1; return -1;
} }
} }
int raw1394_reset_bus(struct raw1394_handle *handle)
{
struct raw1394_request *req = &handle->req;
CLEAR_REQ(req);
req->type = RAW1394_REQ_RESET_BUS;
req->generation = handle->generation;
if (write(handle->fd, req, sizeof(*req)) < 0) return -1;
return 0;
}

View File

@ -65,6 +65,10 @@ int raw1394_get_port_info(raw1394handle_t handle, struct raw1394_portinfo *pinf,
*/ */
int raw1394_set_port(raw1394handle_t handle, int port); int raw1394_set_port(raw1394handle_t handle, int port);
/*
* Reset the connected bus. Returns -1 for failure, 0 for success.
*/
int raw1394_reset_bus(raw1394handle_t handle);
/* /*
* Get one new message through handle and process it. See below for handler * Get one new message through handle and process it. See below for handler