Commit Graph

54 Commits

Author SHA1 Message Date
DrZiplok@gmail.com e0be94a03f Change the way the port declaration macros work. This saves ~300
bytes by shrinking the constructor.

I don't quite understand why g++ is emitting two identical copies of
the ctor, but it wastes a bunch of space. 8(

Integrate FastSerial with the C library's standard I/O.  Add new
::printf and ::printf_P methods that do the obvious thing, and a
::getfd method so that a caller can use the other stdio functions with
the port if that's interesting.




git-svn-id: https://arducopter.googlecode.com/svn/trunk@361 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-31 06:22:54 +00:00
DrZiplok@gmail.com 22c9ed317e Change the way that FastSerial ports are created, so that we can avoid
creating port drivers for ports that aren't used.

This lets us save the RAM (~200 bytes per port) that would otherwise
have been used for buffers.  It also frees up the port's interrupt
vectors so that on Mega we can use the ports for other things
(e.g. SPI Master mode).

Better to fix this now than later when we have more consumers.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@355 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-30 04:01:15 +00:00
DrZiplok@gmail.com b4a840a336 Add 'extern' definitions to legitimise clients that want to assume that Serial* always exists.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@321 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-27 02:29:14 +00:00
DrZiplok@gmail.com 6074c410d9 "Fast" serial driver that fully overrides the Arduino-provided HardwareSerial/Serial* driver.
The receive side is basically a copy of the HardwareSerial driver, whilst the transmit side
uses the same algorithm as the APM_FastSerial driver.

See the example sketch for usage details.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@276 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-23 06:25:03 +00:00