Browse Source

Add ident and camd_proto fields in struct camd_ops.

Georgi Chorbadzhiyski 12 years ago
parent
commit
9b7ef3dc4c
2 changed files with 8 additions and 0 deletions
  1. 2
    0
      camd-cs378x.c
  2. 6
    0
      data.h

+ 2
- 0
camd-cs378x.c View File

@@ -179,6 +179,8 @@ READ:
179 179
 }
180 180
 
181 181
 void camd_proto_cs378x(struct camd_ops *ops) {
182
+	strcpy(ops->ident, "cs378x");
183
+	ops->proto		= CAMD_CS378X;
182 184
 	ops->connect	= cs378x_connect;
183 185
 	ops->disconnect	= cs378x_disconnect;
184 186
 	ops->reconnect	= cs378x_reconnect;

+ 6
- 0
data.h View File

@@ -75,7 +75,13 @@ struct camd_msg {
75 75
 	struct ts		*ts;
76 76
 };
77 77
 
78
+enum camd_proto {
79
+	CAMD_CS378X,
80
+};
81
+
78 82
 struct camd_ops {
83
+	char ident[16];
84
+	enum camd_proto proto;
79 85
 	int (*connect)(struct camd *c);
80 86
 	void (*disconnect)(struct camd *c);
81 87
 	int (*reconnect)(struct camd *c);

Loading…
Cancel
Save