Wykres commitów

32 Commity (f4166f34a0035d3783a7a96c8b456f3f7767edc3)

Autor SHA1 Wiadomość Data
kai-morich f4166f34a0 read w/o timeout now throws exception on connection lost or buffer to small
SerialInputOutputManager already returned connection lost exception, as the next read failed
2021-03-26 18:11:23 +01:00
Daniel Hugenroth b8c3057967 Use monotonic clock for timeouts 2021-03-16 22:39:00 +00:00
kai-morich fc610a9764 IntDef Parity for better warnings
but no @Intdef for databits, stopbits as these are frequently used with numbers instead of constants
remove redundant modifiers
2021-01-16 23:21:10 +01:00
kai-morich 768f716600 new setBreak() method 2020-10-14 20:36:49 +02:00
kai-morich 732e138630 PL2303(HX) support non-standard baud rates 2020-09-28 21:12:50 +02:00
kai-morich 26999e3626 read with timeout now throws error on connection lost, e.g. device disconnected
and similar connection lost detection for prolific input control lines
2020-09-12 21:17:52 +02:00
kai-morich c53c3ed0ae check read buffer size 2020-09-06 09:48:10 +02:00
kai-morich 6f4cd0313c FTDI read() now waits until timeout
previously returned after periodic FTDI status response (default 16 msec)
2020-09-05 12:00:37 +02:00
kai-morich 698f590d58 restored UsbId.FTDI_FT231X
same ID for FT230X, FT231X, FT234XD
tested with FT230X
2020-08-23 20:44:34 +02:00
kai-morich a664082f23 throw UnsupportedOperationException instead of returning false 2020-08-01 10:06:51 +02:00
kai-morich 2d13b90f59 move from LGPL to MIT license (#244)
moving away from LGPL possible, as the FTDI driver is rewritten and not based any more on LGPL code from libftdi.
2020-07-29 11:03:26 +02:00
kai-morich e496195bd9 rewrite ftdi driver without LGPL code from libftdi 2020-07-27 17:39:01 +02:00
kai-morich 7423fd9d79 new getControlLines() and getSupportedControLines() methods
getControlLines() requires less USB calls than calling getRTS() + ... + getRI() individually.
getSupportedControlLines() tells you, which control lines are supported by a driver. Previously you had to check the driver implementation.
2020-06-30 18:10:02 +02:00
kai-morich 735fa3d70f make all SerialPort classes public
and test FtdiSerialPort methods
2020-06-10 19:09:34 +02:00
kai-morich ce97a3408b reuse UsbRequest
less LogCat output
2019-12-13 21:13:48 +01:00
kai-morich 7b578918b0 support FTDI control lines for multi-port devices 2019-11-23 13:24:28 +01:00
uholeschak 6b32e25e9c Fixed modem status
Signed-off-by: kai-morich <mail@kai-morich.de>
2019-11-23 13:23:10 +01:00
uholeschak 21e96594d2 Added missing functions: - latency timer - modem lines
Signed-off-by: kai-morich <mail@kai-morich.de>
2019-11-23 13:22:42 +01:00
kai-morich 24187b3af6 refactor duplicated code in close method 2019-11-09 22:48:00 +01:00
kai-morich 5767298636 refactor duplicated read/write methods 2019-11-09 20:26:50 +01:00
kai-morich 5c6748e1b8 improve setParameter() error handling
harmonize exception messages, more UI friendly messages
distinguish IllegalArgumentException and UnsupportedOperationException
2019-11-02 13:49:08 +01:00
kai-morich 18b5b6e648 unify open() error handling, more tests, minor cleanup 2019-11-02 13:09:15 +01:00
kai-morich 6869eff88a revert previous usbRequest.cancel() removal
Combine usbRequest.cancel() and releaseInterface to interrupt read() and terminate SerialInputOutputManager.
UsbRequest.cancel() immediately interrupts read() on newer Android versions.
With releaseInterface() only, some hickup are observed on fast reconnect.
Keep releaseInterface() as only this interrupts read() on older Androids.
2019-11-02 12:46:45 +01:00
kai-morich 9ea936b14a improve close handling
Use releaseInterface to interrupt read() and terminate SerialInputOutputManager. Previously some drivers used usbRequest.cancel() but this does not interrupt read() on older Android.

Added connection check to read(). Before Android 8.0 request.initialize() did not check usbConnection, which can lead to native crash if NULL
2019-10-27 21:32:38 +01:00
Kai Morich f7399c2aad more coverage tests
purgeHwBuffers: adjust parameter names to match read/write methods and actual behavior
2019-10-25 22:23:00 +02:00
Kai Morich 0d48ed04e7 Always use async read, as bulkTransfer can cause data loss. Increase API version to 17 because async read only works reliably since Android 4.2 (http://b.android.com/28023) 2019-10-05 10:35:15 +02:00
Kai Morich 61b272b8b6 support ft_232h, cp210_ multiport devices
harmonize claimInterface() error handling
cancel read() on close()
2019-10-05 10:27:11 +02:00
kai-morich c89ca2c96a
Merge pull request #195 from kai-morich/ch340-parameter
CH34x: data bits, parity, stop bits
2019-10-04 16:50:16 +02:00
Kai Morich 9c1ca288ae CH34x: data bits, parity, stop bits
CP21xx: mark+space
all devices: return error on unsupported parameters
2018-01-20 13:09:29 +01:00
Kai Morich fcd8596bdd enable async read for FTDI as in CDC driver. this prevents -1 error from bulkTransfer() when receiving data in multiple packets, e.g. if consumed to slow at high baud rates.
prevent loss of last packet if full
2017-04-01 23:15:55 +02:00
mike w ef13784f4f Fix off-by-one error in `filterStatusBytes`.
Closes #74.
2014-11-10 10:24:53 -05:00
mike wakerly 95592f984a Convert to gradle. 2014-06-14 12:55:24 -07:00