vytah okomentovany

Fork of f by Radovan Zubaľ

Files at this revision

API Documentation at this revision

Comitter:
radovan
Date:
Sat Dec 23 19:15:49 2017 +0000
Parent:
0:7a5957039c5f
Commit message:
posledny-okomentovany

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
main.h Show annotated file Show diff for this revision Revisions of this file
diff -r 7a5957039c5f -r d7c31658c3dd main.cpp
--- a/main.cpp	Sat Dec 23 14:20:57 2017 +0000
+++ b/main.cpp	Sat Dec 23 19:15:49 2017 +0000
@@ -1,5 +1,6 @@
 #include "mbed.h"
 #include "MMA8451Q.h"
+//#include "main.h"
 
 #if   defined (TARGET_KL25Z) || defined (TARGET_KL46Z)
 PinName const SDA = PTE25;
@@ -15,7 +16,7 @@
 #endif
 
 #define MMA8451_I2C_ADDRESS (0x1d<<1)
-///////////////////////////////////////
+
 #define ELEVATOR_BUTTONf_FAMILY 0xc0
 #define DIODEf_FAMILY           0x10
 #define LIMIT_SWITCH_FAMILY     0xe0
@@ -102,8 +103,7 @@
         kb=(kb+1)%200;
     }
 }
-/**
-*void prerusenieACC()
+/** void prerusenieACC()
 *funkcia volana pri vzniknuti prerusenia od accelerometra
 *posle simulatoru spravu pre zastavenie vytahu
 */
@@ -123,8 +123,7 @@
 
     }
 }
-/**
-*void main()
+/** void main()
 *nastavuje akcelerometer pre vytvaranie prerusenia pre freefall
 *spracovava v nekonecnej slucke spravy z kruhoveho buffera
 *v pravidelnych intervaloch resetuje watchdog
diff -r 7a5957039c5f -r d7c31658c3dd main.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.h	Sat Dec 23 19:15:49 2017 +0000
@@ -0,0 +1,34 @@
+
+
+/**
+*class main
+*trieda main koli dokumentacii
+*/
+class main {
+
+    public:
+/**
+*funkcia volana pri vzniknuti prerusenia pre citanie od serioveho portu
+*do kruhoveho buffera "bufpole" nacita 1 znak.
+*/
+void citaj();
+/**
+*funkcia pre poslanie spravy caka 200 milisekund na potvrdcujucu odpoved od simulatoru
+*inak opakuje poslanie spravy 
+*@param <pokial> pocet znakov na odoslanie
+*/
+void posli(int pokial);
+/**
+*funkcia volana pre poslanie spravy na resetovanie watchdogu
+*/
+void watchdogReset();
+/**
+*funkcia volana pri vzniknuti freefall prerusenia od akcelerometra
+*/
+void prerusenieACC();
+/**
+*hlavna funkcia programu pokial bola prijata cela sprava tak podla nej posiela spravy simulatoru
+*pre jeho riadenie
+*/
+int main();
+};
\ No newline at end of file