Commit graph

34 commits

Author SHA1 Message Date
Philippe Teuwen
e4df2f3334 astyle 2017-02-18 13:05:59 +01:00
Philippe Teuwen
9cb9e0e6da Fix cppcheck warning: The scope of the variable X can be reduced. 2013-04-05 14:38:03 +02:00
Romuald Conty
2d53208082 Fix unit tests
This commit bring tests to life!

New issue
Summary: test_dep_states test fails
When first device is idle, the second one states  "RF Transmission Error" instead of simply not found any available device.
Full cutter log here:

debug   libnfc.chip.pn53x       InJumpForDEP
debug   libnfc.chip.pn53x       Timeout values: 300
debug   libnfc.bus.uart TX: 00  00  ff  05  fb  d4  56  00  00  00  d6  00
debug   libnfc.bus.uart RX: 00  00  ff  00  ff  00
debug   libnfc.chip.pn53x       PN53x ACKed
debug   libnfc.bus.uart Timeout!
debug   libnfc.chip.pn53x       InJumpForDEP
debug   libnfc.chip.pn53x       Timeout values: 300
debug   libnfc.bus.uart TX: 00  00  ff  05  fb  d4  56  00  00  00  d6  00
debug   libnfc.bus.uart RX: 00  00  ff  00  ff  00
debug   libnfc.chip.pn53x       PN53x ACKed
debug   libnfc.bus.uart RX: 00  00  ff  03  fd
debug   libnfc.bus.uart RX: d5  57
debug   libnfc.bus.uart RX: 01
debug   libnfc.bus.uart RX: d3  00
debug   libnfc.chip.pn53x       Chip error: "Timeout" (01), returned error: "RF Transmission Error" (-20))
F
===============================================================================
Failure: test_dep_states
Problem with nfc_idle
<0 == res>
expected: <0>
  actual: <-20>

diff:
? -20

./test_device_modes_as_dep.c:171: initiator_thread(): cut_assert_equal_int(0, res, cut_test_context_set_current_result_user_message( cut_test_context_current_peek(), cut_test_context_take_printf(cut_test_context_current_peek(), "Problem with nfc_idle")))
===============================================================================
2013-01-18 18:28:45 +01:00
Philippe Teuwen
568317929d astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper --unpad-paren --pad-header --align-pointer=name 2012-05-29 15:55:35 +00:00
Philippe Teuwen
01303fab0d astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper --unpad-paren --pad-header 2012-05-29 15:54:36 +00:00
Philippe Teuwen
562205cc14 astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux --pad-oper 2012-05-29 15:54:00 +00:00
Romuald Conty
26865bbc19 Remove extra whitespaces/tabs before EOL.
find . -name '*.[ch]' | xargs perl -pi -e 's/\t+$//; s/ +$//'

Thanks to Ludovic.
2012-05-29 00:33:22 +00:00
Audrey Diacre
26245add73 Merge libnfc-1.5-new-api branch to trunk (r1168:1303). 2012-01-25 09:56:05 +00:00
Audrey Diacre
5a475cf074 add some whitespaces 2012-01-20 09:17:38 +00:00
Audrey Diacre
4c011279ff add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions. 2012-01-18 16:22:06 +00:00
Audrey Diacre
207199dc34 examples, test and utils use now nfc_exit() function. 2012-01-18 11:36:18 +00:00
Audrey Diacre
1d55b6f8c6 examples, test and utils use now nfc_init() function. 2012-01-18 11:09:01 +00:00
Audrey Diacre
324af418db rename nfc_connect() function to nfc_open(). 2012-01-17 15:21:56 +00:00
Audrey Diacre
9eb37b3eee rename nfc_disconnect() function to nfc_close(). 2012-01-17 14:52:39 +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
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