summaryrefslogtreecommitdiff
path: root/Modelica-Arduino-MDD_Arduino_Revised/Resources/src/wakeup.c
diff options
context:
space:
mode:
authorSiddharth112352019-09-03 18:09:16 +0530
committerSiddharth112352019-09-03 18:09:16 +0530
commitb4b6aa36e3486a3544acc52419149b5671f841e9 (patch)
tree66c1783158f23e6d21c77324156fc57e18d4ac67 /Modelica-Arduino-MDD_Arduino_Revised/Resources/src/wakeup.c
parentf5266f634f4fb4fd39933a83551a01cf446256b8 (diff)
downloadOpenModelica_HIL-b4b6aa36e3486a3544acc52419149b5671f841e9.tar.gz
OpenModelica_HIL-b4b6aa36e3486a3544acc52419149b5671f841e9.tar.bz2
OpenModelica_HIL-b4b6aa36e3486a3544acc52419149b5671f841e9.zip
Pushing entire Modelica HIL Tasks repoHEADmaster
Diffstat (limited to 'Modelica-Arduino-MDD_Arduino_Revised/Resources/src/wakeup.c')
-rwxr-xr-xModelica-Arduino-MDD_Arduino_Revised/Resources/src/wakeup.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modelica-Arduino-MDD_Arduino_Revised/Resources/src/wakeup.c b/Modelica-Arduino-MDD_Arduino_Revised/Resources/src/wakeup.c
new file mode 100755
index 0000000..43ceb48
--- /dev/null
+++ b/Modelica-Arduino-MDD_Arduino_Revised/Resources/src/wakeup.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include "../Include/serial.h"
+
+
+
+void wakeup()
+{
+ /* Set signal to this function. */
+ signal(SIGALRM, wakeup);
+ /* Set alarm clock for 5 seconds. */
+ alarm(2);
+}
+