spkt

Dependents:   LCD a123

Committer:
fundokukiri
Date:
Fri Jun 07 17:31:13 2019 +0000
Revision:
0:cf10ae4cedd3
LCD_F746

Who changed what in which revision?

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