first test tfc

Committer:
tomcollura
Date:
Wed Jun 12 15:53:14 2019 +0000
Revision:
1:6b55f1c44f47
Parent:
0:dc55a068bc1a
first commit

Who changed what in which revision?

UserRevisionLine numberNew 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
tomcollura 1:6b55f1c44f47 22 // tfc added 6-12-2019
tomcollura 1:6b55f1c44f47 23 #define TARGET_DISCO_F429ZI
tomcollura 1:6b55f1c44f47 24
bcostm 0:dc55a068bc1a 25 #ifdef TARGET_DISCO_F429ZI
bcostm 0:dc55a068bc1a 26
bcostm 0:dc55a068bc1a 27 #include "mbed.h"
bcostm 0:dc55a068bc1a 28 #include "stm32f429i_discovery_lcd.h"
bcostm 0:dc55a068bc1a 29
bcostm 0:dc55a068bc1a 30 /*
bcostm 0:dc55a068bc1a 31 This class drives the LCD display (ILI9341 240x320) present on DISCO_F429ZI board.
bcostm 0:dc55a068bc1a 32
bcostm 0:dc55a068bc1a 33 Usage:
bcostm 0:dc55a068bc1a 34
bcostm 0:dc55a068bc1a 35 #include "mbed.h"
bcostm 0:dc55a068bc1a 36 #include "LCD_DISCO_F429ZI.h"
bcostm 0:dc55a068bc1a 37
bcostm 0:dc55a068bc1a 38 LCD_DISCO_F429ZI lcd;
bcostm 0:dc55a068bc1a 39
bcostm 0:dc55a068bc1a 40 int main()
bcostm 0:dc55a068bc1a 41 {
bcostm 0:dc55a068bc1a 42 lcd.Clear(LCD_COLOR_BLUE);
bcostm 0:dc55a068bc1a 43 lcd.SetBackColor(LCD_COLOR_BLUE);
bcostm 0:dc55a068bc1a 44 lcd.SetTextColor(LCD_COLOR_WHITE);
bcostm 0:dc55a068bc1a 45 lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"HELLO", CENTER_MODE);
bcostm 0:dc55a068bc1a 46 while(1)
bcostm 0:dc55a068bc1a 47 {
bcostm 0:dc55a068bc1a 48 }
bcostm 0:dc55a068bc1a 49 }
bcostm 0:dc55a068bc1a 50 */
bcostm 0:dc55a068bc1a 51 class LCD_DISCO_F429ZI
bcostm 0:dc55a068bc1a 52 {
bcostm 0:dc55a068bc1a 53
bcostm 0:dc55a068bc1a 54 public:
bcostm 0:dc55a068bc1a 55 //! Constructor
bcostm 0:dc55a068bc1a 56 LCD_DISCO_F429ZI();
bcostm 0:dc55a068bc1a 57
bcostm 0:dc55a068bc1a 58 //! Destructor
bcostm 0:dc55a068bc1a 59 ~LCD_DISCO_F429ZI();
bcostm 0:dc55a068bc1a 60
bcostm 0:dc55a068bc1a 61 /**
bcostm 0:dc55a068bc1a 62 * @brief Initializes the LCD.
bcostm 0:dc55a068bc1a 63 * @param None
bcostm 0:dc55a068bc1a 64 * @retval LCD state
bcostm 0:dc55a068bc1a 65 */
bcostm 0:dc55a068bc1a 66 uint8_t Init(void);
bcostm 0:dc55a068bc1a 67
bcostm 0:dc55a068bc1a 68 /**
bcostm 0:dc55a068bc1a 69 * @brief Gets the LCD X size.
bcostm 0:dc55a068bc1a 70 * @param None
bcostm 0:dc55a068bc1a 71 * @retval The used LCD X size
bcostm 0:dc55a068bc1a 72 */
bcostm 0:dc55a068bc1a 73 uint32_t GetXSize(void);
bcostm 0:dc55a068bc1a 74
bcostm 0:dc55a068bc1a 75 /**
bcostm 0:dc55a068bc1a 76 * @brief Gets the LCD Y size.
bcostm 0:dc55a068bc1a 77 * @param None
bcostm 0:dc55a068bc1a 78 * @retval The used LCD Y size
bcostm 0:dc55a068bc1a 79 */
bcostm 0:dc55a068bc1a 80 uint32_t GetYSize(void);
bcostm 0:dc55a068bc1a 81
bcostm 0:dc55a068bc1a 82 /**
bcostm 0:dc55a068bc1a 83 * @brief Initializes the LCD layers.
bcostm 0:dc55a068bc1a 84 * @param LayerIndex: the layer foreground or background.
bcostm 0:dc55a068bc1a 85 * @param FB_Address: the layer frame buffer.
bcostm 0:dc55a068bc1a 86 * @retval None
bcostm 0:dc55a068bc1a 87 */
bcostm 0:dc55a068bc1a 88 void LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address);
bcostm 0:dc55a068bc1a 89
bcostm 0:dc55a068bc1a 90 /**
bcostm 0:dc55a068bc1a 91 * @brief Selects the LCD Layer.
bcostm 0:dc55a068bc1a 92 * @param LayerIndex: the Layer foreground or background.
bcostm 0:dc55a068bc1a 93 * @retval None
bcostm 0:dc55a068bc1a 94 */
bcostm 0:dc55a068bc1a 95 void SelectLayer(uint32_t LayerIndex);
bcostm 0:dc55a068bc1a 96
bcostm 0:dc55a068bc1a 97 /**
bcostm 0:dc55a068bc1a 98 * @brief Sets a LCD Layer visible.
bcostm 0:dc55a068bc1a 99 * @param LayerIndex: the visible Layer.
bcostm 0:dc55a068bc1a 100 * @param state: new state of the specified layer.
bcostm 0:dc55a068bc1a 101 * This parameter can be: ENABLE or DISABLE.
bcostm 0:dc55a068bc1a 102 * @retval None
bcostm 0:dc55a068bc1a 103 */
bcostm 0:dc55a068bc1a 104 void SetLayerVisible(uint32_t LayerIndex, FunctionalState state);
bcostm 0:dc55a068bc1a 105
bcostm 0:dc55a068bc1a 106 /**
bcostm 0:dc55a068bc1a 107 * @brief Configures the Transparency.
bcostm 0:dc55a068bc1a 108 * @param LayerIndex: the Layer foreground or background.
bcostm 0:dc55a068bc1a 109 * @param Transparency: the Transparency,
bcostm 0:dc55a068bc1a 110 * This parameter must range from 0x00 to 0xFF.
bcostm 0:dc55a068bc1a 111 * @retval None
bcostm 0:dc55a068bc1a 112 */
bcostm 0:dc55a068bc1a 113 void SetTransparency(uint32_t LayerIndex, uint8_t Transparency);
bcostm 0:dc55a068bc1a 114
bcostm 0:dc55a068bc1a 115 /**
bcostm 0:dc55a068bc1a 116 * @brief Sets a LCD layer frame buffer address.
bcostm 0:dc55a068bc1a 117 * @param LayerIndex: specifies the Layer foreground or background
bcostm 0:dc55a068bc1a 118 * @param Address: new LCD frame buffer value
bcostm 0:dc55a068bc1a 119 * @retval None
bcostm 0:dc55a068bc1a 120 */
bcostm 0:dc55a068bc1a 121 void SetLayerAddress(uint32_t LayerIndex, uint32_t Address);
bcostm 0:dc55a068bc1a 122
bcostm 0:dc55a068bc1a 123 /**
bcostm 0:dc55a068bc1a 124 * @brief Sets the Display window.
bcostm 0:dc55a068bc1a 125 * @param LayerIndex: layer index
bcostm 0:dc55a068bc1a 126 * @param Xpos: LCD X position
bcostm 0:dc55a068bc1a 127 * @param Ypos: LCD Y position
bcostm 0:dc55a068bc1a 128 * @param Width: LCD window width
bcostm 0:dc55a068bc1a 129 * @param Height: LCD window height
bcostm 0:dc55a068bc1a 130 * @retval None
bcostm 0:dc55a068bc1a 131 */
bcostm 0:dc55a068bc1a 132 void SetLayerWindow(uint16_t LayerIndex, uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
bcostm 0:dc55a068bc1a 133
bcostm 0:dc55a068bc1a 134 /**
bcostm 0:dc55a068bc1a 135 * @brief Configures and sets the color Keying.
bcostm 0:dc55a068bc1a 136 * @param LayerIndex: the Layer foreground or background
bcostm 0:dc55a068bc1a 137 * @param RGBValue: the Color reference
bcostm 0:dc55a068bc1a 138 * @retval None
bcostm 0:dc55a068bc1a 139 */
bcostm 0:dc55a068bc1a 140 void SetColorKeying(uint32_t LayerIndex, uint32_t RGBValue);
bcostm 0:dc55a068bc1a 141
bcostm 0:dc55a068bc1a 142 /**
bcostm 0:dc55a068bc1a 143 * @brief Disables the color Keying.
bcostm 0:dc55a068bc1a 144 * @param LayerIndex: the Layer foreground or background
bcostm 0:dc55a068bc1a 145 * @retval None
bcostm 0:dc55a068bc1a 146 */
bcostm 0:dc55a068bc1a 147 void ResetColorKeying(uint32_t LayerIndex);
bcostm 0:dc55a068bc1a 148
bcostm 0:dc55a068bc1a 149 /**
bcostm 0:dc55a068bc1a 150 * @brief Gets the LCD Text color.
bcostm 0:dc55a068bc1a 151 * @param None
bcostm 0:dc55a068bc1a 152 * @retval Text color
bcostm 0:dc55a068bc1a 153 */
bcostm 0:dc55a068bc1a 154 uint32_t GetTextColor(void);
bcostm 0:dc55a068bc1a 155
bcostm 0:dc55a068bc1a 156 /**
bcostm 0:dc55a068bc1a 157 * @brief Gets the LCD Background color.
bcostm 0:dc55a068bc1a 158 * @param None
bcostm 0:dc55a068bc1a 159 * @retval Background color
bcostm 0:dc55a068bc1a 160 */
bcostm 0:dc55a068bc1a 161 uint32_t GetBackColor(void);
bcostm 0:dc55a068bc1a 162
bcostm 0:dc55a068bc1a 163 /**
bcostm 0:dc55a068bc1a 164 * @brief Sets the Text color.
bcostm 0:dc55a068bc1a 165 * @param Color: the Text color code ARGB(8-8-8-8);
bcostm 0:dc55a068bc1a 166 * @retval None
bcostm 0:dc55a068bc1a 167 */
bcostm 0:dc55a068bc1a 168 void SetTextColor(uint32_t Color);
bcostm 0:dc55a068bc1a 169
bcostm 0:dc55a068bc1a 170 /**
bcostm 0:dc55a068bc1a 171 * @brief Sets the Background color.
bcostm 0:dc55a068bc1a 172 * @param Color: the layer Background color code ARGB(8-8-8-8);
bcostm 0:dc55a068bc1a 173 * @retval None
bcostm 0:dc55a068bc1a 174 */
bcostm 0:dc55a068bc1a 175 void SetBackColor(uint32_t Color);
bcostm 0:dc55a068bc1a 176
bcostm 0:dc55a068bc1a 177 /**
bcostm 0:dc55a068bc1a 178 * @brief Sets the Text Font.
bcostm 0:dc55a068bc1a 179 * @param pFonts: the layer font to be used
bcostm 0:dc55a068bc1a 180 * @retval None
bcostm 0:dc55a068bc1a 181 */
bcostm 0:dc55a068bc1a 182 void SetFont(sFONT *pFonts);
bcostm 0:dc55a068bc1a 183
bcostm 0:dc55a068bc1a 184 /**
bcostm 0:dc55a068bc1a 185 * @brief Gets the Text Font.
bcostm 0:dc55a068bc1a 186 * @param None
bcostm 0:dc55a068bc1a 187 * @retval Layer font
bcostm 0:dc55a068bc1a 188 */
bcostm 0:dc55a068bc1a 189 sFONT *GetFont(void);
bcostm 0:dc55a068bc1a 190
bcostm 0:dc55a068bc1a 191 /**
bcostm 0:dc55a068bc1a 192 * @brief Reads Pixel.
bcostm 0:dc55a068bc1a 193 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 194 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 195 * @retval RGB pixel color
bcostm 0:dc55a068bc1a 196 */
bcostm 0:dc55a068bc1a 197 uint32_t ReadPixel(uint16_t Xpos, uint16_t Ypos);
bcostm 0:dc55a068bc1a 198
bcostm 0:dc55a068bc1a 199 /**
bcostm 0:dc55a068bc1a 200 * @brief Clears the hole LCD.
bcostm 0:dc55a068bc1a 201 * @param Color: the color of the background
bcostm 0:dc55a068bc1a 202 * @retval None
bcostm 0:dc55a068bc1a 203 */
bcostm 0:dc55a068bc1a 204 void Clear(uint32_t Color);
bcostm 0:dc55a068bc1a 205
bcostm 0:dc55a068bc1a 206 /**
bcostm 0:dc55a068bc1a 207 * @brief Clears the selected line.
bcostm 0:dc55a068bc1a 208 * @param Line: the line to be cleared
bcostm 0:dc55a068bc1a 209 * @retval None
bcostm 0:dc55a068bc1a 210 */
bcostm 0:dc55a068bc1a 211 void ClearStringLine(uint32_t Line);
bcostm 0:dc55a068bc1a 212
bcostm 0:dc55a068bc1a 213 /**
bcostm 0:dc55a068bc1a 214 * @brief Displays one character.
bcostm 0:dc55a068bc1a 215 * @param Xpos: start column address
bcostm 0:dc55a068bc1a 216 * @param Ypos: the Line where to display the character shape
bcostm 0:dc55a068bc1a 217 * @param Ascii: character ascii code, must be between 0x20 and 0x7E
bcostm 0:dc55a068bc1a 218 * @retval None
bcostm 0:dc55a068bc1a 219 */
bcostm 0:dc55a068bc1a 220 void DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
bcostm 0:dc55a068bc1a 221
bcostm 0:dc55a068bc1a 222 /**
bcostm 0:dc55a068bc1a 223 * @brief Displays a maximum of 60 char on the LCD.
bcostm 0:dc55a068bc1a 224 * @param X: pointer to x position (in pixel);
bcostm 0:dc55a068bc1a 225 * @param Y: pointer to y position (in pixel);
bcostm 0:dc55a068bc1a 226 * @param pText: pointer to string to display on LCD
bcostm 0:dc55a068bc1a 227 * @param mode: The display mode
bcostm 0:dc55a068bc1a 228 * This parameter can be one of the following values:
bcostm 0:dc55a068bc1a 229 * @arg CENTER_MODE
bcostm 0:dc55a068bc1a 230 * @arg RIGHT_MODE
bcostm 0:dc55a068bc1a 231 * @arg LEFT_MODE
bcostm 0:dc55a068bc1a 232 * @retval None
bcostm 0:dc55a068bc1a 233 */
bcostm 0:dc55a068bc1a 234 void DisplayStringAt(uint16_t X, uint16_t Y, uint8_t *pText, Text_AlignModeTypdef mode);
bcostm 0:dc55a068bc1a 235
bcostm 0:dc55a068bc1a 236 /**
bcostm 0:dc55a068bc1a 237 * @brief Displays a maximum of 20 char on the LCD.
bcostm 0:dc55a068bc1a 238 * @param Line: the Line where to display the character shape
bcostm 0:dc55a068bc1a 239 * @param ptr: pointer to string to display on LCD
bcostm 0:dc55a068bc1a 240 * @retval None
bcostm 0:dc55a068bc1a 241 */
bcostm 0:dc55a068bc1a 242 void DisplayStringAtLine(uint16_t Line, uint8_t *ptr);
bcostm 0:dc55a068bc1a 243
bcostm 0:dc55a068bc1a 244 /**
bcostm 0:dc55a068bc1a 245 * @brief Displays an horizontal line.
bcostm 0:dc55a068bc1a 246 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 247 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 248 * @param Length: line length
bcostm 0:dc55a068bc1a 249 * @retval None
bcostm 0:dc55a068bc1a 250 */
bcostm 0:dc55a068bc1a 251 void DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
bcostm 0:dc55a068bc1a 252
bcostm 0:dc55a068bc1a 253 /**
bcostm 0:dc55a068bc1a 254 * @brief Displays a vertical line.
bcostm 0:dc55a068bc1a 255 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 256 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 257 * @param Length: line length
bcostm 0:dc55a068bc1a 258 * @retval None
bcostm 0:dc55a068bc1a 259 */
bcostm 0:dc55a068bc1a 260 void DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
bcostm 0:dc55a068bc1a 261
bcostm 0:dc55a068bc1a 262 /**
bcostm 0:dc55a068bc1a 263 * @brief Displays an uni-line (between two points);.
bcostm 0:dc55a068bc1a 264 * @param X1: the point 1 X position
bcostm 0:dc55a068bc1a 265 * @param Y1: the point 1 Y position
bcostm 0:dc55a068bc1a 266 * @param X2: the point 2 X position
bcostm 0:dc55a068bc1a 267 * @param Y2: the point 2 Y position
bcostm 0:dc55a068bc1a 268 * @retval None
bcostm 0:dc55a068bc1a 269 */
bcostm 0:dc55a068bc1a 270 void DrawLine(uint16_t X1, uint16_t Y1, uint16_t X2, uint16_t Y2);
bcostm 0:dc55a068bc1a 271
bcostm 0:dc55a068bc1a 272 /**
bcostm 0:dc55a068bc1a 273 * @brief Displays a rectangle.
bcostm 0:dc55a068bc1a 274 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 275 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 276 * @param Height: display rectangle height
bcostm 0:dc55a068bc1a 277 * @param Width: display rectangle width
bcostm 0:dc55a068bc1a 278 * @retval None
bcostm 0:dc55a068bc1a 279 */
bcostm 0:dc55a068bc1a 280 void DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
bcostm 0:dc55a068bc1a 281
bcostm 0:dc55a068bc1a 282 /**
bcostm 0:dc55a068bc1a 283 * @brief Displays a circle.
bcostm 0:dc55a068bc1a 284 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 285 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 286 * @param Radius: the circle radius
bcostm 0:dc55a068bc1a 287 * @retval None
bcostm 0:dc55a068bc1a 288 */
bcostm 0:dc55a068bc1a 289 void DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
bcostm 0:dc55a068bc1a 290
bcostm 0:dc55a068bc1a 291 /**
bcostm 0:dc55a068bc1a 292 * @brief Displays an poly-line (between many points);.
bcostm 0:dc55a068bc1a 293 * @param Points: pointer to the points array
bcostm 0:dc55a068bc1a 294 * @param PointCount: Number of points
bcostm 0:dc55a068bc1a 295 * @retval None
bcostm 0:dc55a068bc1a 296 */
bcostm 0:dc55a068bc1a 297 void DrawPolygon(pPoint Points, uint16_t PointCount);
bcostm 0:dc55a068bc1a 298
bcostm 0:dc55a068bc1a 299 /**
bcostm 0:dc55a068bc1a 300 * @brief Displays an Ellipse.
bcostm 0:dc55a068bc1a 301 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 302 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 303 * @param XRadius: the X radius of ellipse
bcostm 0:dc55a068bc1a 304 * @param YRadius: the Y radius of ellipse
bcostm 0:dc55a068bc1a 305 * @retval None
bcostm 0:dc55a068bc1a 306 */
bcostm 0:dc55a068bc1a 307 void DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
bcostm 0:dc55a068bc1a 308
bcostm 0:dc55a068bc1a 309 /**
bcostm 0:dc55a068bc1a 310 * @brief Displays a bitmap picture loaded in the internal Flash (32 bpp);.
bcostm 0:dc55a068bc1a 311 * @param X: the bmp x position in the LCD
bcostm 0:dc55a068bc1a 312 * @param Y: the bmp Y position in the LCD
bcostm 0:dc55a068bc1a 313 * @param pBmp: Bmp picture address in the internal Flash
bcostm 0:dc55a068bc1a 314 * @retval None
bcostm 0:dc55a068bc1a 315 */
bcostm 0:dc55a068bc1a 316 void DrawBitmap(uint32_t X, uint32_t Y, uint8_t *pBmp);
bcostm 0:dc55a068bc1a 317
bcostm 0:dc55a068bc1a 318 /**
bcostm 0:dc55a068bc1a 319 * @brief Displays a full rectangle.
bcostm 0:dc55a068bc1a 320 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 321 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 322 * @param Height: rectangle height
bcostm 0:dc55a068bc1a 323 * @param Width: rectangle width
bcostm 0:dc55a068bc1a 324 * @retval None
bcostm 0:dc55a068bc1a 325 */
bcostm 0:dc55a068bc1a 326 void FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
bcostm 0:dc55a068bc1a 327
bcostm 0:dc55a068bc1a 328 /**
bcostm 0:dc55a068bc1a 329 * @brief Displays a full circle.
bcostm 0:dc55a068bc1a 330 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 331 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 332 * @param Radius: the circle radius
bcostm 0:dc55a068bc1a 333 * @retval None
bcostm 0:dc55a068bc1a 334 */
bcostm 0:dc55a068bc1a 335 void FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
bcostm 0:dc55a068bc1a 336
bcostm 0:dc55a068bc1a 337 /**
bcostm 0:dc55a068bc1a 338 * @brief Fill triangle.
bcostm 0:dc55a068bc1a 339 * @param X1: the point 1 x position
bcostm 0:dc55a068bc1a 340 * @param Y1: the point 1 y position
bcostm 0:dc55a068bc1a 341 * @param X2: the point 2 x position
bcostm 0:dc55a068bc1a 342 * @param Y2: the point 2 y position
bcostm 0:dc55a068bc1a 343 * @param X3: the point 3 x position
bcostm 0:dc55a068bc1a 344 * @param Y3: the point 3 y position
bcostm 0:dc55a068bc1a 345 * @retval None
bcostm 0:dc55a068bc1a 346 */
bcostm 0:dc55a068bc1a 347 void FillTriangle(uint16_t X1, uint16_t X2, uint16_t X3, uint16_t Y1, uint16_t Y2, uint16_t Y3);
bcostm 0:dc55a068bc1a 348
bcostm 0:dc55a068bc1a 349 /**
bcostm 0:dc55a068bc1a 350 * @brief Displays a full poly-line (between many points);.
bcostm 0:dc55a068bc1a 351 * @param Points: pointer to the points array
bcostm 0:dc55a068bc1a 352 * @param PointCount: Number of points
bcostm 0:dc55a068bc1a 353 * @retval None
bcostm 0:dc55a068bc1a 354 */
bcostm 0:dc55a068bc1a 355 void FillPolygon(pPoint Points, uint16_t PointCount);
bcostm 0:dc55a068bc1a 356
bcostm 0:dc55a068bc1a 357 /**
bcostm 0:dc55a068bc1a 358 * @brief Draw a full ellipse.
bcostm 0:dc55a068bc1a 359 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 360 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 361 * @param XRadius: X radius of ellipse
bcostm 0:dc55a068bc1a 362 * @param YRadius: Y radius of ellipse.
bcostm 0:dc55a068bc1a 363 * @retval None
bcostm 0:dc55a068bc1a 364 */
bcostm 0:dc55a068bc1a 365 void FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
bcostm 0:dc55a068bc1a 366
bcostm 0:dc55a068bc1a 367 /**
bcostm 0:dc55a068bc1a 368 * @brief Enables the Display.
bcostm 0:dc55a068bc1a 369 * @param None
bcostm 0:dc55a068bc1a 370 * @retval None
bcostm 0:dc55a068bc1a 371 */
bcostm 0:dc55a068bc1a 372 void DisplayOn(void);
bcostm 0:dc55a068bc1a 373
bcostm 0:dc55a068bc1a 374 /**
bcostm 0:dc55a068bc1a 375 * @brief Disables the Display.
bcostm 0:dc55a068bc1a 376 * @param None
bcostm 0:dc55a068bc1a 377 * @retval None
bcostm 0:dc55a068bc1a 378 */
bcostm 0:dc55a068bc1a 379 void DisplayOff(void);
bcostm 0:dc55a068bc1a 380
bcostm 0:dc55a068bc1a 381 /**
bcostm 0:dc55a068bc1a 382 * @brief Writes Pixel.
bcostm 0:dc55a068bc1a 383 * @param Xpos: the X position
bcostm 0:dc55a068bc1a 384 * @param Ypos: the Y position
bcostm 0:dc55a068bc1a 385 * @param RGB_Code: the pixel color in ARGB mode (8-8-8-8);
bcostm 0:dc55a068bc1a 386 * @retval None
bcostm 0:dc55a068bc1a 387 */
bcostm 0:dc55a068bc1a 388 void DrawPixel(uint16_t Xpos, uint16_t Ypos, uint32_t RGB_Code);
bcostm 0:dc55a068bc1a 389
bcostm 0:dc55a068bc1a 390 private:
bcostm 0:dc55a068bc1a 391
bcostm 0:dc55a068bc1a 392 };
bcostm 0:dc55a068bc1a 393
bcostm 0:dc55a068bc1a 394 #else
bcostm 0:dc55a068bc1a 395 #error "This class must be used with DISCO_F429ZI board only."
bcostm 0:dc55a068bc1a 396 #endif // TARGET_DISCO_F429ZI
bcostm 0:dc55a068bc1a 397
bcostm 0:dc55a068bc1a 398 #endif