d

Dependencies:   BSP_DISCO_F746NG LCD_DISCO_F746NG mbed

Committer:
neverblue
Date:
Fri Jan 29 06:36:47 2016 +0000
Revision:
0:ee9d4a5d95a3
a

Who changed what in which revision?

UserRevisionLine numberNew contents of line
neverblue 0:ee9d4a5d95a3 1 #include "mbed.h"
neverblue 0:ee9d4a5d95a3 2 #include "LCD_DISCO_F746NG.h"
neverblue 0:ee9d4a5d95a3 3
neverblue 0:ee9d4a5d95a3 4 LCD_DISCO_F746NG lcd;
neverblue 0:ee9d4a5d95a3 5
neverblue 0:ee9d4a5d95a3 6 DigitalOut led1(LED1);
neverblue 0:ee9d4a5d95a3 7
neverblue 0:ee9d4a5d95a3 8 int main()
neverblue 0:ee9d4a5d95a3 9 {
neverblue 0:ee9d4a5d95a3 10 led1 = 1;
neverblue 0:ee9d4a5d95a3 11
neverblue 0:ee9d4a5d95a3 12 lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE);
neverblue 0:ee9d4a5d95a3 13 wait(1);
neverblue 0:ee9d4a5d95a3 14
neverblue 0:ee9d4a5d95a3 15 while(1)
neverblue 0:ee9d4a5d95a3 16 {
neverblue 0:ee9d4a5d95a3 17 lcd.Clear(LCD_COLOR_BLUE);
neverblue 0:ee9d4a5d95a3 18 lcd.SetBackColor(LCD_COLOR_BLUE);
neverblue 0:ee9d4a5d95a3 19 lcd.SetTextColor(LCD_COLOR_WHITE);
neverblue 0:ee9d4a5d95a3 20 wait(0.3);
neverblue 0:ee9d4a5d95a3 21 lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"DISCOVERY STM32F746NG", CENTER_MODE);
neverblue 0:ee9d4a5d95a3 22 wait(1);
neverblue 0:ee9d4a5d95a3 23
neverblue 0:ee9d4a5d95a3 24 lcd.Clear(LCD_COLOR_GREEN);
neverblue 0:ee9d4a5d95a3 25
neverblue 0:ee9d4a5d95a3 26 lcd.SetTextColor(LCD_COLOR_BLUE);
neverblue 0:ee9d4a5d95a3 27 lcd.DrawRect(10, 20, 50, 50);
neverblue 0:ee9d4a5d95a3 28 wait(0.1);
neverblue 0:ee9d4a5d95a3 29 lcd.SetTextColor(LCD_COLOR_BROWN);
neverblue 0:ee9d4a5d95a3 30 lcd.DrawCircle(80, 80, 50);
neverblue 0:ee9d4a5d95a3 31 wait(0.1);
neverblue 0:ee9d4a5d95a3 32 lcd.SetTextColor(LCD_COLOR_YELLOW);
neverblue 0:ee9d4a5d95a3 33 lcd.DrawEllipse(150, 150, 50, 100);
neverblue 0:ee9d4a5d95a3 34 wait(0.1);
neverblue 0:ee9d4a5d95a3 35 lcd.SetTextColor(LCD_COLOR_RED);
neverblue 0:ee9d4a5d95a3 36 lcd.FillCircle(200, 200, 40);
neverblue 0:ee9d4a5d95a3 37 wait(1);
neverblue 0:ee9d4a5d95a3 38
neverblue 0:ee9d4a5d95a3 39 lcd.SetBackColor(LCD_COLOR_ORANGE);
neverblue 0:ee9d4a5d95a3 40 lcd.SetTextColor(LCD_COLOR_CYAN);
neverblue 0:ee9d4a5d95a3 41 lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"HAVE FUN !!!", CENTER_MODE);
neverblue 0:ee9d4a5d95a3 42 wait(1);
neverblue 0:ee9d4a5d95a3 43
neverblue 0:ee9d4a5d95a3 44 led1 = !led1;
neverblue 0:ee9d4a5d95a3 45 }
neverblue 0:ee9d4a5d95a3 46 }