takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 #include "ssd1331.h"
00004 
00005 Thread thread;
00006 
00007 void print_char(char c = '*')
00008 {
00009     printf("%c", c);
00010     fflush(stdout);
00011 }
00012 
00013 void print_thread()
00014 {
00015     while (true) {
00016         wait(1);
00017         print_char();
00018     }
00019 }
00020 
00021 ssd1331 oled(D11,D12,D13,D10,D9,D8);
00022 
00023 int main()
00024 {
00025     printf("\n\n*** RTOS basic example ***\n");
00026     thread.start(print_thread);
00027 
00028 
00029     oled.Initssd1331();
00030     oled.ClearScreen();
00031     oled.DrawRectangleFill(4,4,91,59,RGB565_GREEN,RGB565_YELLOW);
00032     oled.PutString(10,10,"hello",RGB565_BLUE,0);
00033 
00034     
00035  
00036     while (true) {
00037     }
00038 }