blob: 98e073d411ee9441e3ab08b11e65401504664474 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef _RAW1394_PRIVATE_H
#define _RAW1394_PRIVATE_H
#define HBUF_SIZE 8192
#define ARM_REC_LENGTH 4096
struct raw1394_handle {
int fd;
int protocol_version;
unsigned int generation;
nodeid_t local_id;
int num_of_nodes;
nodeid_t irm_id;
raw1394_errcode_t err;
void *userdata;
bus_reset_handler_t bus_reset_handler;
tag_handler_t tag_handler;
arm_tag_handler_t arm_tag_handler;
fcp_handler_t fcp_handler;
iso_handler_t iso_handler[64];
/* new ISO API */
/* memory mapping of the DMA buffer */
unsigned char *iso_buffer;
/* iso XMIT only: */
unsigned int iso_buf_stride; /* offset between successive packets */
unsigned int next_packet; /* index of next packet to be transmitted */
/* status buffer, updated from _raw1394_iso_iterate() */
struct raw1394_iso_status iso_status;
unsigned int iso_packets_dropped;
/* user-supplied handlers */
raw1394_iso_xmit_handler_t iso_xmit_handler;
raw1394_iso_recv_handler_t iso_recv_handler;
struct raw1394_request req;
quadlet_t buffer[HBUF_SIZE/4]; /* 2048 */
};
struct sync_cb_data {
int done;
int errcode;
};
int _raw1394_sync_cb(struct raw1394_handle*, struct sync_cb_data*, int);
int _raw1394_iso_iterate(raw1394handle_t handle);
#define CLEAR_REQ(reqp) memset((reqp), 0, sizeof(struct raw1394_request))
#if SIZEOF_VOID_P == 4
#define int2ptr(x) ((void *)(__u32)x)
#define ptr2int(x) ((__u64)(__u32)x)
#else
#define int2ptr(x) ((void *)x)
#define ptr2int(x) ((__u64)x)
#endif
#endif /* _RAW1394_PRIVATE_H */
|