summaryrefslogtreecommitdiff
path: root/OpenModelicaArduino/Resources
diff options
context:
space:
mode:
authorSumeet Koli2018-06-16 16:02:59 +0530
committerSumeet Koli2018-06-16 16:02:59 +0530
commit4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc (patch)
treed23ae1bb30f923aea810f46d2b150bdab9af5215 /OpenModelicaArduino/Resources
parent92e638d20d2af678e618d03a2a9db344412765fa (diff)
downloadOpenModelicaEmbedded-4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc.tar.gz
OpenModelicaEmbedded-4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc.tar.bz2
OpenModelicaEmbedded-4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc.zip
Support for Tiva C board, Changes in library file and 'Analog Input' pin to work with ADC of varied resolutions
Diffstat (limited to 'OpenModelicaArduino/Resources')
-rwxr-xr-x[-rw-r--r--]OpenModelicaArduino/Resources/Include/modelPlugFirmata.h3
-rwxr-xr-xOpenModelicaArduino/Resources/Include/modelPlugFirmata.h~33
-rwxr-xr-xOpenModelicaArduino/Resources/Library/linux64/libmodelPlugFirmata.sobin56284 -> 56334 bytes
3 files changed, 35 insertions, 1 deletions
diff --git a/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h b/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h
index e5007db..8fd513b 100644..100755
--- a/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h
+++ b/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h
@@ -10,6 +10,7 @@ typedef unsigned char bool;
// GCC
#define EXPORT __attribute__((visibility("default")))
#endif
+
#ifdef _cplusplus
extern "C" {
#endif
@@ -21,7 +22,7 @@ EXPORT void updateBoard(int id);
EXPORT int getBoardId(void* object);
-EXPORT double readAnalogPin (int pin, double min, double max, double init, int id);
+EXPORT double readAnalogPin (int pin, double min, double max, double init, int id, int adcResolution);
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);
diff --git a/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h~ b/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h~
new file mode 100755
index 0000000..8fd513b
--- /dev/null
+++ b/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h~
@@ -0,0 +1,33 @@
+#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, int adcResolution);
+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
diff --git a/OpenModelicaArduino/Resources/Library/linux64/libmodelPlugFirmata.so b/OpenModelicaArduino/Resources/Library/linux64/libmodelPlugFirmata.so
index 241635b..22d3c01 100755
--- a/OpenModelicaArduino/Resources/Library/linux64/libmodelPlugFirmata.so
+++ b/OpenModelicaArduino/Resources/Library/linux64/libmodelPlugFirmata.so
Binary files differ