aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/src/pcd
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-12-18 12:03:40 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-12-18 12:03:40 +0000
commit5200cf56dd9f0c698011c59b96abdb447a76ac1f (patch)
tree26cf8e46e8653f74704e99f758d4bdb21c38ce58 /firmware/src/pcd
parentd60b7ba4bd0284ca3f1919835face2234c63f928 (diff)
add some more debug statements
git-svn-id: https://svn.openpcd.org:2342/trunk@281 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/pcd')
-rw-r--r--firmware/src/pcd/main_librfid.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/src/pcd/main_librfid.c b/firmware/src/pcd/main_librfid.c
index 8bb7ccb..a5a488d 100644
--- a/firmware/src/pcd/main_librfid.c
+++ b/firmware/src/pcd/main_librfid.c
@@ -112,6 +112,7 @@ static int init_proto(void)
opcdh->reg = 0x03;
opcdh->val = l2h->l2->id;
+ detect_rctx->tot_len = sizeof(*opcdh) + sizeof(*l2c);
#if 0
/* copy UID / PUPI into data section */
rfid_layer2_getopt(l2h, RFID_OPT_LAYER2_UID, (void *)l2c->uid,
@@ -122,8 +123,6 @@ static int init_proto(void)
rfid_layer2_getopt(l2h, RFID_OPT_LAYER2_PROTO_SUPP,
&l2c->proto_supported, &size);
- detect_rctx->tot_len = sizeof(*opcdh) + sizeof(*l2c);
-
switch (l2h->l2->id) {
case RFID_LAYER2_ISO14443A:
break;
@@ -134,7 +133,8 @@ static int init_proto(void)
}
#endif
req_ctx_set_state(detect_rctx, RCTX_STATE_UDP_EP3_PENDING);
- }
+ } else
+ DEBUGPCRF("=>>>>>>>>>>>>>>no req_ctx for L2!");
ph = rfid_protocol_scan(l2h);
if (!ph)
return 3;
@@ -179,7 +179,8 @@ static int init_proto(void)
}
#endif
req_ctx_set_state(detect_rctx, RCTX_STATE_UDP_EP3_PENDING);
- }
+ } else
+ DEBUGPCRF("=>>>>>>>>>>>>>>no req_ctx for L2!");
led_switch(1, 1);
return 4;
@@ -207,7 +208,7 @@ void _main_func(void)
rfid_layer2_close(l2h);
rc632_turn_off_rf(NULL);
- { volatile int i; for (i = 0; i < 0x3ffff; i++) ; }
+ { volatile int i; for (i = 0; i < 0xfffff; i++) ; }
rc632_turn_on_rf(NULL);
led_switch(1, 0);