drivers/device/LCD.h

Fri, 13 Aug 2010 10:41:29 +0100

author
Philip Pemberton <philpem@philpem.me.uk>
date
Fri, 13 Aug 2010 10:41:29 +0100
changeset 0
267b5a25932f
permissions
-rw-r--r--

Initial commit, GPIO v3.1

     1 /****************************************************************************
     2 **
     3 **  Name: LCD.h
     4 **
     5 **  Description:
     6 **        Declares user-callable functions for manipulating
     7 **        dot-matrix LCD displays
     8 **
     9 **  $Revision: $
    10 **
    11 ** Disclaimer:
    12 **
    13 **   This source code is intended as a design reference which
    14 **   illustrates how these types of functions can be implemented.  It
    15 **   is the user's responsibility to verify their design for
    16 **   consistency and functionality through the use of formal
    17 **   verification methods.  Lattice Semiconductor provides no warranty
    18 **   regarding the use or functionality of this code.
    19 **
    20 ** --------------------------------------------------------------------
    21 **
    22 **                     Lattice Semiconductor Corporation
    23 **                     5555 NE Moore Court
    24 **                     Hillsboro, OR 97214
    25 **                     U.S.A
    26 **
    27 **                     TEL: 1-800-Lattice (USA and Canada)
    28 **                          (503)268-8001 (other locations)
    29 **
    30 **                     web:   http://www.latticesemi.com
    31 **                     email: techsupport@latticesemi.com
    32 **
    33 ** --------------------------------------------------------------------------
    34 **
    35 **  Change History (Latest changes on top)
    36 **
    37 **  Ver    Date        Description
    38 ** --------------------------------------------------------------------------
    39 **
    40 **  3.0   Mar-25-2008  Added Header
    41 **
    42 **---------------------------------------------------------------------------
    43 *****************************************************************************/
    45 #ifndef LCD_H_
    46 #define LCD_H_
    48 #include "DDStructs.h"
    50 #ifdef __cplusplus
    51 extern "C" {
    52 #endif /* __cplusplus */
    55 /* for direct read/write to the LCD */
    56 void LCD_WriteData(volatile unsigned int * pAddress, unsigned int data);
    59 /* turns display on/off */
    60 void LCD_DisplayOnOff(MicoGPIOCtx_t *pLCD, unsigned int bOn);
    63 /* turns cursor on/off */
    64 void LCD_CursorOnOff(MicoGPIOCtx_t *pLCD, unsigned int bOn);
    67 /* turns blinking on/off */
    68 void LCD_BlinkOnOff(MicoGPIOCtx_t *pLCD, unsigned int bOn);
    71 /* clears display */
    72 void LCD_ClearDisplay(MicoGPIOCtx_t *pLCD);
    75 /* sets function */
    76 void LCD_SetFunction(MicoGPIOCtx_t *pLCD, unsigned int iNumLines);
    79 /* sets cursor move mode */
    80 void LCD_SetCursorMoveMode(MicoGPIOCtx_t *pLCD, unsigned int bIncrement);
    83 /* shifts display left or right by 1 */
    84 void LCD_ShiftDisplay(MicoGPIOCtx_t *pLCD, unsigned int bLeft);
    87 /* shifts cursor left or right by 1 */
    88 void LCD_ShiftCursor(MicoGPIOCtx_t *pLCD, unsigned int bLeft);
    91 /* writes a character to the display */
    92 void LCD_WriteChar(MicoGPIOCtx_t *pLCD, unsigned char character);
    95 /* sets write-position (i.e. cursor position) */
    96 void LCD_SetCursorPos(MicoGPIOCtx_t *pLCD, unsigned int iLine, unsigned int iCol);
    99 /* Initializes the LCD */
   100 void LCD_Init(MicoGPIOCtx_t *pLCD, unsigned int iLines);
   103 /* writes a line to the LCD at the cursor position */
   104 void LCD_WriteLine(MicoGPIOCtx_t *pLCD, const char *pLine);
   107 #ifdef __cplusplus
   108 }
   109 #endif /* __cplusplus */
   112 #endif /*LCD_H_*/