summaryrefslogtreecommitdiff
path: root/Source/modelPlugFirmata.h
blob: d4249f91f0e838d772d5bc68aa3ede67e4524712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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