Basic example showing how to drive the LCD

Dependencies:   BSP_DISCO_F769NI

Committer:
jeromecoutant
Date:
Fri Feb 10 15:11:06 2017 +0000
Revision:
0:db5cf2d28be1
Child:
3:45a625d2dcc4
First;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jeromecoutant 0:db5cf2d28be1 1 #include "mbed.h"
jeromecoutant 0:db5cf2d28be1 2 #include "LCD_DISCO_F769NI.h"
jeromecoutant 0:db5cf2d28be1 3
jeromecoutant 0:db5cf2d28be1 4 LCD_DISCO_F769NI lcd;
jeromecoutant 0:db5cf2d28be1 5 DigitalOut led_red(LED1);
jeromecoutant 0:db5cf2d28be1 6 DigitalOut led_green(LED2);
jeromecoutant 0:db5cf2d28be1 7
jeromecoutant 0:db5cf2d28be1 8 int main()
jeromecoutant 0:db5cf2d28be1 9 {
jeromecoutant 0:db5cf2d28be1 10 led_green = 0;
jeromecoutant 0:db5cf2d28be1 11 led_red = 1;
jeromecoutant 0:db5cf2d28be1 12
jeromecoutant 0:db5cf2d28be1 13 lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE);
jeromecoutant 0:db5cf2d28be1 14 wait(2);
jeromecoutant 0:db5cf2d28be1 15 lcd.Clear(LCD_COLOR_BLUE);
jeromecoutant 0:db5cf2d28be1 16 lcd.SetBackColor(LCD_COLOR_BLUE);
jeromecoutant 0:db5cf2d28be1 17 lcd.SetTextColor(LCD_COLOR_WHITE);
jeromecoutant 0:db5cf2d28be1 18 lcd.DisplayStringAt(0, LINE(5), (uint8_t *)"DISCOVERY STM32F769NI", CENTER_MODE);
jeromecoutant 0:db5cf2d28be1 19
jeromecoutant 0:db5cf2d28be1 20 led_green = 1;
jeromecoutant 0:db5cf2d28be1 21 led_red = 0;
jeromecoutant 0:db5cf2d28be1 22
jeromecoutant 0:db5cf2d28be1 23 while(1) {
jeromecoutant 0:db5cf2d28be1 24 }
jeromecoutant 0:db5cf2d28be1 25 }