25 lines
588 B
C
25 lines
588 B
C
#ifndef _HEXAGRAM_CAN_H
|
|
#define _HEXAGRAM_CAN_H
|
|
|
|
#include <net/if.h>
|
|
|
|
#include <linux/can.h>
|
|
#include <linux/can/raw.h>
|
|
|
|
typedef struct _hexagram_can_if {
|
|
struct sockaddr_can addr;
|
|
struct ifreq ifr;
|
|
int sock;
|
|
} hexagram_can_if;
|
|
|
|
hexagram_can_if *hexagram_can_if_open(const char *name);
|
|
|
|
void hexagram_can_if_close(hexagram_can_if *can_if);
|
|
|
|
int hexagram_can_if_read(hexagram_can_if *can_if,
|
|
struct can_frame *frame);
|
|
|
|
int hexagram_can_if_write(hexagram_can_if *can_if,
|
|
struct can_frame *frame);
|
|
|
|
#endif /* _HEXAGRAM_CAN_H */
|