Dependencies: mbed mbed-rtos C12832_lcd
main.cpp@0:4336dcc9d005, 2021-06-27 (annotated)
- Committer:
- nukkrith
- Date:
- Sun Jun 27 06:28:07 2021 +0000
- Revision:
- 0:4336dcc9d005
This program uses mbed version 2015
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nukkrith | 0:4336dcc9d005 | 1 | #include "mbed.h" |
nukkrith | 0:4336dcc9d005 | 2 | #include "rtos.h" |
nukkrith | 0:4336dcc9d005 | 3 | #include "C12832_lcd.h" |
nukkrith | 0:4336dcc9d005 | 4 | |
nukkrith | 0:4336dcc9d005 | 5 | C12832_LCD lcd; |
nukkrith | 0:4336dcc9d005 | 6 | int Number = 0; |
nukkrith | 0:4336dcc9d005 | 7 | |
nukkrith | 0:4336dcc9d005 | 8 | void lcd_thread(void const *args){ |
nukkrith | 0:4336dcc9d005 | 9 | while(1){ |
nukkrith | 0:4336dcc9d005 | 10 | lcd.cls(); |
nukkrith | 0:4336dcc9d005 | 11 | lcd.locate(0,0); |
nukkrith | 0:4336dcc9d005 | 12 | lcd.printf("LCD Display test\n"); |
nukkrith | 0:4336dcc9d005 | 13 | lcd.printf("Running number is: %d \n",Number++); |
nukkrith | 0:4336dcc9d005 | 14 | Thread::wait(1000); |
nukkrith | 0:4336dcc9d005 | 15 | } |
nukkrith | 0:4336dcc9d005 | 16 | } |
nukkrith | 0:4336dcc9d005 | 17 | |
nukkrith | 0:4336dcc9d005 | 18 | int main() { |
nukkrith | 0:4336dcc9d005 | 19 | Thread LCD_ID(lcd_thread); |
nukkrith | 0:4336dcc9d005 | 20 | while(1){;} |
nukkrith | 0:4336dcc9d005 | 21 | } |