Romuald Conty
3629219a3b
Caller expect nfc_initiator_deselect_target() to be 0 on success. (Fixes Issue 209)
...
Thanks to Frank Morgner.
2012-10-30 23:22:22 +01: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
88a57a50b3
Fix error code when no reply is not ISO14443B2CT compliant
2012-10-03 16:21:02 +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
9f38ae715d
pn53x: allow more delay for Card Presence command (tested on PN533 and PN532 in various contexts).
2012-06-12 16:51:47 +00:00
Romuald Conty
ab312299d6
pn53x_reset_settings() now resets CRC, parity, easyframing and crypto1.
...
These settings are quite specifics and should be reset in other functions that call pn53x_reset_settings() too: i.e. nfc_initiator_init_secure_element()
2012-06-12 16:46:20 +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
Romuald Conty
6f10d6e321
pn53x: return all errors when NP_ACTIVATE_FIELD failed
2012-06-04 00:16:17 +00:00
Romuald Conty
f47af31fb7
Indent correctly previous commit (make style)
2012-06-03 21:05:26 +00:00
Romuald Conty
c973800164
nfc_device_target_is_present() checks if passed target if the current target before sending Card Presence command
2012-06-03 21:02:47 +00:00
Romuald Conty
b7a74931f6
Returns a NFC_ETGRELEASED error when MIFARE Classic's authentication failed (instead of NFC_ECHIP): a MIFARE Classic is halted on AUTH command failure.
2012-06-03 21:02:31 +00:00
Romuald Conty
c7820c6a77
Log an error when user-Rx buffer is too sort to gain data
2012-06-03 21:02:23 +00:00
Romuald Conty
62c4ffd0b7
Raises up default timeout from 250 to 350ms
...
PN53x sometimes needs more time to compute usual command (ie. with Diagnose/Card Presence when card become unreachable)
2012-05-30 23:02:56 +00:00
Romuald Conty
13e1e054c2
Minor code fix.
2012-05-30 23:02:48 +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
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
67522bae65
astyle --formatted --mode=c --indent=spaces=2 --indent-switches --indent-preprocessor --keep-one-line-blocks --max-instatement-indent=60 --brackets=linux
2012-05-29 15:53:43 +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
167238c60d
Fix uninitialized variable szTargetsData
2012-05-27 23:25:52 +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
Philippe Teuwen
ff87cf62b1
Fix segfault in pn53x_initiator_transceive_bytes when pszRx in NULL
...
Cause was "return *pszRx"
Segfault occured when listing a typeB'
2012-05-18 21:54:55 +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
05acb85372
Use explicit case instead of default in switch()
...
- Fix warnings while using -Wswitch-enum
- Fix two minor bugs due to a bad case handle
2012-05-16 17:51:34 +00:00
Romuald Conty
10f24d97aa
Any successfull PowerDown command have to change local power mode state
2012-05-16 16:48:06 +00:00
Ludovic Rousseau
59d47bc7da
Add MIN/MAX declarations in nfc-internal.h and nfc-utils.h
...
Remove the now useless #include <sys/param.h>
2012-05-13 19:15:44 +00:00
Ludovic Rousseau
5c82158a5d
Declare internal functions as static
...
Fixes compiler warnings:
pn53x.c:565: warning: no previous prototype for ‘pn53x_ReadRegister’
pn53x.c:591: warning: no previous prototype for ‘pn53x_WriteRegister’
pn53x.c:748: warning: no previous prototype for ‘pn53x_int_to_timeout’
pn53x.c:1003: warning: no previous prototype for ‘pn53x_initiator_select_passive_target_ext’
pn53x.c:1334: warning: no previous prototype for ‘__pn53x_init_timer’
pn53x.c:1355: warning: no previous prototype for ‘__pn53x_get_timer’
2012-05-13 12:29:39 +00:00
Romuald Conty
f98437c377
fix pn53x_get_supported_modulation() and pn53x_get_supported_baud_rate() functions
2012-03-01 13:43:04 +00:00
Romain Tartiere
05789e5a68
Fix a couple warnings.
2012-03-01 13:33:13 +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
983d4932f3
documentation: add utils and examples and hide internal files.
2012-01-31 14:28:45 +00:00
Audrey Diacre
3d393e58a9
add some Doxygen documentation.
2012-01-31 09:49:43 +00:00
Audrey Diacre
5a475cf074
add some whitespaces
2012-01-20 09:17:38 +00:00
Romuald Conty
a3a0002f8d
fix miss-returned error code (ETGREL -> NFC_ETGRELEASED).
2012-01-18 18:08:39 +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
bd0de9bd61
test: rename test_dep to test_device_modes_as_dep and improve it.
2012-01-13 09:58:47 +00:00
Audrey Diacre
0e2c60d0fa
fix some last_error with result of previous function.
2012-01-12 13:52:48 +00:00
Romuald Conty
efa86f0e35
fix various minor mistakes, ajust timeouts
2012-01-10 14:10:44 +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
5e796e0a26
rx buffer size parameter of pn53x_TgInitAsTarget() function is now a const size_t.
2012-01-09 10:47:35 +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
Romuald Conty
7df3bb5aeb
various minor fixes/enhancements
2012-01-06 13:08:16 +00:00
Audrey Diacre
e15f2eedbb
rename lastCommand by last_command.
2012-01-06 13:07:37 +00:00
Audrey Diacre
b41edfb0b4
rename ui8LastCommand by lastCommand.
2012-01-06 09:20:55 +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