Commit graph

157 commits

Author SHA1 Message Date
Romuald Conty
5f890fedcc Remove obsolete callbacks 2011-05-05 09:45:39 +00:00
Philippe Teuwen
412c326c3a better fix for timed fcts 2011-05-04 14:14:18 +00:00
Philippe Teuwen
8169da3701 pn53x: Fix bug in _timed fcts 2011-05-03 13:55:20 +00:00
Audrey Diacre
e82e897bd9 pn53x: oups, fix typo. 2011-05-03 12:24:33 +00:00
Audrey Diacre
85a30c0897 pn53x:reorder functions according to header. 2011-05-03 12:08:54 +00:00
Romuald Conty
96358368f5 cast explicitly sz (uint8_t) in size_t 2011-05-02 16:43:03 +00:00
Romuald Conty
6fc4a5b70a Use a new current target pointer to choose correctly the sending/receiving method (ie. TgSetData/TgGetData or TgResponseToInitiator/TgGetInitiatorCommand). 2011-04-27 14:42:27 +00:00
Romuald Conty
1198a71d64 chip/pn53x: handle PN532 "power down" and "low VBat" power mode instead of a simple "sleep" mode. (Fixes Issue 167) 2011-04-27 13:16:36 +00:00
Romuald Conty
fe49ccd701 Implement extended frame send/receive for PN532_UART driver. 2011-04-13 16:39:58 +00:00
Philippe Teuwen
55495e1e97 *_timed fcts: proper error codes 2011-04-05 13:44:36 +00:00
Philippe Teuwen
743fa048e1 pn53x: adapt MaxRetries to avoid issue with 2 tags on PN531, using same value as what LoGO does 2011-04-05 13:39:47 +00:00
Philippe Teuwen
7f2b300dde support crc auto-handling in ...transceive_bytes_timed 2011-04-04 22:23:38 +00:00
Philippe Teuwen
ffe2714b28 pn53x: factorize timer code 2011-04-04 19:04:43 +00:00
Philippe Teuwen
fb398c387f pn53x: add timed versions of transceive_bytes/bits 2011-04-04 14:16:36 +00:00
Romuald Conty
b21d3c6728 ASK LoGO: enable progressive field feature. 2011-04-04 09:53:33 +00:00
Romuald Conty
71c400ae14 Fix a bug when value is larger than mask. 2011-04-04 09:53:00 +00:00
Philippe Teuwen
5600007dd3 pn53x: factorize & generalize CHIP_DATA() usage 2011-04-04 09:26:10 +00:00
Romuald Conty
5db8be908b Windows support contribution:
- Move CMake modules from cmake_modules/ to cmake/modules/
 - CMake now use cmake/config_windows.h.cmake to create config.h on Windows platform
 - contrib/windows.h header is automagically included by config.h
 - Put missing NFC_EXPORT macro on front of emulation API
 - nfc-mfclassic and nfc-mfcultralight examples are now compiled under Windows
Many thanks to Glenn Ergeerts which provide the initial patch.
2011-03-31 13:38:49 +00:00
Romain Tartiere
ad530f6d02 Various cleanups.
- New functions nfc_device_new(), nfc_device_free();
- Add experimental abort mechanism for the PN53x USB driver;
- Move chip-specific variables from nfc_device_t to pn53x_data (Fixes Issue 124).
2011-03-09 13:37:16 +00:00
Romuald Conty
70c2836798 Add some useful comments on ASK LoGO hardware, and define missing registers. 2011-03-07 02:47:21 +00:00
Romain Tartiere
29618b7e27 Fix crash when pn53x_TgInitAsTarget() is aborted. 2011-03-05 21:27:10 +00:00
Romain Tartiere
f1f31d1b4c Unbreak and merge PN53x USB drivers.
While here fix some includes that would not work if SRCDIR != BUILDDIR.
2011-03-05 19:54:52 +00:00
Romuald Conty
0efa47880b Hardware abstraction layer for libnfc:
Suppress any PN53x references in nfc.c
Improve nfc_driver_t struct to embedded HAL API
Merge macros from nfc-messages.h into nfc-internal.h
Remove useless files: nfc-messages.h, buses.h and chips.h
Implement HAL for ARYGON driver
Move send/receive callbacks from nfc_driver_t to internal chip io callbacks (since there are dedicated to pn53x framing)
2011-03-05 10:06:52 +00:00
Romain Tartiere
a55a52e0a9 Fix pn53x_InAutoPoll() return value on user cancelation (true instead of false). 2011-03-05 01:46:16 +00:00
Romain Tartiere
97dd0b63d7 Implement abort for pn532_uart driver. 2011-03-04 20:17:28 +00:00
Romain Tartiere
4b6060aeeb Enable aborting blocking commands (e.g. TgInitAsTarget) and refactor
*_check_communication() as pn53x_check_communication().
2011-03-04 19:59:49 +00:00
Romain Tartiere
7ed71a1501 Merge r912 into trunk. 2011-03-04 15:49:16 +00:00
Romain Tartiere
61a5268d65 Do not coredump if we have an unexpected reply.
If we are speaking to the wrong device, it is very likely we will have an
"unexpected reply" and we should ignore it.
2011-03-04 11:16:18 +00:00
Romuald Conty
f81138b3c7 ARYGON driver works again and PN532_UART improved :)
drivers/pn532_uart: code clean up
chips/pn53x: new fonction to build frames
drivers/arygon: use the new way to drive UART (its far more stable)
2011-03-04 09:28:25 +00:00
Romuald Conty
7ec1080e16 Remove a dummy argument in pn53x_transceive(). 2011-03-02 15:32:52 +00:00
Romuald Conty
2608b3dc55 smart merge of r906 into trunk (Thanks to marko259 from libnfc forum). 2011-03-02 15:18:06 +00:00
Romuald Conty
5af845cdfc Broke whole the libnfc :-)
use a new way to handle drivers
use absolute include path instead of relative ones
move some nfc_device_t members in a better place
nfc_device_t now embeddeds driver data and chip data pointers (useful to be more generic)
use more readable variables instead of strange coding convention
move PRINT_HEX macro into nfc-internal.h
silent warnings with more strict CFLAGS
chips/pn53x: use the powerful C99 writing to construct PN53x commands
chips/pn53x: remove almost all memcpy()
chips/pn53x: WriteRegister, ReadRegister and SetParameters command wrappers are correctly named
chips/pn53x: introduce chip state (SLEEP, NORMAL or EXECUTE)
chips/pn53x: add SAMConfiguration command wrapper (need to be improved)
chips/pn53x: remove almost all const arrays
chips/pn53x: use human readable defines for commands instead of hex values
chips/pn53x: in debug mode, the PN53x command is shown in human-readable string, awesome isn't it? ;-)
drivers: split transceive() into send() and receive() to be able to handle more cases (differed replies, abort commands, etc) later
drivers: use a const structure of functions instead of -dirty- callbacks array
drivers/pn532_uart: major improvement of UART handling
drivers/pn532_uart: check PN53x frames when received
buses/uart: receive() is now based on expected bytes instead of calculated timeouts..
buses/uart: use a smart way to determine available ports on POSIX systems (tested on Linux and FreeBSD)
2011-03-02 15:00:44 +00:00
Romuald Conty
243100b676 Silent some compilation warnings (Fixes Issue 145) 2011-02-10 10:38:21 +00:00
Romuald Conty
91419f8ad3 chip/pn53x: set register directly if mask cover whole value. 2011-02-01 21:38:25 +00:00
Romuald Conty
0f8c23bddd Inform user if target UID can be emulated
New error: ETGUIDNOTSUP raised when UID is not 4 bytes long or does not start with 0x08 (Security restriction present in the NXP PN53x chips)
2011-01-07 16:15:18 +00:00
Romuald Conty
ba1db2f406 chips/pn53x: name commands like user manual 2011-01-06 14:52:45 +00:00
Romuald Conty
dd8ec29bb4 chips/pn53x: prefer pn53x_transceive() when possible. 2011-01-06 13:59:20 +00:00
Romuald Conty
6edb5a3bef Fix reply frame length for InAutoPoll 2011-01-06 13:20:45 +00:00
Romuald Conty
6ca32fbfb9 Fix reply length from transceive bits/bytes functions 2011-01-06 13:07:38 +00:00
Romuald Conty
1d085f21c9 Improve PN53x frame size calculation.
chips/pn53x: adjust size and defines to better handle reply size;
drivers/arygon: improve attempted reply size, should speed up the connexion;
drivers/pn532_uart: improve attempted reply size, should speed up the connexion;
2011-01-06 12:39:29 +00:00
Romuald Conty
ba37313cb8 Prevent from stack corruption when using PN533-based device and add errors handling for ReadRegister and WriteRegister. (Fixes Issue 135) 2010-12-29 14:01:14 +00:00
Romuald Conty
58dcf63e7c MERGE: libnfc-mingw-cross merge with trunk (r805-821) 2010-11-17 08:29:41 +00:00
Romuald Conty
6df612a364 Errors use #define instead of constant values.
Update Issue 84
Current 'ident' command breaks commit-concerned lines.
2010-11-15 18:50:53 +00:00
Romuald Conty
8798f6bbcd Fix ARYGON driver:
- Does not send any ACK frame at start: my ARYGON does get happy with this frame (see code comments)
 - Send a TAMA reset (for PN532) instead of ACK frame
 - Remove bzero use: its a deprecated function
2010-10-22 14:29:44 +00:00
Romuald Conty
72d7b66d2b Handle more corner case during convertion from nfc_* types to available pn53x_* types 2010-10-20 09:28:36 +00:00
Romuald Conty
5538fbd20f Add NBR_847 (used with ISO14443B) and update convert function. 2010-10-20 08:34:06 +00:00
Romuald Conty
f249af6266 Add ISO14443-4 modulation to hardware polling only when NDO_AUTO_ISO14443_4A have been enabled and document this features and known issues. 2010-10-19 09:34:18 +00:00
Romuald Conty
f9391ad823 Update some TODOs 2010-10-18 15:47:56 +00:00
Romuald Conty
b5d85fc6e1 Decode supported modulation from PN53x 2010-10-18 14:26:49 +00:00
Romuald Conty
bfb49b594f Clean the way to retrieve firmware 2010-10-18 13:19:30 +00:00