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
Audrey Diacre
c30e9eed36
send/receive callbacks from internal chip io return now libnfc error code on failure.
2012-01-05 13:24:41 +00:00
Audrey Diacre
6ad07c3efb
pn53x_writeback_register() function returns now 0 on success and libnfc error code on failure.
2012-01-05 08:42:22 +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
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