Commit graph

45 commits

Author SHA1 Message Date
Audrey Diacre
84a864f8d3 test/test_device_modes_as_dep: increase duration of sleep() between nfc_idle() and nfc_target_init() to wait for the end of nfc_initiator_poll_dep_target(). 2012-01-13 14:41:27 +00:00
Audrey Diacre
bd0de9bd61 test: rename test_dep to test_device_modes_as_dep and improve it. 2012-01-13 09:58:47 +00:00
Audrey Diacre
cc8d4f68ab tests: add test_dep which tests states of 2 devices. 2012-01-12 08:49:19 +00:00
Audrey Diacre
1ec504e163 nfc_list_devices() function returns now the number of devices found. 2012-01-10 10:35:36 +00:00
Audrey Diacre
00818e048c rx buffer size parameter of nfc_target_init() function is now a const size_t. 2012-01-09 11:26:57 +00:00
Audrey Diacre
c10b473361 rx buffer size parameter of pn53x_transceive() function is now a const size_t. 2012-01-09 10:24:00 +00:00
Audrey Diacre
3b8598dde8 libnfc/test: fix some forgotten modifications due to the last revision. 2012-01-06 08:36:24 +00:00
Audrey Diacre
601105ef79 fix bad cast done in last revision. 2012-01-05 17:03:38 +00:00
Audrey Diacre
642f9a38f7 nfc_target_receive_bytes() function does not now use pszRx as parameter because this function returns it. 2012-01-05 16:33:55 +00:00
Audrey Diacre
239fd750c4 add timeout on nfc_target_init() and this function returns now received bytes count on success. 2012-01-05 15:10:11 +00:00
Audrey Diacre
9c1371dcca nfc_target_send_bytes() function returns now sent bytes count on success and libnfc error code on failure. 2011-12-22 15:59:08 +00:00
Audrey Diacre
ac6f652368 nfc_target_receive_bytes() function returns now received bytes count on success and libnfc error code on failure. 2011-12-22 15:39:51 +00:00
Audrey Diacre
a40e63ab9d test/tes_dep_*: now check there is one or more selected dep target. 2011-12-22 14:16:12 +00:00
Audrey Diacre
658fceb7fc nfc_initiator_select_dep_target() function returns now selected D.E.P targets count on success. 2011-12-22 13:28:41 +00:00
Audrey Diacre
ff066e394d nfc_initiator_deselect__target() function returns now libnf error code. 2011-12-21 09:53:16 +00:00
Audrey Diacre
c41d7de8ca nfc_initiator_select_dep_target() function returns nox libnf error code and fix some uses of nfc_initiator_transceive_bytes() function. 2011-12-21 09:15:44 +00:00
Audrey Diacre
42276ccd14 the following functions now return libnfc error code:
_ pn53x_set_tx_bits
_ pn53x_read_register
_ pn53x_InAutoPoll
_ pn53x_TgInitAsTarget
_pn53x_init
2011-12-20 14:41:17 +00:00
Audrey Diacre
9c5ec3c4e1 the following functions now return libnfc error code:
_pn53x_write_register()
_pn53x_WriteRegister()
_pn53x_transceive()
_pn53x_SAMConfiguration()
_pn53x_PowerDown()
 _pn53x_InListPassiveTarget()
_pn53x_InDeselect()
_pn53x_InRelease()
_pn53x_RFConfiguration__*
2011-12-20 11:25:33 +00:00
Audrey Diacre
ba2a7cfe2e nfc_target_init() function returns now 0 on succes and libnfc error code on failure. 2011-12-19 15:35:37 +00:00
Audrey Diacre
31f67be83e add some forgotten NFC_SUCCESS returns in pn53x_set_property_bool function and fix some return types in test/ 2011-12-19 14:05:02 +00:00
Audrey Diacre
6eb2499aa8 test/* uses the new nfc_device_get_name() function. 2011-12-19 09:15:42 +00:00
Audrey Diacre
98355d36a7 nfc_initiator_init returns now error code and nfc_initiator_list_passive_targets returns now the number of targets found or error code. 2011-12-15 11:46:14 +00:00
Audrey Diacre
8b76d55fdc test/test_dep_active: fix multiple active DEP baudrates. 2011-12-14 10:31:08 +00:00
Audrey Diacre
9906e11572 oups: forgot to uncomment a line. 2011-12-09 16:36:29 +00:00
Audrey Diacre
1e66caecd6 test/test_dep_active: add new DEP active test 2011-12-09 13:55:35 +00:00
Audrey Diacre
cc2622c49f test/test_dep*: rename test_dep to test_dep_passive and add new 106kbps pass. 2011-12-09 13:41:51 +00:00
Romuald Conty
c286eec920 DEP enhancements:
- Add timeout on InJumpForDEP (pn53x) and initiator_select_dep (libnfc API)
- test_dep now works again (except 424Kbps)
- Fix ndi.ndm feeling when select a DEP target
Important: test_dep does not work on PN53x_USB devices after running previous tests
2011-12-06 10:05:35 +00:00
Audrey Diacre
9e67423cff Fix some warnings in test. 2011-11-24 11:12:01 +00:00
Audrey Diacre
784a2f86a2 Change byte_t type to uint8_t (Fixes Issue 147) 2011-11-24 10:54:42 +00:00
Audrey Diacre
c718fafee7 Massive code clean up: (Fixes Issue 161)
- Remove typedef from internal structs
- Remove _t suffix from types
- Fix tests using connstrings
2011-11-23 15:55:40 +00:00
Romuald Conty
c30453d176 Add a threaded DEP test to check DEP communication between two local devices 2011-09-12 14:30:59 +00:00
Romain Tartiere
520e64c095 Compile unit tests only on demand unless using --enable-debug. 2011-05-11 17:38:11 +00:00
Romuald Conty
d37b917352 chips/pn53x: remove double defines for pn53x registers. 2011-05-10 15:13:19 +00:00
Philippe Teuwen
4124dc662d Cleanup of initializations 2011-05-05 10:12:26 +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
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
cfa5e9be58 Fix typo. 2011-01-07 10:56:43 +00:00
Romuald Conty
59a93eab45 Add register access test. 2010-12-29 13:15:49 +00:00
Romuald Conty
af88da1a9c Replace nfc_target_info_t with nfc_target_t in API function, we now have a coherent struct to handle nfc_target_t, use it! 2010-10-14 11:44:43 +00:00
Romuald Conty
d289eabc36 Attempt to provide clean types for API 2010-10-13 17:43:23 +00:00
Romuald Conty
9020014160 Rename nfc_modulation_t as pn53x_modulation_t 2010-10-13 15:39:52 +00:00
Romain Tartiere
306e51fa72 Remove useless nfc_perror lines from tests.
The endianness problem spoken about in r586 does not exist since the value
in pn53x_get_reg() is in a register so keep the ugly boolean operations to
copy the value: using all endianness conversions macros is a PITA.
2010-08-28 14:40:29 +00:00
Romain Tartiere
1130036bf3 - Detect errors in pn53x_get_reg();
- Add a test case to confirm an endianness problem on little-endian machines.
2010-08-28 14:27:33 +00:00
Romain Tartiere
d7e0b926ac Rename the only test of the regression test suite to a more explicit name.
- While here, add assertions, enhance slightly the code and decrease the number of loop turns.
2010-08-13 18:34:30 +00:00
Romain Tartiere
9cc31f6aad Add a regression test directory. 2010-08-11 16:36:35 +00:00