Romuald Conty
f8601886fd
Adds nfc_free() function to freed allocated buffers
...
Fixes issue 228 (Thanks to Alex Lian)
2013-02-16 14:20:37 +01:00
lego
225094e2c8
Add nfc_register_driver. Issue 137.
...
The nfc_register_driver allows users of the library to write their
own device drivers without needing to resort to hacking libnfc itself.
2013-02-01 14:40:40 +02:00
Romuald Conty
cd2b03a08a
Add timeout parameter to nfc_emulate_target() function.
...
Fixes issue 219.
Thanks to raidolinja.
2013-01-30 00:10:24 +01:00
Romuald Conty
5b0e276572
Examples and utils are now updated to use the requiered nfc_context
2012-12-05 00:51:13 +01:00
Romuald Conty
dc949c257e
Removes nfc_get_default_device() function.
...
The nfc_get_default_device() is not needed anymore since the first element from returned nfc_connstring list of nfc_list_devices() function.
Plus, nfc_open() can be use with NULL nfc_connstring which will select automatically the first available device (ie. the default one).
2012-12-05 00:51:13 +01:00
Romuald Conty
7963fdfc3b
Import code to load configuration from file.
...
WARNING: This commit do not contains a fully cleaned code:
- Only nfc-list have been tested
- Some -commented- code is not used ATM
- Some printf-as-debug remain in this commit
... but that a bit usable so... happy hacking ;-)
2012-11-24 13:10:52 +01:00
Romuald Conty
dd451da4a5
Change *transceive*() API to be closer to *transceive_bytes.
...
Warning: only prototypes have been changed, implementation does not take care about buffer size.
New issue
Summary: Implement buffer overflow protection on all *transceive*() functions
*transceive*() functions do have an argument for rx buffer but some of them dont use it to protect user from buffer overflow.
2012-11-23 16:54:38 +01:00
Philippe Teuwen
fda8d60ce0
Adapt *transmit_bytes_timed API to be closer to *transmit_bytes
2012-11-12 16:54:03 +01:00
Romuald Conty
9f90a04a84
nfc_initiator_transceive_bytes() returns NFC_EMFCAUTHFAIL when AUTH command failed on a Mifare Classic
2012-11-01 01:27:06 +01:00
Romuald Conty
397222c33f
Removes --enable-serial-autoprobe option at compile and replace this feature by LIBNFC_INTRUSIVE_SCAN environment variable at run time.
2012-10-21 14:11:38 +00:00
Romuald Conty
9afa3c6598
Use copyright format recommended by GNU project.
...
http://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
2012-10-21 14:09:16 +00:00
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