nico@207: nico@207:
nico@207:#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "data.h"
#include "canfestival.h"
#include "timers_driver.h"
#include "can_driver.h"
nico@207: Go to the source code of this file.
Data Structures | |
struct | CANPort |
Defines | |
#define | DLL_CALL(funcname) (* funcname##_driver) |
#define | FCT_PTR_INIT =NULL |
#define | DLSYM(name) |
#define | MAX_NB_CAN_PORTS 16 |
Functions | |
UNS8 | UnLoadCanDriver (LIB_HANDLE handle) |
LIB_HANDLE | LoadCanDriver (char *driver_name) |
UNS8 | canSend (CAN_PORT port, Message *m) |
void | canReceiveLoop (CAN_PORT port) |
CAN_PORT | canOpen (s_BOARD *board, CO_Data *d) |
int | canClose (CO_Data *d) |
Variables | |
CANPort | canports [MAX_NB_CAN_PORTS] = {{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,}} |
#define DLL_CALL | nico@207:( | nico@207:funcname | nico@207:nico@207: | ) | nico@207:(* funcname##_driver) | nico@207:
#define DLSYM | nico@207:( | nico@207:name | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: Value:
*(void **) (&name##_driver) = dlsym(handle, #name"_driver");\ nico@207: if ((error = dlerror()) != NULL) {\ nico@207: fprintf (stderr, "%s\n", error);\ nico@207: UnLoadCanDriver(handle);\ nico@207: return NULL;\ nico@207: } nico@207:
#define FCT_PTR_INIT =NULL | nico@207:
#define MAX_NB_CAN_PORTS 16 | nico@207:
nico@207:
int canClose | nico@207:( | nico@207:CO_Data * | nico@207:d | nico@207:) | nico@207:nico@207: |
void canReceiveLoop | nico@207:( | nico@207:CAN_PORT | nico@207:port | nico@207:) | nico@207:nico@207: |
nico@207: nico@207:
nico@207: Definition at line 132 of file unix.c. nico@207:
nico@207: References canDispatch(), canReceive(), DLL_CALL, EnterMutex(), and LeaveMutex(). nico@207:
LIB_HANDLE LoadCanDriver | nico@207:( | nico@207:char * | nico@207:driver_name | nico@207:) | nico@207:nico@207: |
UNS8 UnLoadCanDriver | nico@207:( | nico@207:LIB_HANDLE | nico@207:handle | nico@207:) | nico@207:nico@207: |
nico@207:
nico@207: