EMS/drv/drv_can.h

25 lines
555 B
C

#ifndef __DEV_CAN_H_
#define __DEV_CAN_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <linux/can.h>
#include <linux/can/raw.h>
#include <arpa/inet.h>
#include <net/if.h>
#define CANNUM_RECV "can0"
#define CANNUM_SEND "can1"
#define CANIDNUM 3
#define CANDLC_RECV 8
#define CANDLC_SEND 8
void can_recv(char cannum[], unsigned int canID[], int canIDnum, int dataLength);
void can_send(char cannum[], unsigned int canID, char* dataToSend, int dataLength);
#endif