chiark / gitweb /
eeprom: provide smaller code for SERIAL_ECHOPAIR_DOUBLE
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2012 15:13:25 +0000 (16:13 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2012 18:27:47 +0000 (19:27 +0100)
commit3f690257c022b5c6945f7d2f070c89ee1c8275c8
treef71276ce0bb76f5c8c5c3c6cdb0be4e72eb00f48
parent704568f265fbb370658a153f8240239dd776f5cc
eeprom: provide smaller code for SERIAL_ECHOPAIR_DOUBLE

SERIAL_ECHOPAIR implies, eventually, two calls to MYSERIAL.print.  One
of these has FORCE_INLINE for a per-character loop, and both involve
constructing a method call rather than a simple function call.

Produce better and smaller code by providing SERIAL_ECHOPAIR_DOUBLE
which is a typechecking syntactic wrapper around a new function
serial_echopair_double.  This saves XXXX bytes of program memory.

It would arguably be nice to do this in general for each of the calls
to SERIAL_ECHOPAIR in EEPROM_printSettings.  But actually I think a
better approach would be a table-driving settings printer, so we'll
have this incremental improvement for now.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Marlin/Marlin.h
Marlin/Marlin.pde