Commit graph

149 commits

Author SHA1 Message Date
Romuald Conty
310d7eba07 New str_nfc_target() function in API.
This allow to convert a nfc_target struct into allocated string.
2012-09-17 13:47:54 +00:00
Romuald Conty
de827ab583 nfc_device_get_information_about() now allocates returned string.
Note: must be freed by free().
2012-09-17 13:47:30 +00:00
Romuald Conty
b4ef1a3a5d New nfc_initiator_init_secure_element() function to set SAM as wired card (only relevant with a PN532 SAM-equipped) 2012-06-04 00:16:28 +00: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
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
Romuald Conty
8f08431ddf New function nfc_initiator_target_is_present() to test is a previously selected target is in the field. 2012-05-27 22:34:21 +00:00
Romuald Conty
2c9275adde nfc_initiator_transceive_bytes() now take a constant size for Rx buffer to have a cleaner API: no more in/out parameters 2012-05-27 21:06:22 +00:00
Romuald Conty
e4802de965 Add new public functions to grab information in string format:
- New nfc_device_get_information_about()
 - Moved nfc-utils function str_nfc_baud_rate()
 - New str_nfc_modulation_type()
 - Add new device_get_information_about callback to nfc_driver struct
 - Export new symbols
 - Changed internal pn53x firmware text handling: we now store firmware text for further operations
 - print_nfc_target() now uses str_nfc_* functions
 - nfc-probe util now have a verbose which display information on detected devices (Fix verbose set but not used warning ;-) )
2012-05-17 00:48:47 +00:00
Romuald Conty
45ef3b43c4 Fix unused result warnings and add a new NFC_ESOFT error. 2012-05-16 18:24:16 +00:00
Philippe Teuwen
7597055f26 fix typos 2012-05-14 19:44:03 +00:00
Romuald Conty
e7f85811a1 fix *get_supported_modulation and *get_supported_baud_rate protos in nfc_driver and public ones. 2012-03-01 13:52:51 +00:00
Audrey Diacre
4cc3c72b31 add nfc_device_get_supported_modulation() and nfc_device_get_supported_baud_rate() documentation. 2012-02-20 08:36:15 +00:00
Audrey Diacre
5a5bdf1d66 add nfc_device_get_supported_modulation() and nfc_device_get_supported_baud_rate() functions. 2012-02-17 12:09:56 +00:00
Audrey Diacre
3d393e58a9 add some Doxygen documentation. 2012-01-31 09:49:43 +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
Romuald Conty
b366b8c027 add nfc_device_get_connstring() function and nfc-probe example to show devices connection strings 2012-01-18 13:17:01 +00:00
Audrey Diacre
d1b0e93e8e add initialization and deinitialization. 2012-01-18 09:53:45 +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
Romuald Conty
e86d08218b add nfc_initiator_poll_dep_target() 2012-01-10 14:17:18 +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
Romuald Conty
22bea8d99b nfc_target_receive_*() need to know rx buffer size 2012-01-05 21:35:02 +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
7e7ee3299e nfc_target_receive_bits() function does not now use pszRxBits as parameter because this function returns it. 2012-01-05 15:50:07 +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
c80ebdca25 nfc_abort_command() function returns now 0 on success and libnfc error code on failure and fix some warnings. 2012-01-05 14:49:02 +00:00
Audrey Diacre
331234713d nfc_idle() function returns now 0 on success and libnfc error code on failure. 2012-01-05 08:57:16 +00:00
Romuald Conty
93b34fa70b enhance new error handling
- add accessor to last error occured
- add new public error NFC_ETGRELEASED (Target Released)
2012-01-05 01:39:10 +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
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
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
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
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
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