include/unix/canfestival.h
author lbessard
Fri, 16 Nov 2007 17:41:59 +0100
changeset 316 75691a663ec1
parent 251 cab66ef3e68e
child 329 7717252e3ed9
permissions -rw-r--r--
Bugs that prevents to compile with wx2.8 fixed
145
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
     1
#ifndef UNIX_H_
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
     2
#define UNIX_H_
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
     3
251
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
     4
#ifdef __cplusplus
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
     5
extern "C" {
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
     6
#endif
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
     7
145
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
     8
#include "timerscfg.h"
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
     9
#include "can_driver.h"
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    10
#include "data.h"
167
b2f8b91d89b5 Removed compilation warnings with some GCC.
etisserant
parents: 149
diff changeset
    11
#include "timers_driver.h"
145
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    12
#ifdef WIN32
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    13
#include <windows.h>
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    14
typedef HINSTANCE LIB_HANDLE;
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    15
#else
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    16
#include <dlfcn.h>
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    17
typedef void* LIB_HANDLE;
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    18
#endif
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    19
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    20
UNS8 UnLoadCanDriver(LIB_HANDLE handle);
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    21
LIB_HANDLE LoadCanDriver(char* driver_name);
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    22
UNS8 canSend(CAN_PORT port, Message *m);
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    23
CAN_PORT canOpen(s_BOARD *board, CO_Data * d);
149
fe50ada8020b Changes in the API:
etisserant
parents: 145
diff changeset
    24
int canClose(CO_Data * d);
145
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    25
251
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
    26
#ifdef __cplusplus
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
    27
};
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
    28
#endif
cab66ef3e68e Some fixes for C++
etisserant
parents: 167
diff changeset
    29
145
e747d2e26af0 Win32 Native support and dynamicaly loaded CAN drivers for Linux, Cygwin and Win32.
etisserant
parents:
diff changeset
    30
#endif /*UNIX_H_*/