//*****************************************************************************
//
// uart.dox - Documentation for the UART driver.
//
// Copyright (c) 2012 Texas Instruments Incorporated.  All rights reserved.
// TI Information - Selective Disclosure
//
//*****************************************************************************

/*! \page lcd_chapter
\latexonly
\chapter{LCD}
\jumptext{lcd_intro}{Introduction}\\
\jumptext{group__lcd__dogm128w6__api}{API Functions}\\
\jumptext{lcd_example}{Programming Example}
\input{lcd_intro}
\input{group__lcd__dogm128w6__api}
\input{lcd_example}
\endlatexonly
*/

/*! \page lcd_intro Introduction
The LCD display on the CCBOARD is a DOGM128-6 128x64 dot matrix and is divided
into 8 pages (\c LCD_PAGE_0 through \c LCD_PAGE_7), each 8 px high.

The (x,y) coordinate system used in this device driver is as described below:
<pre>
  + ----->   x
  |----------------------------------------------
  |(0,0)              PAGE 0             (127,0)|
V |                   PAGE 1                    |
  |                    ...                      |
y |                    ...                      |
  |                    ...                      |
  |                    ...                      |
  |                    ...                      |
  |(0,63)             PAGE 7            (127,63)|
  ---------------------------------------------- </pre>

Some of the features of the CCBOARD BSP LCD driver are:
- TBD
- TBD
- TBD

\if NOTKEIL
This driver is contained in <tt>CCDEVICEFOLDER/lcd_CCBOARDCODE.c</tt> and 
<tt>CCDEVICEFOLDER/lcd_dogm128_6.c</tt>, with 
<tt>CCDEVICEFOLDER/lcd_dogm128_6.h</tt> containing the API definitions for use 
by applications.
\endif
*/

/*! \defgroup lcd_dogm128w6_api API Functions
The CCBOARD BSP provides a set of functions for manipulating the content
of the LCD display. 

By default, the implementation enters power mode when lcdSendBufferAnimated() 
animates a transition between two display buffers. If build flag 
\c LCD_NO_POWER_MODE is defined, the implementation uses active wait instead.

In the default configuration, the implementation allocates 1024 B for a LCD 
buffer. Passing \c 0 (zero) as the buffer argument will manipulate/send this 
default buffer. The allocation of the default buffer may be overrided by build 
flag \c LCD_NO_DEFAULT_BUFFER. @warning If \c LCD_NO_DEFAULT_BUFFER is 
defined, passing \c 0 as the buffer argument will result in undefined behavior.

The CCBOARD BSP LCD API is borken into two groups: Functions that manipulate a 
local buffer on the CCDEVICE and functions that accesses the LCD display. 
Functions that manipulate a local LCD buffer are prefixed with \b lcdBuffer, 
e.g. lcdBufferSend().

Function lcdInit() configures the LCD display and must be executed before 
using any other LCD driver functions. Note that the CCBOARD SPI interface must 
be initialized prior to calling lcdInit(), using e.g. bspSpiInit().

Functions for sending raw data and commands to the LCD display are 
lcdSendData() and lcdSendCommand(). To update parts, or the entire LCD 
display, functions lcdBufferSendPart() and lcdBufferSend() are provided.

Functions for handling text strings are lcdBufferPrintString(), 
lcdBufferPrintStringAligned() and utility function lcdGetStringLength().

Functions for handling integers are lcdBufferPrintInt(), 
lcdBufferPrintIntAligned() and utility function lcdGetIntLength().

Functions for handling float numbers are lcdBufferPrintFloat(), 
lcdBufferPrintFloatAligned() and utility function lcdGetFloathLength().

Functions for drawing lines, arrows and single pixels are lcdBufferSetLine(), 
lcdBufferClearLine(), lcdBufferSetVLine(), lcdBufferClearVLine(), 
lcdBufferSetHLine(), lcdBufferClearHLine(), lcdBufferVArrow, 
lcdBufferHArrow(), lcdBufferSetPx() and lcdBufferClearPx().

Other functions for manipulating the LCD buffer are lcdBufferInvert(),
lcdBufferInvertPart() and lcdClear().

*/

/*! \page lcd_example Programming Example
The following example shows how to use the LCD API to initialize the
LCD, manipulate a local buffer and transmit it to the LCD display.

\code
    #include "bsp.h"
    #include "lcd_dogm128_6.h"
    #include "lcd_dogm128_6.c" // Platform independent functions
    
    //
    // Initialize the SPI interface and LCD display.
    //
    lcdSpiInit();
    lcdInit();

    //
    // Write a string string to page 2 of the default buffer (the
    // first argument is 0 => using default buffer)
    //
    lcdBufferPrintString(0, "Hello world!", 0, LCD_PAGE_2);

    //
    // Send the default buffer to the LCD display.
    //
    lcdSendBuffer(0);
\endcode
*/
