On 12/13/06, Stefan Richter <[email protected]> wrote:
How about leaving ohci1394 as it is but document tag_mask better in
libraw1394's inline doxygen(?) comments, and maybe add an enum or macros
to be used as values of raw1394_iso_recv_start's tag_mask argument?
/* can be ORed together */
#define RAW1394_IR_MATCH_TAG_0 1
#define RAW1394_IR_MATCH_TAG_1 2
#define RAW1394_IR_MATCH_TAG_2 4
#define RAW1394_IR_MATCH_TAG_3 8
#define RAW1394_IR_MATCH_ALL_TAGS -1
Yeah, that's definitely much better. I guess this would go in
libraw1394's raw1394.h? Similar to:
--- raw1394.h 2006-11-29 11:54:56.000000000 -0700
+++ raw1394_modified.h 2006-12-14 11:20:57.000000000 -0700
@@ -40,6 +40,14 @@
#define RAW1394_RCODE_TYPE_ERROR 0x6
#define RAW1394_RCODE_ADDRESS_ERROR 0x7
+/* can be ORed together */
+#define RAW1394_IR_MATCH_TAG_0 0x1
+#define RAW1394_IR_MATCH_TAG_1 0x2
+#define RAW1394_IR_MATCH_TAG_2 0x4
+#define RAW1394_IR_MATCH_TAG_3 0x8
+#define RAW1394_IR_MATCH_ALL_TAGS -1
+#define RAW1394_IR_MATCH_TAG(tag) (1 << (tag))
+
typedef u_int8_t byte_t;
typedef u_int32_t quadlet_t;
typedef u_int64_t octlet_t;
@@ -273,7 +281,9 @@
* @handle: libraw1394 handle
* @start_on_cycle: isochronous cycle number on which to start
* (-1 if you don't care)
- * @tag_mask: mask of tag fields to match (-1 to receive all packets)
+ * @tag_mask: mask of tag fields to match. Use the RAW1394_IR_MATCH_*
+ * values for this rather than the literal tag bits: the values are not
+ * equivalent.
* @sync: not used, reserved for future implementation
*
* Returns: 0 on success or -1 on failure (sets errno)
??
--
Robert Crocombe
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]