LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
d_lcd.h
Go to the documentation of this file.
1 /*
2  * LEGO® MINDSTORMS EV3
3  *
4  * Copyright (C) 2010-2013 The LEGO Group
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 
22 #ifndef D_LCD_H_
23 #define D_LCD_H_
24 
25 void dLcdUpdate(LCD *pLcd);
26 
27 void dLcdAutoUpdate(void);
28 
29 void dLcdInit(UBYTE *pImage);
30 
31 UBYTE dLcdRead(void);
32 
33 void dLcdExit(void);
34 
35 void dLcdScroll(UBYTE *pImage,DATA16 Y0);
36 
37 void dLcdDrawPixel(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0);
38 
39 void dLcdDrawLine(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA16 X1,DATA16 Y1);
40 
41 void dLcdDrawDotLine(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA16 X1,DATA16 Y1,DATA16 On,DATA16 Off);
42 
43 void dLcdRect(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA16 X1,DATA16 Y1);
44 
45 void dLcdFillRect(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA16 X1,DATA16 Y1);
46 
47 void dLcdInverseRect(UBYTE *pImage,DATA16 X0,DATA16 Y0,DATA16 X1,DATA16 Y1);
48 
49 void dLcdDrawCircle(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA16 R);
50 
52 
54 
55 void dLcdDrawChar(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA8 Font,DATA8 Char);
56 
57 void dLcdDrawText(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA8 Font,DATA8 *pText);
58 
60 
62 
63 void dLcdDrawPicture(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA16 IconWidth,DATA16 IconHeight,UBYTE *pIconBits);
64 
65 void dLcdDrawIcon(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA8 Type,DATA8 No);
66 
67 void dLcdGetBitmapSize(IP pBitmap,DATA16 *pWidth,DATA16 *pHeight);
68 
69 void dLcdDrawBitmap(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,IP pBitmap);
70 
71 void dLcdDrawFilledCircle(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0,DATA16 R);
72 
73 
74 void dLcdFlodfill(UBYTE *pImage,DATA8 Color,DATA16 X0,DATA16 Y0);
75 
76 #define LCDClear(I) memset(I,0 - BG_COLOR,LCD_BUFFER_SIZE)
77 
78 #define LCDClearTopline(I) memset(I,0 - BG_COLOR,LCD_TOPLINE_SIZE)
79 
80 #define LCDErase(I) memset(&(I[LCD_TOPLINE_SIZE]),0,LCD_BUFFER_SIZE - LCD_TOPLINE_SIZE)
81 
82 #define LCDCopy(S,D,L) memcpy((void*)D,(const void*)S,L) // Copy S to D
83 
84 #endif /* D_LCD_H_ */
void dLcdDrawText(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA8 Font, DATA8 *pText)
Definition: d_lcd.c:936
char Char
Definition: tistdtypes.h:54
void dLcdGetBitmapSize(IP pBitmap, DATA16 *pWidth, DATA16 *pHeight)
Definition: d_lcd.c:1091
void dLcdDrawDotLine(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA16 X1, DATA16 Y1, DATA16 On, DATA16 Off)
Definition: d_lcd.c:622
SWORD DATA16
VM Type for 2 byte signed value.
Definition: lmstypes.h:62
void dLcdDrawChar(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA8 Font, DATA8 Char)
Definition: d_lcd.c:802
void dLcdInverseRect(UBYTE *pImage, DATA16 X0, DATA16 Y0, DATA16 X1, DATA16 Y1)
Definition: d_lcd.c:1274
void dLcdDrawCircle(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA16 R)
Definition: d_lcd.c:710
void dLcdRect(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA16 X1, DATA16 Y1)
Definition: d_lcd.c:1243
void dLcdDrawFilledCircle(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA16 R)
Definition: d_lcd.c:1303
DATA16 dLcdGetIconWidth(DATA8 Type)
Definition: d_lcd.c:1011
IMGDATA * IP
Instruction pointer type.
Definition: lmstypes.h:74
void dLcdDrawPicture(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA16 IconWidth, DATA16 IconHeight, UBYTE *pIconBits)
Definition: d_lcd.c:1029
void dLcdDrawPixel(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0)
Definition: d_lcd.c:530
void dLcdFlodfill(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0)
Definition: d_lcd.c:1343
DATA16 dLcdGetFontWidth(DATA8 Font)
Definition: d_lcd.c:790
void dLcdDrawBitmap(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, IP pBitmap)
Definition: d_lcd.c:1105
unsigned char UBYTE
Basic Type used to symbolise 8 bit unsigned values.
Definition: lmstypes.h:29
void dLcdFillRect(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA16 X1, DATA16 Y1)
Definition: d_lcd.c:1254
DATA16 dLcdGetFontHeight(DATA8 Font)
Definition: d_lcd.c:796
void dLcdAutoUpdate(void)
void dLcdExit(void)
Definition: d_lcd.c:205
UBYTE dLcdRead(void)
Definition: d_lcd.c:199
DATA16 dLcdGetIconHeight(DATA8 Type)
Definition: d_lcd.c:1017
void dLcdInit(UBYTE *pImage)
Definition: d_lcd.c:179
SBYTE DATA8
VM Type for 1 byte signed value.
Definition: lmstypes.h:61
void dLcdUpdate(LCD *pLcd)
Definition: d_lcd.c:167
void dLcdDrawIcon(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA8 Type, DATA8 No)
Definition: d_lcd.c:1072
void dLcdScroll(UBYTE *pImage, DATA16 Y0)
Definition: d_lcd.c:522
void dLcdDrawLine(UBYTE *pImage, DATA8 Color, DATA16 X0, DATA16 Y0, DATA16 X1, DATA16 Y1)
Definition: d_lcd.c:571