RTEMS 6.3
Loading...
Searching...
No Matches
occan.h File Reference

Driver API for GRLIB wrapper to OpenCores CAN. More...

Go to the source code of this file.

Data Structures

struct  CANMsg
struct  occan_stats
struct  occan_afilter

Macros

#define OCCAN_SEG_ID28   0x02
#define OCCAN_SEG_ID20   0x06
#define OCCAN_SEG_ID17   0x07
#define OCCAN_SEG_ID12   0x0f
#define OCCAN_SEG_ID4   0x0e
#define OCCAN_SEG_START   0x03
#define OCCAN_SEG_SRTR   0x04
#define OCCAN_SEG_IDE   0x05
#define OCCAN_SEG_RTR   0x0c
#define OCCAN_SEG_RSV0   0x09
#define OCCAN_SEG_RSV1   0x0d
#define OCCAN_SEG_DLEN   0x0b
#define OCCAN_SEG_DFIELD   0x0a
#define OCCAN_SEG_CRC_SEQ   0x08
#define OCCAN_SEG_CRC_DELIM   0x18
#define OCCAN_SEG_ACK_SLOT   0x19
#define OCCAN_SEG_ACK_DELIM   0x1b
#define OCCAN_SEG_EOF   0x1a
#define OCCAN_SEG_INTERMISSION   0x12
#define OCCAN_SEG_ACT_ERR   0x11
#define OCCAN_SEG_PASS_ERR   0x16
#define OCCAN_SEG_DOMINANT   0x13
#define OCCAN_SEG_EDELIM   0x17
#define OCCAN_SEG_OVERLOAD   0x1c
#define CANMSG_OPT_RTR   0x40
#define CANMSG_OPT_EXTENDED   0x80
#define CANMSG_OPT_SSHOT   0x01
#define OCCAN_IOC_START   1
#define OCCAN_IOC_STOP   2
#define OCCAN_IOC_GET_CONF   3
#define OCCAN_IOC_GET_STATS   4
#define OCCAN_IOC_GET_STATUS   5
#define OCCAN_IOC_SET_SPEED   6
#define OCCAN_IOC_SPEED_AUTO   7
#define OCCAN_IOC_SET_LINK   8
#define OCCAN_IOC_SET_FILTER   9
#define OCCAN_IOC_SET_BLK_MODE   10
#define OCCAN_IOC_SET_BUFLEN   11
#define OCCAN_IOC_SET_BTRS   12
#define OCCAN_STATUS_RESET   0x01
#define OCCAN_STATUS_OVERRUN   0x02
#define OCCAN_STATUS_WARN   0x04
#define OCCAN_STATUS_ERR_PASSIVE   0x08
#define OCCAN_STATUS_ERR_BUSOFF   0x10
#define OCCAN_STATUS_QUEUE_ERROR   0x80
#define OCCAN_BLK_MODE_RX   0x1
#define OCCAN_BLK_MODE_TX   0x2
#define OCCAN_SPEED_500K   500000
#define OCCAN_SPEED_250K   250000
#define OCCAN_SPEED_125K   125000
#define OCCAN_SPEED_75K   75000
#define OCCAN_SPEED_50K   50000
#define OCCAN_SPEED_25K   25000
#define OCCAN_SPEED_10K   10000

Functions

void occan_register_drv (void)

Detailed Description

Driver API for GRLIB wrapper to OpenCores CAN.