Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 3:2ffb7f153526
- Parent:
- 2:e9a626e1b717
- Child:
- 4:21ddb5cfccdf
diff -r e9a626e1b717 -r 2ffb7f153526 main.cpp
--- a/main.cpp Tue Oct 20 07:34:17 2015 +0000
+++ b/main.cpp Tue Oct 20 07:46:05 2015 +0000
@@ -16,7 +16,9 @@
int main()
{
uint8_t menu_0=0;
- uint8_t select_0=0;
+ uint8_t menu_1=0;
+ uint8_t select_0=0;
+ uint8_t select_1=0;
pc.printf("Hello Sir !!\n");
while(1)
@@ -36,8 +38,30 @@
switch(select_0)
{
case('1'):
- pc.printf("Pattern\n;");
- break;
+ while(1)
+ {
+ if(menu_1==0)
+ {
+ pc.printf("Input 1 for Pattern1\n");
+ pc.printf("Input 2 for Pattern2\n");
+ pc.printf("Input 3 for Exit");
+ menu_1 = 1;
+ }
+ if(pc.readable())
+ {
+ select_1 = pc.getc();
+ pc.printf("\n");
+ menu_1 = 0;
+ switch(select_1)
+ {
+ case('1'): pc.printf("Pattern1\n"); break;
+
+ case('2'): pc.printf("Pattern2\n");break;
+
+ case('3'): break;
+ }
+ }
+ }
case('2'):
pc.printf("Read Status\n");
break;