Commit graph

2194 commits

Author SHA1 Message Date
Philippe Teuwen
f184407cc5 Makefile: fix option for recent astyle 2017-02-18 13:05:45 +01:00
Philippe Teuwen
e8d44f1ee8 typo 2017-02-18 13:05:02 +01:00
Philippe Teuwen
4e4438435d Update README about pn533_usb 2017-02-18 01:59:27 +01:00
Philippe Teuwen
02c06c8e28 Update ChangeLog 2017-02-18 01:51:59 +01:00
Philippe Teuwen
047379406e Merge pull request #392 from jaasuarezvi/patch-1
Update README.md
2017-02-18 00:15:01 +01:00
Philippe Teuwen
be1b897617 Merge pull request #308 from AxisRay/master
Bugfix:function setenv() and unsetenv() are invalid on windows AND no variable prefix set for WIN32 in CMakeLists
2017-02-17 12:24:38 +01:00
Philippe Teuwen
15c31aecdb Merge pull request #362 from snowy13/master
Raspberry Pi 3 Conf Sample
2017-02-17 12:15:48 +01:00
Philippe Teuwen
ff37cdb2be Replace deprecated readdir_r by readdir
This reverts 262555d5, 7fb53873 and a0b859b2
2017-02-17 12:10:33 +01:00
Philippe Teuwen
99a7d9aa35 Merge pull request #387 from ChristophGr/master
allow to cross-compile 32 and 64 bit versions of the library for windows
2017-02-17 11:45:55 +01:00
Philippe Teuwen
c5e8adc169 mfclassic: avoid hardcoded offsets & sizes 2017-02-17 11:31:13 +01:00
Philippe Teuwen
646ab57ace fix typo 2017-02-17 10:31:25 +01:00
Philippe Teuwen
db4433f116 CMake: set policy CMP0045 2017-02-17 10:28:53 +01:00
Philippe Teuwen
7e3a7a6d05 Merge pull request #366 from oliv3r/master
Improve logging and allow building of debian packages
2017-02-17 10:15:27 +01:00
Philippe Teuwen
732a282190 Merge branch 'master' into master 2017-02-17 10:15:04 +01:00
Philippe Teuwen
d808802b16 typos 2017-02-17 10:11:34 +01:00
Philippe Teuwen
b86b7efb10 Fix number of blocks written
A strange move changed the way written pages are bound in commit ed62b01a.
As a result the last 3 blocks weren't written anymore.
2017-02-17 09:56:35 +01:00
Philippe Teuwen
11bcf05a75 Fix typo. Fix issue #377 2017-02-16 23:12:38 +01:00
Emmanuel Dreyfus
e26fe912fd NetBSD serial ports 2017-02-16 23:08:41 +01:00
Emmanuel Dreyfus
20a1b978f3 NetBSD definition for CCID ioctl 2017-02-16 23:08:36 +01:00
Philippe Teuwen
968f59a988 Remove unneeded test, fix issue #376 2017-02-16 23:05:02 +01:00
Philippe Teuwen
e50b18848f Remove spurious mirror_uint8_ts declaration, fix issue #375 2017-02-16 23:00:37 +01:00
Philippe Teuwen
372bf37eec Blacklist pn533_usb to fix issue #391 2017-02-16 22:32:16 +01:00
Philippe Teuwen
295c70911a Restrict MFC Mini detection according to AN10833 2017-02-16 22:31:10 +01:00
Philippe Teuwen
f16aeda9d0 Merge pull request #380 from llorephie/patch-2
Update README.md
2017-02-16 22:21:21 +01:00
Jairo Andres Suarez
7991c7d60c Update README.md 2017-02-14 18:47:27 -05:00
Adam Laurie
84c3e8a3ba Fix number of blocks written. Fix number of written blocks reported. 2017-01-30 21:47:06 +00:00
Christoph Gritschenberger
11a2da2811 allow to cross-compile 32 and 64 bit versions of the library for windows 2017-01-25 18:44:44 +01:00
jgeslin
f9f03fa7fa Debug dedicated implementation removed 2017-01-12 09:53:40 +01:00
Romuald Conty
8e5ec4acf3 Merge pull request #383 from centromere/patch-2
Fix typo in nfc.c
2016-12-11 16:46:36 +01:00
Romuald Conty
e0c72b782f Merge pull request #382 from centromere/patch-1
Fix typo in nfc.h
2016-12-11 16:46:04 +01:00
Romuald Conty
3592a60c1d Merge pull request #381 from llorephie/patch-1
Update Makefile.am
2016-12-11 16:45:22 +01:00
John Galt
9c7b9eda8c Fix typo in nfc.c 2016-12-07 07:22:27 -05:00
John Galt
b38597f1e0 Fix typo in nfc.h 2016-12-07 06:17:04 -05:00
Romuald Conty
e9a750fc00 Merge pull request #379 from oliv3r/Errata_on_i2c_timing
drivers: pn532_i2c: Errata on i2c timing
2016-12-06 17:58:30 +01:00
Maxim Martyanov
e32cc068ec Update README.md
README-Windows.txt => README-Windows.md
2016-12-06 20:44:31 +04:00
Maxim Martyanov
b29332a309 Update Makefile.am
README-Windows.txt -> README-Windows.md
2016-12-06 20:43:08 +04:00
Olliver Schinagl
e946f7a97a drivers: pn532_i2c: Errata on i2c timing
The datasheet is wrong for the pn532_i2c. After having constant issues
with the device failing to respond on the bus and after contacting NXP
about this, it turns out 1.3 ms is too tight. The official timing spec
is unknown for now, but we tested 4 and 5 ms without problems. Thus we
have choosen 5 ms as a safe delay.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2016-12-06 11:40:56 +01:00
Romuald Conty
b2a9cce037 Merge pull request #367 from oliv3r/respect_pn532_i2c_timing
Respect pn532 i2c timing
2016-12-05 22:12:52 +01:00
Romuald Conty
c3b3f64224 Merge pull request #372 from timzi/fix-cmakelists
Fixed file name "README" in cmakelists.txt
2016-12-05 22:10:33 +01:00
Romuald Conty
a07a496234 Merge pull request #378 from BourgeoisLab/patch-1
Match nfc.h
2016-12-05 19:50:49 +01:00
Frédéric Bourgeois
65477eea5e Match nfc.h
Synchronized with nfc.h with all API functions
2016-12-05 13:11:45 +01:00
timzi
a625d6a02d Fixed file name "README" in cmakelists.txt 2016-11-20 20:32:25 +03:00
Olliver Schinagl
d960673681 drivers: pn532_i2c: Add retry on error mechanism
Currently, we very occasionally can EXNIO errors from pn532_i2c_write() ->
i2c_write() -> write(). This may happen about once every 30 seconds.
Based from the kernel sources, EXNIO happens if the chip no longer
responds to its own address.

To make sure we do not loose any sent packets, we retry to send
PN532_SEND_RETRIES number of times. Since we miss 1 every 30 or so
seconds, doing 1 retry should be fine.

This might be considered a hack as the failure may be some other timing
related issue.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2016-10-24 13:05:42 +02:00
Olliver Schinagl
8f8f780c2b drivers: pn532_i2c: Respect proper timing specifications
The pn532 user manual states that after a i2c stop condition and before a i2c
start condition there should be a delay of minimally 1.3 milliseconds.
This is probably a limitation of the i2c peripheral or the firmware. In
any case, each i2c_read and i2c_write creates the packets which are
complemented with start/stop markers. It is thus required to take care
of timing in these two functions.

We solve this by wrapping the lower i2c_read and i2c_write functions for
the pn532, as this requirement is not for all chips.

Currently, we keep time using local variable, and thus the code is not
thread-safe. With libnfc being single threaded and only one instances of
libnfc can open a bus anyway, this is not yet a problem.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2016-10-24 12:02:58 +02:00
Olliver Schinagl
b953002f8f drivers: pn532_i2c: Clarify preamble and start byte
The pn532 documentation differs slightly from the included ascii art
documentation on how a packet looks like. The preamble was omitted
however the postamble is mentioned. This patch adds the Preamble to the
ascii frame documentation.

The code later refers incorrectly to the start byte as the preamble.
This variable was renamed to more descriptively state that it is the
preambe and the start bytes.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2016-10-24 12:00:36 +02:00
Olliver Schinagl
512be89700 busses: i2c: improve logging
Currently we only inform the user with the error logging mechanism that
we received a different number of bytes than expected.

Thus in case of an error, we say that we sent/received -1 bytes. However
-1 indicates an error and errno is set to indicate the error state.

This patch extends the logging to also print the actual error.

Additionally the same debugging printing was added to read, which is now
silently returned to the caller.

Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
2016-10-21 14:20:51 +02:00
Olliver Schinagl
61b42396d9 CMake: allow building of debian packages
This patch allows for using the CMakefile to generate debian packages.
While CPack is far from perfect for generating debian packages, it is a
minimal change and quite helpful for quick deployment on debian based
systems.

Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
2016-10-21 14:20:51 +02:00
Jeremy
4a10d0f21b Cosmetics changes 2016-10-10 17:36:55 +02:00
Jeremy
7eae55e929 Adding pn71xx NXP's NFC Controllers through Linux Libnfc-nci 2016-10-06 17:40:48 +02:00
Jim Anastassiou
0d3d5c13ff Add R-Pi 3 conf sample.
There have been changes to the Raspberry Pi 3's usage of serial ports with the addition of a Bluetooth LE module.
This configuration uses the mini UART without disabling any devices except for the linux serial console.
2016-08-19 19:22:06 -04:00