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