summaryrefslogtreecommitdiff
path: root/recipes/librfid/files/spidev.patch
blob: 29c3a171eab1aecc65b0b7423a63650c8f6c6235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Index: librfid-0.2.0/utils/common.c
===================================================================
--- librfid-0.2.0.orig/utils/common.c
+++ librfid-0.2.0/utils/common.c
@@ -72,15 +72,11 @@ struct rfid_protocol_handle *ph;
 
 int reader_init(void) 
 {
-	printf("opening reader handle OpenPCD, CM5x21\n");
-	rh = rfid_reader_open(NULL, RFID_READER_OPENPCD);
+	printf("opening reader handle SPIDEV\n");
+	rh = rfid_reader_open("/dev/spidev", RFID_READER_SPIDEV);
 	if (!rh) {
-		fprintf(stderr, "No OpenPCD found\n");
-		rh = rfid_reader_open(NULL, RFID_READER_CM5121);
-		if (!rh) {
-			fprintf(stderr, "No Omnikey Cardman 5x21 found\n");
-			return -1;
-		}
+		fprintf(stderr, "No spidev RFID found\n");
+		return -1;
 	}
 	return 0;
 }