Flexible character LCD library for AVR Microcontrollers
Go to file
Collin J. Doering ea7003ce83 Simplify entry of ANSI escape sequences
Use pre-processor macros to allow for simple entry of ANSI escape
sequences.

Many escape sequences don't require all characters in all cases.
Example: Cursor movement (up down, forward and back) all take one
parameter (natural number) that defaults to 1, and can be omitted in
this case. Calling the associated macros with 1 will generate the
correct escape but not the smallest one. Now for these single argument
cases (there are others also) the macro of choice can be used with an
empty argument which will generate the smallest ANSI escape sequence.
Eg, the following are equivalent: CUD() === CUD(1)

Another example is use of CUP (cursor position). It takes two arguments
which both default to 1. Similarly to the CUD example above, CUP(1,1)
generates a valid ANSI escape sequence, just not the smallest one. The
smallest one can be achieved by omitting the arguments to CUP: CUP(,).

For more information on ANSI escapes see wikipedia:
https://en.wikipedia.org/wiki/ANSI_escape_code

This is just an initial proof of concept and is not complete;
namely:

- Not all ANSI escapes are implemented
- Macros don't error check for the user; that is, invalid escapes can be
  generated (Eg. the argument to ED is constrained to 0, 1, or 2 but
  this is not checked by the ED macro)
- Macro's can generate invalid ANSI escapes when the argument that's
  given is not a natural number (specified as ASCII)

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-09 01:35:47 -04:00
.gitignore Add *.lst to .gitignore 2015-10-04 21:20:23 -04:00
ansi_escapes.h Simplify entry of ANSI escape sequences 2015-10-09 01:35:47 -04:00
lcdLib.c Working backspace and fixed bug with cursor 2015-10-07 22:38:57 -04:00
lcdLib.h Refactor lcdLib.h 2015-10-05 05:03:26 -04:00
lcdLibConfig.h Fixed busy flag check 2015-10-06 03:34:39 -04:00
lcdOutput.c Simplify entry of ANSI escape sequences 2015-10-09 01:35:47 -04:00
Makefile Fix BAUD rate in Makefile 2015-10-06 04:23:14 -04:00
USART.c Add transmitString function to USART library 2015-10-08 03:15:00 -04:00
USART.h Fixed renamed transmitBytes and changed parameters 2015-10-09 01:31:50 -04:00