lcd_test
Dependencies: mbed BSP_DISCO_F413ZH
main.cpp@0:2690fb24ec7e, 2020-02-08 (annotated)
- Committer:
- putterthapanun
- Date:
- Sat Feb 08 08:33:17 2020 +0000
- Revision:
- 0:2690fb24ec7e
LCD test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
putterthapanun | 0:2690fb24ec7e | 1 | #include "mbed.h" |
putterthapanun | 0:2690fb24ec7e | 2 | #include "stm32f413h_discovery_lcd.h" |
putterthapanun | 0:2690fb24ec7e | 3 | |
putterthapanun | 0:2690fb24ec7e | 4 | int main() |
putterthapanun | 0:2690fb24ec7e | 5 | { |
putterthapanun | 0:2690fb24ec7e | 6 | BSP_LCD_Init(); |
putterthapanun | 0:2690fb24ec7e | 7 | |
putterthapanun | 0:2690fb24ec7e | 8 | /* Clear the LCD */ |
putterthapanun | 0:2690fb24ec7e | 9 | BSP_LCD_Clear(LCD_COLOR_WHITE); |
putterthapanun | 0:2690fb24ec7e | 10 | |
putterthapanun | 0:2690fb24ec7e | 11 | BSP_LCD_DisplayStringAt(0, LINE(1), (uint8_t *)"MBED EXAMPLE", CENTER_MODE); |
putterthapanun | 0:2690fb24ec7e | 12 | wait(2); |
putterthapanun | 0:2690fb24ec7e | 13 | BSP_LCD_Clear(LCD_COLOR_GREEN); |
putterthapanun | 0:2690fb24ec7e | 14 | BSP_LCD_SetBackColor(LCD_COLOR_GREEN); |
putterthapanun | 0:2690fb24ec7e | 15 | BSP_LCD_SetTextColor(LCD_COLOR_BLACK); |
putterthapanun | 0:2690fb24ec7e | 16 | BSP_LCD_DisplayStringAt(0, LINE(5), (uint8_t *)"DISCOVERY STM32F413ZH", CENTER_MODE); |
putterthapanun | 0:2690fb24ec7e | 17 | |
putterthapanun | 0:2690fb24ec7e | 18 | while(1) { |
putterthapanun | 0:2690fb24ec7e | 19 | } |
putterthapanun | 0:2690fb24ec7e | 20 | } |