diff options
author | Sumeet Koli | 2018-06-18 14:46:14 +0530 |
---|---|---|
committer | Sumeet Koli | 2018-06-18 14:46:14 +0530 |
commit | 44ad9efa7e729739cde3103d8fc1e475efa2a923 (patch) | |
tree | f87994e13c9b4d0082f7a743f29e1eafc9690fa9 /Resources/Include/modelPlugFirmata.h | |
parent | 931fdbe021ec59e211ac13b807c18a9b2ca9a76c (diff) | |
download | OpenModelicaEmbedded-44ad9efa7e729739cde3103d8fc1e475efa2a923.tar.gz OpenModelicaEmbedded-44ad9efa7e729739cde3103d8fc1e475efa2a923.tar.bz2 OpenModelicaEmbedded-44ad9efa7e729739cde3103d8fc1e475efa2a923.zip |
Change in directory structure
Diffstat (limited to 'Resources/Include/modelPlugFirmata.h')
-rwxr-xr-x | Resources/Include/modelPlugFirmata.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Resources/Include/modelPlugFirmata.h b/Resources/Include/modelPlugFirmata.h new file mode 100755 index 0000000..8fd513b --- /dev/null +++ b/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 |