-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcanopenlib_linux_hw.h
45 lines (31 loc) · 1.33 KB
/
canopenlib_linux_hw.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "CANopenLibDefines.h"
#include <pthread.h>
#include "libpcan.h"
typedef HANDLE canPortHandle;
//
// CAN informaiton flags.
//
#define CAN_MSG_RTR 0x0001 // Message is a remote request
#define CAN_MSG_EXT 0x0002 // Message has a standard ID
extern "C"
{
void canSinglePortReset(int port);
canOpenStatus canPortLibraryInit(void);
canOpenStatus canPortOpenByName( int port, const char *devName);
canOpenStatus canPortOpen( int port );
canOpenStatus canPortClose( int port );
canOpenStatus canPortBitrateSet( int port, int bitrate );
canOpenStatus canPortEcho( int port, bool enabled );
canOpenStatus canPortGoBusOn(int port);
canOpenStatus canPortGoBusOff(int port);
canOpenStatus canPortWrite(int port,
long id,
void *msg,
unsigned int dlc,
unsigned int flags);
canOpenStatus canPortRead(int port,
long *id,
void *msg,
unsigned int *dlc,
unsigned int *flags);
}