summaryrefslogtreecommitdiff
path: root/OpenModelicaArduino/Resources/Include
diff options
context:
space:
mode:
authormanasdas172018-06-02 10:59:17 +0530
committermanasdas172018-06-02 10:59:17 +0530
commitee305e1716587a04a14b5d0369426abf7faea118 (patch)
tree06c2437ac7d48daa043b710cb24e733de10dcc27 /OpenModelicaArduino/Resources/Include
downloadOpenModelicaEmbedded-1-ee305e1716587a04a14b5d0369426abf7faea118.tar.gz
OpenModelicaEmbedded-1-ee305e1716587a04a14b5d0369426abf7faea118.tar.bz2
OpenModelicaEmbedded-1-ee305e1716587a04a14b5d0369426abf7faea118.zip
Add initial working verison of OpenModelicaArduino
Diffstat (limited to 'OpenModelicaArduino/Resources/Include')
-rwxr-xr-xOpenModelicaArduino/Resources/Include/modelPlugFirmata.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h b/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h
new file mode 100755
index 0000000..e5007db
--- /dev/null
+++ b/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h
@@ -0,0 +1,32 @@
+#ifndef MODELPLUG_H
+#define MODELPLUG_H
+
+typedef unsigned char bool;
+
+#if defined(_MSC_VER)
+ // Microsoft VC++
+ #define EXPORT __declspec(dllexport)
+#else
+ // GCC
+ #define EXPORT __attribute__((visibility("default")))
+#endif
+#ifdef _cplusplus
+extern "C" {
+#endif
+
+EXPORT void* boardConstructor(char* port,bool showCapabilitites,int samplingMs,int baudRate,bool dtr);
+EXPORT void boardDestructor(void* object);
+
+EXPORT void updateBoard(int id);
+EXPORT int getBoardId(void* object);
+
+
+EXPORT double readAnalogPin (int pin, double min, double max, double init, int id);
+EXPORT int readDigitalPin (int pin, int init, int id);
+EXPORT void writeAnalogPin (int pin, int id,double value);
+EXPORT void writeDigitalPin(int pin, int id,int value);
+EXPORT void writeServoPin (int pin, int id,double value, int min, int max);
+#ifdef _cplusplus
+}
+#endif
+#endif