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

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