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.
Fork of mbed_L3_Timer by
Revision 1:a02777ef7e5c, committed 2014-12-06
- Comitter:
- moritzmahler
- Date:
- Sat Dec 06 14:46:14 2014 +0000
- Parent:
- 0:8a1dbfbe5c66
- Commit message:
- some major problems . Don't know why.;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Dec 06 13:53:32 2014 +0000
+++ b/main.cpp Sat Dec 06 14:46:14 2014 +0000
@@ -44,14 +44,14 @@
int8 count=0;
-volatile byte bStandby;
+volatile char bStandby = 0;
Ticker stSysTick;
-void vTimer(void)
-{
- bStandby=1;
-}
+void vTimer( void ){
+abLed[1] = 1;
+bStandby = 1;
+}
/* Funktion "Taste 1 gedrückt" */
@@ -112,7 +112,12 @@
void vTaste2( void )
{
-
+ if(count==nTastLongLi) {
+ abLed[0]=!abLed[0];
+ count=0;
+ } else {
+ count++;
+ }
}
@@ -135,31 +140,27 @@
/* Hauptprogramm */
int main()
{
- stSysTick.attach_us(&vTimer,20000);
+ stSysTick.attach(&vTimer, 0.02);
+ bStandby=0;
vDispReset();
-
+
while(1) {
+
// wait until bStandby !=0
-
-
-
- if(count==nTastLongLi) {
- abLed[0]=!abLed[0];
- count=0;
- } else {
- count++;
+ while(bStandby == 0){
+ abLed[0] = 1;
}
-
- while(bStandby == 0);
bStandby = 0;
-
- vTaste1();
- vTaste2();
+ abLed[2] = 1;
+ // vTaste1();
+ // vTaste2();
i--;
if(i == 0) {
i = 5;
- vLcdOut();
+
+ // vLcdOut();
+
}
}
}
