nico@215: nico@215:
nico@215:#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "data.h"
#include "canfestival.h"
#include "timers_driver.h"
#include "can_driver.h"
nico@215: Include dependency graph for unix.c:
nico@215: 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@215:( | nico@215:funcname | nico@215:nico@215: | ) | nico@215:(* funcname##_driver) | nico@215:
nico@215: nico@215:
nico@215: Definition at line 27 of file unix.c. nico@215:
nico@215: Referenced by canClose(), canOpen(), canReceiveLoop(), and canSend(). nico@215:
#define DLSYM | nico@215:( | nico@215:name | nico@215:nico@215: | ) | nico@215:nico@215: |
nico@215: Value:
*(void **) (&name##_driver) = dlsym(handle, #name"_driver");\ nico@215: if ((error = dlerror()) != NULL) {\ nico@215: fprintf (stderr, "%s\n", error);\ etisserant@240: UnLoadCanDriver(handle);\ nico@215: return NULL;\ nico@215: } nico@215:
nico@215: Definition at line 30 of file unix.c. nico@215:
nico@215: Referenced by LoadCanDriver(). nico@215:
#define FCT_PTR_INIT =NULL | nico@215:
#define MAX_NB_CAN_PORTS 16 | nico@215:
nico@215:
int canClose | nico@215:( | nico@215:CO_Data * | nico@215:d | nico@215:) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 178 of file unix.c. nico@215:
nico@215: Referenced by canClose(), LoadCanDriver(), and main(). nico@215:
etisserant@240: etisserant@240:
CAN_PORT canOpen | nico@215:( | nico@215:s_BOARD * | nico@215:board, | nico@215:|
nico@215: | nico@215: | CO_Data * | nico@215:d | nico@215: |
nico@215: | ) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 145 of file unix.c. nico@215:
nico@215: Referenced by canOpen(), LoadCanDriver(), and main(). nico@215:
void canReceiveLoop | nico@215:( | etisserant@240:CAN_PORT | nico@215:port | nico@215:) | nico@215:nico@215: |
nico@215: nico@215:
nico@215: Definition at line 132 of file unix.c. nico@215:
nico@215: References canDispatch(), canReceive(), DLL_CALL, EnterMutex(), and LeaveMutex(). nico@215:
nico@215: Referenced by canOpen(). nico@215:
etisserant@240: Here is the call graph for this function:
etisserant@240: etisserant@240:
LIB_HANDLE LoadCanDriver | nico@215:( | nico@215:char * | nico@215:driver_name | nico@215:) | nico@215:nico@215: |
UNS8 UnLoadCanDriver | nico@215:( | etisserant@240:LIB_HANDLE | nico@215:handle | nico@215:) | nico@215:nico@215: |
nico@215:
etisserant@240: