Matthias Badaire
1d3a49e466
AP_HAL_PX4 : make UARTDriver capable to be called from different threads.
...
The modification allows the read and write functions to be called by any thread but the calling thread must be the last one that called the begin() function.
2014-11-14 13:51:16 +11:00
Andrew Tridgell
7c1b9b344f
AP_HAL: added get_flow_control() API
2014-02-14 21:51:00 +11:00
Andrew Tridgell
c5c1d1358a
HAL_PX4: added automatic hardware flow control detection
...
this allows us to detect if hardware flow control is not available and
automatically disable it
2014-02-11 12:11:26 +11:00
Andrew Tridgell
3e637ac5d9
AP_HAL: added enable_flow_control() option in AP_HAL
2014-02-10 12:54:50 +11:00
Andrew Tridgell
ad30f8effa
HAL_PX4: try to reopen UARTs if safety switch is disarmed
...
this allows attaching to the USB port after power on
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-10-05 15:47:28 +10:00
Andrew Tridgell
40af9ab674
AP_HAL_PX4: updates for new API
2013-09-22 12:22:05 +10:00
Andrew Tridgell
05b426c1fc
HAL_PX4: use common printf implementation on UARTs
2013-09-21 14:23:52 +10:00
Andrew Tridgell
8766e86091
HAL_PX4: fixed blocking bulk writes to UARTs
...
this fixes a problem with uBlox initialisation on PX4
2013-03-20 15:41:52 +11:00
Andrew Tridgell
54e7bce75e
HAL_PX4: cope with O_NONBLOCK not working in NuttX on ttyACM0
...
writes will block anyway, which clags up APM
2013-02-19 12:02:46 +11:00
Andrew Tridgell
e45b137816
HAL_PX4: added run_debug_shell() implementation for PX4
2013-02-07 15:04:33 +11:00
Andrew Tridgell
fc8065b50f
HAL_PX4: added UART performance counters
2013-01-24 15:04:57 +11:00
Andrew Tridgell
f72b532405
HAL_PX4: ensure all writes go via buffers
...
this prevents output corruption by direct fd writes
2013-01-23 09:22:51 +11:00
Andrew Tridgell
89cb3fbd61
HAL_PX4: fixed blocking IO in UART driver
2013-01-22 21:52:21 +11:00
Andrew Tridgell
6ffa18fa61
HAL_PX4: rewrite UART driver to be much more efficient
...
this does the IO in the timer thread, and uses buffers in the main
task to avoid system call costs in the flight code.
The cost of PX4 read and write system calls is quite high - about 10
to 15 usec. We can't afford to pay that per byte
2013-01-22 21:22:01 +11:00
Andrew Tridgell
546ed19ffc
HAL_PX4: improved efficiency of serial writes
...
use buffer at a time writes when possible, and use O_NONBLOCKING to
avoid txspace()
2013-01-22 10:50:26 +11:00
Andrew Tridgell
18cfd29f2f
HAL_PX4: added a read buffer to the UART driver
...
this lowers the average cost of reading bytes by a large amount, and
prevents the GPS driver from chewing lots of time.
2013-01-22 10:34:04 +11:00
Andrew Tridgell
76092eb590
AP_HAL: remove unused peek() interface from UART drivers
...
this is a bit tricky to implement on some platforms, and is unused
anyway
2013-01-16 14:43:18 +11:00
Andrew Tridgell
bd9c61562f
HAL_PX4: added -d command line option to app
...
allows control of serial device
2013-01-14 16:21:27 +11:00
Andrew Tridgell
d492b72a2c
HAL_PX4: use /dev/ttyS0 for uartA
...
this also changes txspace and available to use FIONWRITE and FIONREAD
2013-01-03 21:12:10 +11:00
Andrew Tridgell
c6c336a6e8
HAL_PX4: implement peek() and available()
...
keep a 1 byte buffer
2013-01-03 17:27:53 +11:00
Andrew Tridgell
d9d5eb52bf
HAL_PX4: use fd IO instead of stdio
...
this allows for hal console output from within timers, which is very
handy for debugging
2013-01-03 13:16:41 +11:00
Andrew Tridgell
9373a4e5b3
HAL_PX4: added a uartA driver
...
uses stdin/stdout for IO
2013-01-03 11:03:05 +11:00