Aa
Dependents: EMBEED_III_zad_4 mbed3 mbed_3 MBED3_zad4
LCD_DISCO_F429ZI.h@0:dc55a068bc1a, 2015-12-17 (annotated)
- Committer:
- bcostm
- Date:
- Thu Dec 17 10:26:56 2015 +0000
- Revision:
- 0:dc55a068bc1a
Initial release
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcostm | 0:dc55a068bc1a | 1 | /* Copyright (c) 2010-2011 mbed.org, MIT License |
bcostm | 0:dc55a068bc1a | 2 | * |
bcostm | 0:dc55a068bc1a | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
bcostm | 0:dc55a068bc1a | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
bcostm | 0:dc55a068bc1a | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
bcostm | 0:dc55a068bc1a | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
bcostm | 0:dc55a068bc1a | 7 | * Software is furnished to do so, subject to the following conditions: |
bcostm | 0:dc55a068bc1a | 8 | * |
bcostm | 0:dc55a068bc1a | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
bcostm | 0:dc55a068bc1a | 10 | * substantial portions of the Software. |
bcostm | 0:dc55a068bc1a | 11 | * |
bcostm | 0:dc55a068bc1a | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
bcostm | 0:dc55a068bc1a | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
bcostm | 0:dc55a068bc1a | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
bcostm | 0:dc55a068bc1a | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
bcostm | 0:dc55a068bc1a | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
bcostm | 0:dc55a068bc1a | 17 | */ |
bcostm | 0:dc55a068bc1a | 18 | |
bcostm | 0:dc55a068bc1a | 19 | #ifndef __LCD_DISCO_F429ZI_H |
bcostm | 0:dc55a068bc1a | 20 | #define __LCD_DISCO_F429ZI_H |
bcostm | 0:dc55a068bc1a | 21 | |
bcostm | 0:dc55a068bc1a | 22 | #ifdef TARGET_DISCO_F429ZI |
bcostm | 0:dc55a068bc1a | 23 | |
bcostm | 0:dc55a068bc1a | 24 | #include "mbed.h" |
bcostm | 0:dc55a068bc1a | 25 | #include "stm32f429i_discovery_lcd.h" |
bcostm | 0:dc55a068bc1a | 26 | |
bcostm | 0:dc55a068bc1a | 27 | /* |
bcostm | 0:dc55a068bc1a | 28 | This class drives the LCD display (ILI9341 240x320) present on DISCO_F429ZI board. |
bcostm | 0:dc55a068bc1a | 29 | |
bcostm | 0:dc55a068bc1a | 30 | Usage: |
bcostm | 0:dc55a068bc1a | 31 | |
bcostm | 0:dc55a068bc1a | 32 | #include "mbed.h" |
bcostm | 0:dc55a068bc1a | 33 | #include "LCD_DISCO_F429ZI.h" |
bcostm | 0:dc55a068bc1a | 34 | |
bcostm | 0:dc55a068bc1a | 35 | LCD_DISCO_F429ZI lcd; |
bcostm | 0:dc55a068bc1a | 36 | |
bcostm | 0:dc55a068bc1a | 37 | int main() |
bcostm | 0:dc55a068bc1a | 38 | { |
bcostm | 0:dc55a068bc1a | 39 | lcd.Clear(LCD_COLOR_BLUE); |
bcostm | 0:dc55a068bc1a | 40 | lcd.SetBackColor(LCD_COLOR_BLUE); |
bcostm | 0:dc55a068bc1a | 41 | lcd.SetTextColor(LCD_COLOR_WHITE); |
bcostm | 0:dc55a068bc1a | 42 | lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"HELLO", CENTER_MODE); |
bcostm | 0:dc55a068bc1a | 43 | while(1) |
bcostm | 0:dc55a068bc1a | 44 | { |
bcostm | 0:dc55a068bc1a | 45 | } |
bcostm | 0:dc55a068bc1a | 46 | } |
bcostm | 0:dc55a068bc1a | 47 | */ |
bcostm | 0:dc55a068bc1a | 48 | class LCD_DISCO_F429ZI |
bcostm | 0:dc55a068bc1a | 49 | { |
bcostm | 0:dc55a068bc1a | 50 | |
bcostm | 0:dc55a068bc1a | 51 | public: |
bcostm | 0:dc55a068bc1a | 52 | //! Constructor |
bcostm | 0:dc55a068bc1a | 53 | LCD_DISCO_F429ZI(); |
bcostm | 0:dc55a068bc1a | 54 | |
bcostm | 0:dc55a068bc1a | 55 | //! Destructor |
bcostm | 0:dc55a068bc1a | 56 | ~LCD_DISCO_F429ZI(); |
bcostm | 0:dc55a068bc1a | 57 | |
bcostm | 0:dc55a068bc1a | 58 | /** |
bcostm | 0:dc55a068bc1a | 59 | * @brief Initializes the LCD. |
bcostm | 0:dc55a068bc1a | 60 | * @param None |
bcostm | 0:dc55a068bc1a | 61 | * @retval LCD state |
bcostm | 0:dc55a068bc1a | 62 | */ |
bcostm | 0:dc55a068bc1a | 63 | uint8_t Init(void); |
bcostm | 0:dc55a068bc1a | 64 | |
bcostm | 0:dc55a068bc1a | 65 | /** |
bcostm | 0:dc55a068bc1a | 66 | * @brief Gets the LCD X size. |
bcostm | 0:dc55a068bc1a | 67 | * @param None |
bcostm | 0:dc55a068bc1a | 68 | * @retval The used LCD X size |
bcostm | 0:dc55a068bc1a | 69 | */ |
bcostm | 0:dc55a068bc1a | 70 | uint32_t GetXSize(void); |
bcostm | 0:dc55a068bc1a | 71 | |
bcostm | 0:dc55a068bc1a | 72 | /** |
bcostm | 0:dc55a068bc1a | 73 | * @brief Gets the LCD Y size. |
bcostm | 0:dc55a068bc1a | 74 | * @param None |
bcostm | 0:dc55a068bc1a | 75 | * @retval The used LCD Y size |
bcostm | 0:dc55a068bc1a | 76 | */ |
bcostm | 0:dc55a068bc1a | 77 | uint32_t GetYSize(void); |
bcostm | 0:dc55a068bc1a | 78 | |
bcostm | 0:dc55a068bc1a | 79 | /** |
bcostm | 0:dc55a068bc1a | 80 | * @brief Initializes the LCD layers. |
bcostm | 0:dc55a068bc1a | 81 | * @param LayerIndex: the layer foreground or background. |
bcostm | 0:dc55a068bc1a | 82 | * @param FB_Address: the layer frame buffer. |
bcostm | 0:dc55a068bc1a | 83 | * @retval None |
bcostm | 0:dc55a068bc1a | 84 | */ |
bcostm | 0:dc55a068bc1a | 85 | void LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address); |
bcostm | 0:dc55a068bc1a | 86 | |
bcostm | 0:dc55a068bc1a | 87 | /** |
bcostm | 0:dc55a068bc1a | 88 | * @brief Selects the LCD Layer. |
bcostm | 0:dc55a068bc1a | 89 | * @param LayerIndex: the Layer foreground or background. |
bcostm | 0:dc55a068bc1a | 90 | * @retval None |
bcostm | 0:dc55a068bc1a | 91 | */ |
bcostm | 0:dc55a068bc1a | 92 | void SelectLayer(uint32_t LayerIndex); |
bcostm | 0:dc55a068bc1a | 93 | |
bcostm | 0:dc55a068bc1a | 94 | /** |
bcostm | 0:dc55a068bc1a | 95 | * @brief Sets a LCD Layer visible. |
bcostm | 0:dc55a068bc1a | 96 | * @param LayerIndex: the visible Layer. |
bcostm | 0:dc55a068bc1a | 97 | * @param state: new state of the specified layer. |
bcostm | 0:dc55a068bc1a | 98 | * This parameter can be: ENABLE or DISABLE. |
bcostm | 0:dc55a068bc1a | 99 | * @retval None |
bcostm | 0:dc55a068bc1a | 100 | */ |
bcostm | 0:dc55a068bc1a | 101 | void SetLayerVisible(uint32_t LayerIndex, FunctionalState state); |
bcostm | 0:dc55a068bc1a | 102 | |
bcostm | 0:dc55a068bc1a | 103 | /** |
bcostm | 0:dc55a068bc1a | 104 | * @brief Configures the Transparency. |
bcostm | 0:dc55a068bc1a | 105 | * @param LayerIndex: the Layer foreground or background. |
bcostm | 0:dc55a068bc1a | 106 | * @param Transparency: the Transparency, |
bcostm | 0:dc55a068bc1a | 107 | * This parameter must range from 0x00 to 0xFF. |
bcostm | 0:dc55a068bc1a | 108 | * @retval None |
bcostm | 0:dc55a068bc1a | 109 | */ |
bcostm | 0:dc55a068bc1a | 110 | void SetTransparency(uint32_t LayerIndex, uint8_t Transparency); |
bcostm | 0:dc55a068bc1a | 111 | |
bcostm | 0:dc55a068bc1a | 112 | /** |
bcostm | 0:dc55a068bc1a | 113 | * @brief Sets a LCD layer frame buffer address. |
bcostm | 0:dc55a068bc1a | 114 | * @param LayerIndex: specifies the Layer foreground or background |
bcostm | 0:dc55a068bc1a | 115 | * @param Address: new LCD frame buffer value |
bcostm | 0:dc55a068bc1a | 116 | * @retval None |
bcostm | 0:dc55a068bc1a | 117 | */ |
bcostm | 0:dc55a068bc1a | 118 | void SetLayerAddress(uint32_t LayerIndex, uint32_t Address); |
bcostm | 0:dc55a068bc1a | 119 | |
bcostm | 0:dc55a068bc1a | 120 | /** |
bcostm | 0:dc55a068bc1a | 121 | * @brief Sets the Display window. |
bcostm | 0:dc55a068bc1a | 122 | * @param LayerIndex: layer index |
bcostm | 0:dc55a068bc1a | 123 | * @param Xpos: LCD X position |
bcostm | 0:dc55a068bc1a | 124 | * @param Ypos: LCD Y position |
bcostm | 0:dc55a068bc1a | 125 | * @param Width: LCD window width |
bcostm | 0:dc55a068bc1a | 126 | * @param Height: LCD window height |
bcostm | 0:dc55a068bc1a | 127 | * @retval None |
bcostm | 0:dc55a068bc1a | 128 | */ |
bcostm | 0:dc55a068bc1a | 129 | void SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); |
bcostm | 0:dc55a068bc1a | 130 | |
bcostm | 0:dc55a068bc1a | 131 | /** |
bcostm | 0:dc55a068bc1a | 132 | * @brief Configures and sets the color Keying. |
bcostm | 0:dc55a068bc1a | 133 | * @param LayerIndex: the Layer foreground or background |
bcostm | 0:dc55a068bc1a | 134 | * @param RGBValue: the Color reference |
bcostm | 0:dc55a068bc1a | 135 | * @retval None |
bcostm | 0:dc55a068bc1a | 136 | */ |
bcostm | 0:dc55a068bc1a | 137 | void SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue); |
bcostm | 0:dc55a068bc1a | 138 | |
bcostm | 0:dc55a068bc1a | 139 | /** |
bcostm | 0:dc55a068bc1a | 140 | * @brief Disables the color Keying. |
bcostm | 0:dc55a068bc1a | 141 | * @param LayerIndex: the Layer foreground or background |
bcostm | 0:dc55a068bc1a | 142 | * @retval None |
bcostm | 0:dc55a068bc1a | 143 | */ |
bcostm | 0:dc55a068bc1a | 144 | void ResetColorKeying(uint32_t LayerIndex); |
bcostm | 0:dc55a068bc1a | 145 | |
bcostm | 0:dc55a068bc1a | 146 | /** |
bcostm | 0:dc55a068bc1a | 147 | * @brief Gets the LCD Text color. |
bcostm | 0:dc55a068bc1a | 148 | * @param None |
bcostm | 0:dc55a068bc1a | 149 | * @retval Text color |
bcostm | 0:dc55a068bc1a | 150 | */ |
bcostm | 0:dc55a068bc1a | 151 | uint32_t GetTextColor(void); |
bcostm | 0:dc55a068bc1a | 152 | |
bcostm | 0:dc55a068bc1a | 153 | /** |
bcostm | 0:dc55a068bc1a | 154 | * @brief Gets the LCD Background color. |
bcostm | 0:dc55a068bc1a | 155 | * @param None |
bcostm | 0:dc55a068bc1a | 156 | * @retval Background color |
bcostm | 0:dc55a068bc1a | 157 | */ |
bcostm | 0:dc55a068bc1a | 158 | uint32_t GetBackColor(void); |
bcostm | 0:dc55a068bc1a | 159 | |
bcostm | 0:dc55a068bc1a | 160 | /** |
bcostm | 0:dc55a068bc1a | 161 | * @brief Sets the Text color. |
bcostm | 0:dc55a068bc1a | 162 | * @param Color: the Text color code ARGB(8-8-8-8); |
bcostm | 0:dc55a068bc1a | 163 | * @retval None |
bcostm | 0:dc55a068bc1a | 164 | */ |
bcostm | 0:dc55a068bc1a | 165 | void SetTextColor(uint32_t Color); |
bcostm | 0:dc55a068bc1a | 166 | |
bcostm | 0:dc55a068bc1a | 167 | /** |
bcostm | 0:dc55a068bc1a | 168 | * @brief Sets the Background color. |
bcostm | 0:dc55a068bc1a | 169 | * @param Color: the layer Background color code ARGB(8-8-8-8); |
bcostm | 0:dc55a068bc1a | 170 | * @retval None |
bcostm | 0:dc55a068bc1a | 171 | */ |
bcostm | 0:dc55a068bc1a | 172 | void SetBackColor(uint32_t Color); |
bcostm | 0:dc55a068bc1a | 173 | |
bcostm | 0:dc55a068bc1a | 174 | /** |
bcostm | 0:dc55a068bc1a | 175 | * @brief Sets the Text Font. |
bcostm | 0:dc55a068bc1a | 176 | * @param pFonts: the layer font to be used |
bcostm | 0:dc55a068bc1a | 177 | * @retval None |
bcostm | 0:dc55a068bc1a | 178 | */ |
bcostm | 0:dc55a068bc1a | 179 | void SetFont(sFONT *pFonts); |
bcostm | 0:dc55a068bc1a | 180 | |
bcostm | 0:dc55a068bc1a | 181 | /** |
bcostm | 0:dc55a068bc1a | 182 | * @brief Gets the Text Font. |
bcostm | 0:dc55a068bc1a | 183 | * @param None |
bcostm | 0:dc55a068bc1a | 184 | * @retval Layer font |
bcostm | 0:dc55a068bc1a | 185 | */ |
bcostm | 0:dc55a068bc1a | 186 | sFONT *GetFont(void); |
bcostm | 0:dc55a068bc1a | 187 | |
bcostm | 0:dc55a068bc1a | 188 | /** |
bcostm | 0:dc55a068bc1a | 189 | * @brief Reads Pixel. |
bcostm | 0:dc55a068bc1a | 190 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 191 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 192 | * @retval RGB pixel color |
bcostm | 0:dc55a068bc1a | 193 | */ |
bcostm | 0:dc55a068bc1a | 194 | uint32_t ReadPixel(uint16_t Xpos, uint16_t Ypos); |
bcostm | 0:dc55a068bc1a | 195 | |
bcostm | 0:dc55a068bc1a | 196 | /** |
bcostm | 0:dc55a068bc1a | 197 | * @brief Clears the hole LCD. |
bcostm | 0:dc55a068bc1a | 198 | * @param Color: the color of the background |
bcostm | 0:dc55a068bc1a | 199 | * @retval None |
bcostm | 0:dc55a068bc1a | 200 | */ |
bcostm | 0:dc55a068bc1a | 201 | void Clear(uint32_t Color); |
bcostm | 0:dc55a068bc1a | 202 | |
bcostm | 0:dc55a068bc1a | 203 | /** |
bcostm | 0:dc55a068bc1a | 204 | * @brief Clears the selected line. |
bcostm | 0:dc55a068bc1a | 205 | * @param Line: the line to be cleared |
bcostm | 0:dc55a068bc1a | 206 | * @retval None |
bcostm | 0:dc55a068bc1a | 207 | */ |
bcostm | 0:dc55a068bc1a | 208 | void ClearStringLine(uint32_t Line); |
bcostm | 0:dc55a068bc1a | 209 | |
bcostm | 0:dc55a068bc1a | 210 | /** |
bcostm | 0:dc55a068bc1a | 211 | * @brief Displays one character. |
bcostm | 0:dc55a068bc1a | 212 | * @param Xpos: start column address |
bcostm | 0:dc55a068bc1a | 213 | * @param Ypos: the Line where to display the character shape |
bcostm | 0:dc55a068bc1a | 214 | * @param Ascii: character ascii code, must be between 0x20 and 0x7E |
bcostm | 0:dc55a068bc1a | 215 | * @retval None |
bcostm | 0:dc55a068bc1a | 216 | */ |
bcostm | 0:dc55a068bc1a | 217 | void DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii); |
bcostm | 0:dc55a068bc1a | 218 | |
bcostm | 0:dc55a068bc1a | 219 | /** |
bcostm | 0:dc55a068bc1a | 220 | * @brief Displays a maximum of 60 char on the LCD. |
bcostm | 0:dc55a068bc1a | 221 | * @param X: pointer to x position (in pixel); |
bcostm | 0:dc55a068bc1a | 222 | * @param Y: pointer to y position (in pixel); |
bcostm | 0:dc55a068bc1a | 223 | * @param pText: pointer to string to display on LCD |
bcostm | 0:dc55a068bc1a | 224 | * @param mode: The display mode |
bcostm | 0:dc55a068bc1a | 225 | * This parameter can be one of the following values: |
bcostm | 0:dc55a068bc1a | 226 | * @arg CENTER_MODE |
bcostm | 0:dc55a068bc1a | 227 | * @arg RIGHT_MODE |
bcostm | 0:dc55a068bc1a | 228 | * @arg LEFT_MODE |
bcostm | 0:dc55a068bc1a | 229 | * @retval None |
bcostm | 0:dc55a068bc1a | 230 | */ |
bcostm | 0:dc55a068bc1a | 231 | void DisplayStringAt(uint16_t X, uint16_t Y, uint8_t *pText, Text_AlignModeTypdef mode); |
bcostm | 0:dc55a068bc1a | 232 | |
bcostm | 0:dc55a068bc1a | 233 | /** |
bcostm | 0:dc55a068bc1a | 234 | * @brief Displays a maximum of 20 char on the LCD. |
bcostm | 0:dc55a068bc1a | 235 | * @param Line: the Line where to display the character shape |
bcostm | 0:dc55a068bc1a | 236 | * @param ptr: pointer to string to display on LCD |
bcostm | 0:dc55a068bc1a | 237 | * @retval None |
bcostm | 0:dc55a068bc1a | 238 | */ |
bcostm | 0:dc55a068bc1a | 239 | void DisplayStringAtLine(uint16_t Line, uint8_t *ptr); |
bcostm | 0:dc55a068bc1a | 240 | |
bcostm | 0:dc55a068bc1a | 241 | /** |
bcostm | 0:dc55a068bc1a | 242 | * @brief Displays an horizontal line. |
bcostm | 0:dc55a068bc1a | 243 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 244 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 245 | * @param Length: line length |
bcostm | 0:dc55a068bc1a | 246 | * @retval None |
bcostm | 0:dc55a068bc1a | 247 | */ |
bcostm | 0:dc55a068bc1a | 248 | void DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length); |
bcostm | 0:dc55a068bc1a | 249 | |
bcostm | 0:dc55a068bc1a | 250 | /** |
bcostm | 0:dc55a068bc1a | 251 | * @brief Displays a vertical line. |
bcostm | 0:dc55a068bc1a | 252 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 253 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 254 | * @param Length: line length |
bcostm | 0:dc55a068bc1a | 255 | * @retval None |
bcostm | 0:dc55a068bc1a | 256 | */ |
bcostm | 0:dc55a068bc1a | 257 | void DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length); |
bcostm | 0:dc55a068bc1a | 258 | |
bcostm | 0:dc55a068bc1a | 259 | /** |
bcostm | 0:dc55a068bc1a | 260 | * @brief Displays an uni-line (between two points);. |
bcostm | 0:dc55a068bc1a | 261 | * @param X1: the point 1 X position |
bcostm | 0:dc55a068bc1a | 262 | * @param Y1: the point 1 Y position |
bcostm | 0:dc55a068bc1a | 263 | * @param X2: the point 2 X position |
bcostm | 0:dc55a068bc1a | 264 | * @param Y2: the point 2 Y position |
bcostm | 0:dc55a068bc1a | 265 | * @retval None |
bcostm | 0:dc55a068bc1a | 266 | */ |
bcostm | 0:dc55a068bc1a | 267 | void DrawLine(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2); |
bcostm | 0:dc55a068bc1a | 268 | |
bcostm | 0:dc55a068bc1a | 269 | /** |
bcostm | 0:dc55a068bc1a | 270 | * @brief Displays a rectangle. |
bcostm | 0:dc55a068bc1a | 271 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 272 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 273 | * @param Height: display rectangle height |
bcostm | 0:dc55a068bc1a | 274 | * @param Width: display rectangle width |
bcostm | 0:dc55a068bc1a | 275 | * @retval None |
bcostm | 0:dc55a068bc1a | 276 | */ |
bcostm | 0:dc55a068bc1a | 277 | void DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); |
bcostm | 0:dc55a068bc1a | 278 | |
bcostm | 0:dc55a068bc1a | 279 | /** |
bcostm | 0:dc55a068bc1a | 280 | * @brief Displays a circle. |
bcostm | 0:dc55a068bc1a | 281 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 282 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 283 | * @param Radius: the circle radius |
bcostm | 0:dc55a068bc1a | 284 | * @retval None |
bcostm | 0:dc55a068bc1a | 285 | */ |
bcostm | 0:dc55a068bc1a | 286 | void DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); |
bcostm | 0:dc55a068bc1a | 287 | |
bcostm | 0:dc55a068bc1a | 288 | /** |
bcostm | 0:dc55a068bc1a | 289 | * @brief Displays an poly-line (between many points);. |
bcostm | 0:dc55a068bc1a | 290 | * @param Points: pointer to the points array |
bcostm | 0:dc55a068bc1a | 291 | * @param PointCount: Number of points |
bcostm | 0:dc55a068bc1a | 292 | * @retval None |
bcostm | 0:dc55a068bc1a | 293 | */ |
bcostm | 0:dc55a068bc1a | 294 | void DrawPolygon(pPoint Points, uint16_t PointCount); |
bcostm | 0:dc55a068bc1a | 295 | |
bcostm | 0:dc55a068bc1a | 296 | /** |
bcostm | 0:dc55a068bc1a | 297 | * @brief Displays an Ellipse. |
bcostm | 0:dc55a068bc1a | 298 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 299 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 300 | * @param XRadius: the X radius of ellipse |
bcostm | 0:dc55a068bc1a | 301 | * @param YRadius: the Y radius of ellipse |
bcostm | 0:dc55a068bc1a | 302 | * @retval None |
bcostm | 0:dc55a068bc1a | 303 | */ |
bcostm | 0:dc55a068bc1a | 304 | void DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius); |
bcostm | 0:dc55a068bc1a | 305 | |
bcostm | 0:dc55a068bc1a | 306 | /** |
bcostm | 0:dc55a068bc1a | 307 | * @brief Displays a bitmap picture loaded in the internal Flash (32 bpp);. |
bcostm | 0:dc55a068bc1a | 308 | * @param X: the bmp x position in the LCD |
bcostm | 0:dc55a068bc1a | 309 | * @param Y: the bmp Y position in the LCD |
bcostm | 0:dc55a068bc1a | 310 | * @param pBmp: Bmp picture address in the internal Flash |
bcostm | 0:dc55a068bc1a | 311 | * @retval None |
bcostm | 0:dc55a068bc1a | 312 | */ |
bcostm | 0:dc55a068bc1a | 313 | void DrawBitmap(uint32_t X, uint32_t Y, uint8_t *pBmp); |
bcostm | 0:dc55a068bc1a | 314 | |
bcostm | 0:dc55a068bc1a | 315 | /** |
bcostm | 0:dc55a068bc1a | 316 | * @brief Displays a full rectangle. |
bcostm | 0:dc55a068bc1a | 317 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 318 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 319 | * @param Height: rectangle height |
bcostm | 0:dc55a068bc1a | 320 | * @param Width: rectangle width |
bcostm | 0:dc55a068bc1a | 321 | * @retval None |
bcostm | 0:dc55a068bc1a | 322 | */ |
bcostm | 0:dc55a068bc1a | 323 | void FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height); |
bcostm | 0:dc55a068bc1a | 324 | |
bcostm | 0:dc55a068bc1a | 325 | /** |
bcostm | 0:dc55a068bc1a | 326 | * @brief Displays a full circle. |
bcostm | 0:dc55a068bc1a | 327 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 328 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 329 | * @param Radius: the circle radius |
bcostm | 0:dc55a068bc1a | 330 | * @retval None |
bcostm | 0:dc55a068bc1a | 331 | */ |
bcostm | 0:dc55a068bc1a | 332 | void FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius); |
bcostm | 0:dc55a068bc1a | 333 | |
bcostm | 0:dc55a068bc1a | 334 | /** |
bcostm | 0:dc55a068bc1a | 335 | * @brief Fill triangle. |
bcostm | 0:dc55a068bc1a | 336 | * @param X1: the point 1 x position |
bcostm | 0:dc55a068bc1a | 337 | * @param Y1: the point 1 y position |
bcostm | 0:dc55a068bc1a | 338 | * @param X2: the point 2 x position |
bcostm | 0:dc55a068bc1a | 339 | * @param Y2: the point 2 y position |
bcostm | 0:dc55a068bc1a | 340 | * @param X3: the point 3 x position |
bcostm | 0:dc55a068bc1a | 341 | * @param Y3: the point 3 y position |
bcostm | 0:dc55a068bc1a | 342 | * @retval None |
bcostm | 0:dc55a068bc1a | 343 | */ |
bcostm | 0:dc55a068bc1a | 344 | void FillTriangle(uint16_t X1, uint16_t X2, uint16_t X3, uint16_t Y1, uint16_t Y2, uint16_t Y3); |
bcostm | 0:dc55a068bc1a | 345 | |
bcostm | 0:dc55a068bc1a | 346 | /** |
bcostm | 0:dc55a068bc1a | 347 | * @brief Displays a full poly-line (between many points);. |
bcostm | 0:dc55a068bc1a | 348 | * @param Points: pointer to the points array |
bcostm | 0:dc55a068bc1a | 349 | * @param PointCount: Number of points |
bcostm | 0:dc55a068bc1a | 350 | * @retval None |
bcostm | 0:dc55a068bc1a | 351 | */ |
bcostm | 0:dc55a068bc1a | 352 | void FillPolygon(pPoint Points, uint16_t PointCount); |
bcostm | 0:dc55a068bc1a | 353 | |
bcostm | 0:dc55a068bc1a | 354 | /** |
bcostm | 0:dc55a068bc1a | 355 | * @brief Draw a full ellipse. |
bcostm | 0:dc55a068bc1a | 356 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 357 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 358 | * @param XRadius: X radius of ellipse |
bcostm | 0:dc55a068bc1a | 359 | * @param YRadius: Y radius of ellipse. |
bcostm | 0:dc55a068bc1a | 360 | * @retval None |
bcostm | 0:dc55a068bc1a | 361 | */ |
bcostm | 0:dc55a068bc1a | 362 | void FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius); |
bcostm | 0:dc55a068bc1a | 363 | |
bcostm | 0:dc55a068bc1a | 364 | /** |
bcostm | 0:dc55a068bc1a | 365 | * @brief Enables the Display. |
bcostm | 0:dc55a068bc1a | 366 | * @param None |
bcostm | 0:dc55a068bc1a | 367 | * @retval None |
bcostm | 0:dc55a068bc1a | 368 | */ |
bcostm | 0:dc55a068bc1a | 369 | void DisplayOn(void); |
bcostm | 0:dc55a068bc1a | 370 | |
bcostm | 0:dc55a068bc1a | 371 | /** |
bcostm | 0:dc55a068bc1a | 372 | * @brief Disables the Display. |
bcostm | 0:dc55a068bc1a | 373 | * @param None |
bcostm | 0:dc55a068bc1a | 374 | * @retval None |
bcostm | 0:dc55a068bc1a | 375 | */ |
bcostm | 0:dc55a068bc1a | 376 | void DisplayOff(void); |
bcostm | 0:dc55a068bc1a | 377 | |
bcostm | 0:dc55a068bc1a | 378 | /** |
bcostm | 0:dc55a068bc1a | 379 | * @brief Writes Pixel. |
bcostm | 0:dc55a068bc1a | 380 | * @param Xpos: the X position |
bcostm | 0:dc55a068bc1a | 381 | * @param Ypos: the Y position |
bcostm | 0:dc55a068bc1a | 382 | * @param RGB_Code: the pixel color in ARGB mode (8-8-8-8); |
bcostm | 0:dc55a068bc1a | 383 | * @retval None |
bcostm | 0:dc55a068bc1a | 384 | */ |
bcostm | 0:dc55a068bc1a | 385 | void DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t RGB_Code); |
bcostm | 0:dc55a068bc1a | 386 | |
bcostm | 0:dc55a068bc1a | 387 | private: |
bcostm | 0:dc55a068bc1a | 388 | |
bcostm | 0:dc55a068bc1a | 389 | }; |
bcostm | 0:dc55a068bc1a | 390 | |
bcostm | 0:dc55a068bc1a | 391 | #else |
bcostm | 0:dc55a068bc1a | 392 | #error "This class must be used with DISCO_F429ZI board only." |
bcostm | 0:dc55a068bc1a | 393 | #endif // TARGET_DISCO_F429ZI |
bcostm | 0:dc55a068bc1a | 394 | |
bcostm | 0:dc55a068bc1a | 395 | #endif |