Commit Graph

5 Commits

Author SHA1 Message Date
Markus Hitter aabce8ed15 usb_serial.h: refine the note.
Thanks for the hint, @phord.
2016-04-27 23:53:42 +02:00
Markus Hitter 62190caaa5 USB Serial: note about all the redundant code. 2016-04-26 15:35:40 +02:00
Markus Hitter e633222cd3 Make message/text sending aware of the sending destination.
Point of this change is to allow using these functions for
writing to the display, too, without duplicating all the code.

To reduce confusion, functions were renamed (they're no longer
'serial', after all:

  serwrite_xxx() -> write_xxx()
  sersendf_P()   -> sendf_P()

To avoid changing all the existing code, a couple of macros
with the old names are provided. They might even be handy as
convenience macros.

Nicely, this addition costs no additional RAM. Not surprising, it
costs quite some binary size, 278 bytes. Sizes now:

Program:  24058 bytes      168%       79%       38%       19%
   Data:   1525 bytes      149%       75%       38%       19%
 EEPROM:     32 bytes        4%        2%        2%        1%

Regarding USB Serial: code was adjusted without testing on
hardware.
2016-04-26 15:23:15 +02:00
Markus Hitter f8230d6565 ARM: get usb_serial.c in.
Once more just made sure it doesn't accidentially slip in without
giving the user a warning.
2015-08-13 17:12:13 +02:00
Markus Hitter c4fc138f7e Import USB Serial from http://www.pjrc.com/teensy/usb_serial.html 2012-11-08 16:36:48 +01:00