diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-14 21:03:43 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-14 21:03:43 +0000 |
commit | 245b3c8a6519eb11e7b907dd2d0f990e929bc4f7 (patch) | |
tree | 2a6158a4dcb85f3181f0c91ecfa59a4dea4e68a5 | |
parent | f7a420f2387b0bb660df08954d4bf35a66937203 (diff) |
Enhances timing by 14 carrier cycles
git-svn-id: https://svn.openpcd.org:2342/trunk@455 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
-rw-r--r-- | openpicc/application/iso14443a_diffmiller.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/openpicc/application/iso14443a_diffmiller.c b/openpicc/application/iso14443a_diffmiller.c index a36ea6b..e6eb6d8 100644 --- a/openpicc/application/iso14443a_diffmiller.c +++ b/openpicc/application/iso14443a_diffmiller.c @@ -191,14 +191,13 @@ static inline void end_frame(struct diffmiller_state * const state, const u_int3 #define DO_BIT_1 { \ last_data_bit = 1; \ - if(counter<8) { \ - state->byte |= (1<<counter); \ - state->parity ^= 1; \ - } \ if(++counter==9) { \ append_to_frame(state, state->byte, 1, 8); \ counter=state->byte=state->parity=0; \ - } \ + } else { \ + state->byte |= (1<<counter); \ + state->parity ^= 1; \ + } \ PRINT_BIT(" 1"); \ } |