drivers/device/LCD.h

changeset 0
267b5a25932f
     1.1 diff -r 000000000000 -r 267b5a25932f drivers/device/LCD.h
     1.2 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 +++ b/drivers/device/LCD.h	Fri Aug 13 10:41:29 2010 +0100
     1.4 @@ -0,0 +1,113 @@
     1.5 +/****************************************************************************
     1.6 +**
     1.7 +**  Name: LCD.h
     1.8 +**
     1.9 +**  Description:
    1.10 +**        Declares user-callable functions for manipulating
    1.11 +**        dot-matrix LCD displays
    1.12 +**
    1.13 +**  $Revision: $
    1.14 +**
    1.15 +** Disclaimer:
    1.16 +**
    1.17 +**   This source code is intended as a design reference which
    1.18 +**   illustrates how these types of functions can be implemented.  It
    1.19 +**   is the user's responsibility to verify their design for
    1.20 +**   consistency and functionality through the use of formal
    1.21 +**   verification methods.  Lattice Semiconductor provides no warranty
    1.22 +**   regarding the use or functionality of this code.
    1.23 +**
    1.24 +** --------------------------------------------------------------------
    1.25 +**
    1.26 +**                     Lattice Semiconductor Corporation
    1.27 +**                     5555 NE Moore Court
    1.28 +**                     Hillsboro, OR 97214
    1.29 +**                     U.S.A
    1.30 +**
    1.31 +**                     TEL: 1-800-Lattice (USA and Canada)
    1.32 +**                          (503)268-8001 (other locations)
    1.33 +**
    1.34 +**                     web:   http://www.latticesemi.com
    1.35 +**                     email: techsupport@latticesemi.com
    1.36 +**
    1.37 +** --------------------------------------------------------------------------
    1.38 +**
    1.39 +**  Change History (Latest changes on top)
    1.40 +**
    1.41 +**  Ver    Date        Description
    1.42 +** --------------------------------------------------------------------------
    1.43 +**
    1.44 +**  3.0   Mar-25-2008  Added Header
    1.45 +**
    1.46 +**---------------------------------------------------------------------------
    1.47 +*****************************************************************************/
    1.48 +
    1.49 +#ifndef LCD_H_
    1.50 +#define LCD_H_
    1.51 +
    1.52 +#include "DDStructs.h"
    1.53 +
    1.54 +#ifdef __cplusplus
    1.55 +extern "C" {
    1.56 +#endif /* __cplusplus */
    1.57 +
    1.58 +
    1.59 +/* for direct read/write to the LCD */
    1.60 +void LCD_WriteData(volatile unsigned int * pAddress, unsigned int data);
    1.61 +
    1.62 +
    1.63 +/* turns display on/off */
    1.64 +void LCD_DisplayOnOff(MicoGPIOCtx_t *pLCD, unsigned int bOn);
    1.65 +
    1.66 +
    1.67 +/* turns cursor on/off */
    1.68 +void LCD_CursorOnOff(MicoGPIOCtx_t *pLCD, unsigned int bOn);
    1.69 +
    1.70 +
    1.71 +/* turns blinking on/off */
    1.72 +void LCD_BlinkOnOff(MicoGPIOCtx_t *pLCD, unsigned int bOn);
    1.73 +
    1.74 +
    1.75 +/* clears display */
    1.76 +void LCD_ClearDisplay(MicoGPIOCtx_t *pLCD);
    1.77 +
    1.78 +
    1.79 +/* sets function */
    1.80 +void LCD_SetFunction(MicoGPIOCtx_t *pLCD, unsigned int iNumLines);
    1.81 +
    1.82 +
    1.83 +/* sets cursor move mode */
    1.84 +void LCD_SetCursorMoveMode(MicoGPIOCtx_t *pLCD, unsigned int bIncrement);
    1.85 +
    1.86 +
    1.87 +/* shifts display left or right by 1 */
    1.88 +void LCD_ShiftDisplay(MicoGPIOCtx_t *pLCD, unsigned int bLeft);
    1.89 +
    1.90 +
    1.91 +/* shifts cursor left or right by 1 */
    1.92 +void LCD_ShiftCursor(MicoGPIOCtx_t *pLCD, unsigned int bLeft);
    1.93 +
    1.94 +
    1.95 +/* writes a character to the display */
    1.96 +void LCD_WriteChar(MicoGPIOCtx_t *pLCD, unsigned char character);
    1.97 +
    1.98 +
    1.99 +/* sets write-position (i.e. cursor position) */
   1.100 +void LCD_SetCursorPos(MicoGPIOCtx_t *pLCD, unsigned int iLine, unsigned int iCol);
   1.101 +
   1.102 +
   1.103 +/* Initializes the LCD */
   1.104 +void LCD_Init(MicoGPIOCtx_t *pLCD, unsigned int iLines);
   1.105 +
   1.106 +
   1.107 +/* writes a line to the LCD at the cursor position */
   1.108 +void LCD_WriteLine(MicoGPIOCtx_t *pLCD, const char *pLine);
   1.109 +
   1.110 +
   1.111 +#ifdef __cplusplus
   1.112 +}
   1.113 +#endif /* __cplusplus */
   1.114 +
   1.115 +
   1.116 +#endif /*LCD_H_*/
   1.117 +