1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
| int main(void) {
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
LCD_Init();
LCD_Clear(Blue); LCD_SetBackColor(Blue); LCD_SetTextColor(White);
LCD_DrawLine(120, 0, 320, Horizontal); LCD_DrawLine(0, 160, 240, Vertical); HAL_Delay(1000); LCD_Clear(Blue);
LCD_DrawRect(70, 210, 100, 100); HAL_Delay(1000); LCD_Clear(Blue);
LCD_DrawCircle(120, 160, 50); HAL_Delay(1000);
LCD_Clear(Blue); LCD_DisplayStringLine(Line4, (unsigned char *)" Hello,world. "); HAL_Delay(1000);
LCD_SetBackColor(White); LCD_DisplayStringLine(Line0, (unsigned char *)" "); LCD_SetBackColor(Black); LCD_DisplayStringLine(Line1, (unsigned char *)" "); LCD_SetBackColor(Grey); LCD_DisplayStringLine(Line2, (unsigned char *)" "); LCD_SetBackColor(Blue); LCD_DisplayStringLine(Line3, (unsigned char *)" "); LCD_SetBackColor(Blue2); LCD_DisplayStringLine(Line4, (unsigned char *)" "); LCD_SetBackColor(Red); LCD_DisplayStringLine(Line5, (unsigned char *)" "); LCD_SetBackColor(Magenta); LCD_DisplayStringLine(Line6, (unsigned char *)" "); LCD_SetBackColor(Green); LCD_DisplayStringLine(Line7, (unsigned char *)" "); LCD_SetBackColor(Cyan); LCD_DisplayStringLine(Line8, (unsigned char *)" "); LCD_SetBackColor(Yellow); LCD_DisplayStringLine(Line9, (unsigned char *)" ");
while (1) {
} }
|