Commit graph

1761 commits

Author SHA1 Message Date
Romuald Conty
af22d34d57 fix some return codes and error checkings 2012-01-04 20:50:05 +00:00
Romuald Conty
254053b940 fix few minor bugs:
- timeout values handling in pn53x_transceive()
- check error code after filling it in pn53x_transceive()
- fix pn53x_check_communication() return code
- lower timeout default values
- fix arygon_abort() return code
2012-01-04 20:02:51 +00:00
Audrey Diacre
52c72383f1 pn53x_build_frame() function returns now 0 on success and libnfc error code on failure. 2012-01-04 16:44:40 +00:00
Audrey Diacre
e87241184a pn53x_check_ack_frame() and pn53x_check_error_frame() functions return now 0 on success and libnfc error code on failure. 2012-01-04 16:32:16 +00:00
Audrey Diacre
4b373263e4 pn53x_idle() returns now 0 on success and libnfc error code on failure. 2012-01-04 16:26:57 +00:00
Audrey Diacre
7e1c776bc1 pn53x_check_communication() returns now 0 on success and libnfc error code on failure. 2012-01-04 16:19:24 +00:00
Audrey Diacre
240cdcddab pn53x_decode_target_data() returns now 0 on success and libnfc error code on failure. 2012-01-04 16:11:30 +00:00
Audrey Diacre
d4c5476652 pn53x_get_firmware_version() returns now 0 on success and libnfc error code on failure.. 2012-01-04 16:07:57 +00:00
Audrey Diacre
c1faa48f54 fix nfc_target_init(). 2012-01-04 15:59:34 +00:00
Audrey Diacre
a41b2b0da8 nfc_initiator_transceive_bytes_timed() function does not now use pszRx as parameter because this function returns it. 2012-01-04 15:53:41 +00:00
Audrey Diacre
b699743973 nfc_initiator_transceive_bits_timed() function does not now use pszRxBits as parameter because this function returns it. 2012-01-04 15:43:08 +00:00
Audrey Diacre
6e7092b160 nfc_initiator_transceive_bits() function does not now use pszRxBits as parameter because this function returns it. 2012-01-04 15:30:42 +00:00
Audrey Diacre
61c3e5b814 pn53x_wrap_frame() and pn53x_unwrap_frame() functions return now frame length in bits on success and libnfc error code on failure. 2012-01-04 14:59:16 +00:00
Audrey Diacre
0de1136037 nfc_target_receive_bits() function returns now received bits count on success and libnfc error code on failure. 2012-01-04 13:33:53 +00:00
Audrey Diacre
951dde8143 nfc_target_send_bits() function returns now sent bits count on success and libnfc error code on failure. 2012-01-04 13:27:15 +00:00
Audrey Diacre
1c49329ffa nfc_initiator_transceive_bits_timed() function returns now received bits count on success and libnfc error code on failure. 2012-01-04 13:18:11 +00:00
Audrey Diacre
d02da0db64 nfc_initiator_transceive_bytes_timed() function returns now received bytes count on success and libnfc error code on failure. 2012-01-04 11:54:55 +00:00
Audrey Diacre
61074f3497 nfc_initiator_transceive_bits() function returns now received bits count on success and libnfc error code on failure. 2012-01-04 11:46:07 +00:00
Romuald Conty
d6477df7a6 doc: quick start example minor fix (make distcheck OK) 2011-12-22 17:40:22 +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
b864215d63 pn53x_initiator_poll_target() function returns now polled targets count on success. 2011-12-22 11:16:27 +00:00
Audrey Diacre
340e80d7a8 pn53x_initiator_select_passive_target_ext() function now does not return error when there is no target. 2011-12-21 11:52:02 +00:00
Audrey Diacre
f93bc59504 nfc_initiator_select_passive_target() function returns now the selected passive targets count on success. 2011-12-21 11:33:21 +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
0f5cc5683d nfc_initiator_poll_target() function returns now libnfc error code. 2011-12-20 15:46:35 +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
c5f05f0592 pn53x_set_parameters() function returns now libnfc error code. 2011-12-20 13:37:54 +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
103485518c nfc_initiator_select_passive_target() function returns now libnfc error code. 2011-12-19 16:27:50 +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
145cc4b2ad nfc_initiator_transceive_bytesfunction now returns libnfc error code on failure and received bytes count on success. 2011-12-19 14:37:22 +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
Romuald Conty
bf7c36d9bb less structs and defines publicly exposed
- nfc_device is now an opaque type;
 - PN53x specific errors are not public anymore;
 - nfc_device_name() renamed to nfc_device_get_name() for the sake of consistency;
 - examples/*, utils/* uses the new nfc_device_get_name() function instead of access directly to struct's content;
 - new error defined: NFC_ERFTRANS for notifying about RF transmission error, its used by mifare.c to detect permissions error on mifare;
 - drivers initiator_transceive_bytes() function now returns libnfc's error code on failure (<0), and received bytes count on success (>=0);
 - remove some unused errors.
2011-12-19 00:23:21 +00:00
Romuald Conty
9bdc20353c nfc_device struct is not exposed as public API anymore (partial commit)
- split libnfc's errors and chip's errors
 - fix nfc_property enum
2011-12-15 16:02:38 +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
a615d969fd nfc_properties replace now nfc_options and nfc_configure is replaced by nfc_device_set_property_bool which returns error code. 2011-12-14 16:01:00 +00:00
Romuald Conty
c181cb35ec set correctly default timeout values 2011-12-14 15:03:29 +00:00
Romuald Conty
26b9c28f48 new properties to tune timeouts:
- add nfc_properties (will replace nfc_options)
 - introduce some error codes
 - rework functions to use the new timeout_command value
2011-12-14 13:27:11 +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
Romuald Conty
b3b14a3fb8 debian: udev rules file renamed 2011-12-09 16:14:50 +00:00
Romuald Conty
2ac8df2b28 contrib: move udev and devd files into contrib/ 2011-12-09 16:13:32 +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
90c05c7d13 Add a printf-based logging when log4c is not available (I experiemented some bugs using log4c) 2011-12-07 14:59:40 +00:00