summaryrefslogtreecommitdiff
path: root/openpicc/application/iso14443_layer2a.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-14 18:29:28 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-14 18:29:28 +0000
commitf7a420f2387b0bb660df08954d4bf35a66937203 (patch)
tree43d7ca7aef351e23bde9081bf7f41433b71ed3b3 /openpicc/application/iso14443_layer2a.c
parentb7a11d3b34aebfc77addfcd2ef7803c38d4e1dcc (diff)
Faked anticollision working now. During stress test (OpenPCD reqa firmware in anticol mode performing one cycle every 70ms) there were 52 late frames in 15992.
git-svn-id: https://svn.openpcd.org:2342/trunk@454 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/iso14443_layer2a.c')
-rw-r--r--openpicc/application/iso14443_layer2a.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/openpicc/application/iso14443_layer2a.c b/openpicc/application/iso14443_layer2a.c
index 65d5d6a..2288eaa 100644
--- a/openpicc/application/iso14443_layer2a.c
+++ b/openpicc/application/iso14443_layer2a.c
@@ -132,7 +132,8 @@ int iso14443_transmit(ssc_dma_tx_buffer_t *buffer, unsigned int fdt, u_int8_t as
clock_switch(CLOCK_SELECT_CARRIER);
ssc_set_gate(0);
tc_fdt_set(fdt);
- tc_cdiv_set_divider(8); // FIXME Magic hardcoded number
+ // We'll keep the divider at 8
+ //tc_cdiv_set_divider(8); // FIXME Magic hardcoded number
if(!async) {
/* FIXME Implement */
@@ -184,6 +185,11 @@ u_int8_t iso14443_get_fast_receive(void)
static void iso14443_ssc_callback(ssc_callback_reason reason, void *data)
{
+ if( reason == SSC_CALLBACK_SETUP ) {
+ // We'll keep the divider at 8
+ tc_cdiv_set_divider(8); // FIXME Magic hardcoded number
+ }
+
if(reason == SSC_CALLBACK_RX_FRAME_BEGIN) {
/* Busy loop for the frame end */
int *end_asserted = data, i=0;
@@ -217,7 +223,8 @@ static void iso14443_ssc_callback(ssc_callback_reason reason, void *data)
clock_switch(CLOCK_SELECT_CARRIER);
ssc_set_gate(1);
tc_fdt_set(0xff00);
- tc_cdiv_set_divider(RX_DIVIDER);
+ // We'll keep the divider at 8
+ //tc_cdiv_set_divider(RX_DIVIDER);
tc_cdiv_sync_reset();
#if 1
int old=usb_print_set_default_flush(0);
@@ -243,7 +250,8 @@ static void iso14443_tc_recv_callback(tc_recv_callback_reason reason, void *data
clock_switch(CLOCK_SELECT_CARRIER);
ssc_set_gate(1);
tc_fdt_set(0xff00);
- tc_cdiv_set_divider(RX_DIVIDER);
+ // We'll keep the divider at 8
+ //tc_cdiv_set_divider(RX_DIVIDER);
tc_cdiv_sync_reset();
}
}
personal git repositories of Harald Welte. Your mileage may vary