Flexible character LCD library for AVR Microcontrollers
Go to file
Collin J. Doering b32954bdae Add Show/Hide cursor function and ANSI escapes
Adds ANSI escape parsing for DECTCEM escapes (hide/show cursor) as well
as utility functions hideCursor and showCursor. To do this correctly,
the state of the LCD needs to be remembered by sofware.

Keep track of the state of the LCD using the 3 LSB of lcdState as follows:
  0: Cursor blink
  1: Cursor off/on
  2: Display off/on

In the future, the 5 MSB's may be used to store other data used for the
remembering the state of the LCD. For example, the instruction
INSTR_MOV_SHIFT and INSTR_ENTRY_SET; specifically:

INSTR_MOV_SHIFT
  3+1=4: Move cursor/shift display
  3+2=5: Shift left/right

INSTR_ENTRY_SET
  3+3=6: decrement/increment cursor position
  3+4=7: display shift off/on

The LCD state information could then be read for the correct instruction
using bit shifting. Note that this would require modifying the functions
defined in this commit to do the appropriate bit shifting.

Additionally, utility functions (that don't have associated ANSI
escapes) have been defined:

- blinkCursorOff
- blinkCursorOn
- displayOff
- displayOn

Note: care needs to be taken to check whether the display is actually on
before sending data to it, as during testing the data will not show up
after the display has been sent the display off instruction, and it will
not write any incoming data to DDRAM. Whether it will accept other
instructions besides writing to DDRAM is unknown but suspected to also
not work. This issue still needs to be rectified after further testing.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-24 04:30:26 -04:00
.gitignore First pass setting up doxygen documentation 2015-10-15 01:23:11 -04:00
ansi_escapes.h First pass setting up doxygen documentation 2015-10-15 01:23:11 -04:00
doxygen.conf First pass setting up doxygen documentation 2015-10-15 01:23:11 -04:00
lcdLib.c Add Show/Hide cursor function and ANSI escapes 2015-10-24 04:30:26 -04:00
lcdLib.h Add Show/Hide cursor function and ANSI escapes 2015-10-24 04:30:26 -04:00
lcdLibConfig.h First pass setting up doxygen documentation 2015-10-15 01:23:11 -04:00
lcdOutput.c Remove unnecessary null exprs from end of cases 2015-10-22 03:23:08 -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 First pass setting up doxygen documentation 2015-10-15 01:23:11 -04:00