/home/epimerde/documents/tc11/CanFestival-3/drivers/unix/unix.c File Reference

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "data.h"
#include "canfestival.h"
#include "timers_driver.h"
#include "can_driver.h"

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 Documentation

#define DLL_CALL ( funcname   )     (* funcname##_driver)

Definition at line 27 of file unix.c.

#define DLSYM ( name   ) 

Value:

*(void **) (&name##_driver) = dlsym(handle, #name"_driver");\
        if ((error = dlerror()) != NULL)  {\
                fprintf (stderr, "%s\n", error);\
                UnLoadCanDriver(handle);\
                return NULL;\
        }

Definition at line 30 of file unix.c.

#define FCT_PTR_INIT   =NULL

Definition at line 28 of file unix.c.

#define MAX_NB_CAN_PORTS   16

Definition at line 49 of file unix.c.


Function Documentation

int canClose ( CO_Data d  ) 

Definition at line 178 of file unix.c.

CAN_PORT canOpen ( s_BOARD board,
CO_Data d 
)

Definition at line 145 of file unix.c.

void canReceiveLoop ( CAN_PORT  port  ) 

Definition at line 132 of file unix.c.

References canDispatch(), canReceive(), DLL_CALL, EnterMutex(), and LeaveMutex().

UNS8 canSend ( CAN_PORT  port,
Message m 
)

Definition at line 120 of file unix.c.

LIB_HANDLE LoadCanDriver ( char *  driver_name  ) 

Definition at line 84 of file unix.c.

UNS8 UnLoadCanDriver ( LIB_HANDLE  handle  ) 

Definition at line 71 of file unix.c.


Variable Documentation

CANPort canports[MAX_NB_CAN_PORTS] = {{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,}}

Definition at line 66 of file unix.c.


Generated on Mon Jun 4 16:29:07 2007 for CanFestival by  doxygen 1.5.1