Creating a project for TT_Mxx

Committer:
ThunderSoft
Date:
Fri Apr 26 09:44:03 2019 +0000
Revision:
1:c55bc0872920
Parent:
0:a0f5041497e4
"update the mbed-os code to support TT_M4G9"

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ThunderSoft 0:a0f5041497e4 1 #include "mbed.h"
ThunderSoft 0:a0f5041497e4 2 #include "DoorStatus.h"
ThunderSoft 0:a0f5041497e4 3
ThunderSoft 0:a0f5041497e4 4
ThunderSoft 0:a0f5041497e4 5 #if __TT_M3HQ__
ThunderSoft 0:a0f5041497e4 6 #define DISPLAY_TMPM_STRING "Welcome to Thundersoft TT_M3HQ"
ThunderSoft 0:a0f5041497e4 7 #endif
ThunderSoft 0:a0f5041497e4 8
ThunderSoft 0:a0f5041497e4 9
ThunderSoft 0:a0f5041497e4 10 #if __TT_M4G9__
ThunderSoft 0:a0f5041497e4 11 #define DISPLAY_TMPM_STRING "Welcome to Thundersoft TT_M4G9"
ThunderSoft 0:a0f5041497e4 12 #endif
ThunderSoft 0:a0f5041497e4 13
ThunderSoft 0:a0f5041497e4 14
ThunderSoft 0:a0f5041497e4 15 DigitalOut testLed(LED1);
ThunderSoft 0:a0f5041497e4 16
ThunderSoft 0:a0f5041497e4 17 static void doorStatusFunc()
ThunderSoft 0:a0f5041497e4 18 {
ThunderSoft 0:a0f5041497e4 19 testLed = 1;
ThunderSoft 0:a0f5041497e4 20 wait_ms(5000);
ThunderSoft 0:a0f5041497e4 21 testLed = 0;
ThunderSoft 0:a0f5041497e4 22 }
ThunderSoft 0:a0f5041497e4 23
ThunderSoft 0:a0f5041497e4 24 int main()
ThunderSoft 0:a0f5041497e4 25 {
ThunderSoft 0:a0f5041497e4 26 printf("%s\r\n",DISPLAY_TMPM_STRING);
ThunderSoft 0:a0f5041497e4 27 DoorStatus door;
ThunderSoft 0:a0f5041497e4 28 door.handleCallback(&doorStatusFunc);
ThunderSoft 0:a0f5041497e4 29 while(1)
ThunderSoft 0:a0f5041497e4 30 {
ThunderSoft 0:a0f5041497e4 31
ThunderSoft 0:a0f5041497e4 32 }
ThunderSoft 0:a0f5041497e4 33 }