From 4ad6246e6567e912ab2ef37bb64d78cdf33f8cbc Mon Sep 17 00:00:00 2001 From: Sumeet Koli Date: Sat, 16 Jun 2018 16:02:59 +0530 Subject: Support for Tiva C board, Changes in library file and 'Analog Input' pin to work with ADC of varied resolutions --- .../Resources/Include/modelPlugFirmata.h | 3 +- .../Resources/Include/modelPlugFirmata.h~ | 33 +++++++++++++++++++++ .../Library/linux64/libmodelPlugFirmata.so | Bin 56284 -> 56334 bytes 3 files changed, 35 insertions(+), 1 deletion(-) mode change 100644 => 100755 OpenModelicaArduino/Resources/Include/modelPlugFirmata.h create mode 100755 OpenModelicaArduino/Resources/Include/modelPlugFirmata.h~ (limited to 'OpenModelicaArduino/Resources') diff --git a/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h b/OpenModelicaArduino/Resources/Include/modelPlugFirmata.h old mode 100644 new mode 100755 index e5007db..8fd513b --- 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 Binary files a/OpenModelicaArduino/Resources/Library/linux64/libmodelPlugFirmata.so and b/OpenModelicaArduino/Resources/Library/linux64/libmodelPlugFirmata.so differ -- cgit