Philippe Teuwen
b59f8fb3b4
Add more missing files
2017-04-04 13:31:39 +02:00
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
Philippe Teuwen
0aa1ff309e
Fix cppcheck warning "Variable is assigned a value that is never used"
2013-03-06 10:56:12 +01:00
Philippe Teuwen
a0ebd8ba15
Fix warning in tests: Variable might get clobbered by 'longjmp' or 'vfork'
2013-02-22 22:30:44 +01: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
Philippe Teuwen
a2cd236441
astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60
2012-05-29 15:52:51 +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
Ludovic Rousseau
48016fa297
warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2012-05-18 07:38:42 +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
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