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.
Diff: main.cpp
- Revision:
- 3:4bbef030b4b4
- Parent:
- 2:73177929c8b4
- Child:
- 4:d3a068487721
--- a/main.cpp Thu Nov 29 17:29:13 2018 +0000
+++ b/main.cpp Thu Nov 29 17:33:20 2018 +0000
@@ -10,7 +10,7 @@
DigitalIn btn(P14);
enum Status {ST_LEDOFF=0, ST_LEDEIN=1,ST_Error};
-Status volatile status;
+Stm volatile stm;
class IsA : BusOut{
@@ -41,10 +41,15 @@
}
void IsAnEvent::_RisingISR() {
- wait_ms(50);
+ wait_ms(100);
if( read() )
_pressed = true;
+
}
+
+
+IsAnEvent sw1(p14); // Joy Stick Center
+
int IsAnEvent::CheckFlag() {
if( _pressed ) {
_pressed = false;
@@ -53,9 +58,6 @@
return 0;
}
-
-
-Stm stm;
void stateMachine()
{
@@ -70,6 +72,8 @@
break;
}
}
+IsAnEvent sw1(p14); // Joy Stick Center
+
int main()
{