summaryrefslogtreecommitdiff
path: root/OpenModelicaArduino/Source/modelPlugFirmata.h
diff options
context:
space:
mode:
authorritu2018-06-02 21:14:06 +0530
committerritu2018-06-02 21:14:06 +0530
commitc4223ee955f9af546b9ece9a0ef8d77f9c8b03d8 (patch)
treeb0f3d925575885125999ce54d497aa969e7467c2 /OpenModelicaArduino/Source/modelPlugFirmata.h
downloadOpenModelicaEmbedded-1-c4223ee955f9af546b9ece9a0ef8d77f9c8b03d8.tar.gz
OpenModelicaEmbedded-1-c4223ee955f9af546b9ece9a0ef8d77f9c8b03d8.tar.bz2
OpenModelicaEmbedded-1-c4223ee955f9af546b9ece9a0ef8d77f9c8b03d8.zip
simplified Pins and boards,double click issue, SynchronizeREalTime added
Diffstat (limited to 'OpenModelicaArduino/Source/modelPlugFirmata.h')
-rwxr-xr-xOpenModelicaArduino/Source/modelPlugFirmata.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenModelicaArduino/Source/modelPlugFirmata.h b/OpenModelicaArduino/Source/modelPlugFirmata.h
new file mode 100755
index 0000000..d4249f9
--- /dev/null
+++ b/OpenModelicaArduino/Source/modelPlugFirmata.h
@@ -0,0 +1,30 @@
+#ifndef MODELPLUG_H
+#define MODELPLUG_H
+
+
+#if defined(_MSC_VER)
+ // Microsoft VC++
+ #define EXPORT __declspec(dllexport)
+#else
+ // GCC
+ #define EXPORT __attribute__((visibility("default")))
+#endif
+
+extern "C" {
+
+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);
+
+}
+
+#endif \ No newline at end of file