Headers for canbus interface. More...
Go to the source code of this file.
Data Structures | |
struct | _CANFRAME |
CAN frame structure. More... | |
struct | _CANFILTER |
CAN message filter structure. More... | |
Defines | |
#define | CAN_SPEED_10K 0 |
CAN Baud rate constants. | |
#define | CAN_SPEED_20K 1 |
20 kbit/s, max. cable length 2500 m | |
#define | CAN_SPEED_50K 2 |
50 kbit/s, max. cable length 1000 m | |
#define | CAN_SPEED_100K 3 |
100 kbit/s, max. cable length 600 m | |
#define | CAN_SPEED_125K 4 |
125 kbit/s, max. cable length 500 m | |
#define | CAN_SPEED_250K 5 |
250 kbit/s, max. cable length 250 m | |
#define | CAN_SPEED_500K 6 |
500 kbit/s, max. cable length 100 m | |
#define | CAN_SPEED_800K 7 |
800 kbit/s, max. cable length 50 m | |
#define | CAN_SPEED_1M 8 |
1 Mbit/s, max. cable length 25 m | |
#define | CAN_SPEED_CUSTOM 255 |
#define | CAN_TTCM 0x0001 |
#define | CAN_ABOM 0x0002 |
#define | CAN_AWUM 0x0004 |
#define | CAN_NART 0x0008 |
#define | CAN_RFLM 0x0010 |
#define | CAN_TXFP 0x0020 |
#define | FILTER_EXPLICIT 0xffffffff |
Typedefs | |
typedef struct _NUTCANBUS | NUTCANBUS |
CAN bus structure, defined by device. | |
typedef struct _CANBUSINFO | CANBUSINFO |
CAN bus info structure, defined by device. | |
typedef struct _CANBUFFER | CANBUFFER |
CAN BUFFER structure, defined by device. | |
typedef struct _CANFRAME | CANFRAME |
CAN frame type. | |
typedef struct _CANFILTER | CANFILTER |
CAN message filter type. | |
Enumerations | |
enum | CAN_RESULT { CAN_SUCCESS = 0, CAN_ERROR = -1, CAN_TXBUF_FULL = -2, CAN_RXBUF_EMPTY = -3, CAN_ILLEGAL_MOB = -4, CAN_INVALID_SPEED = -5, CAN_PASSIVE = -6, CAN_BUS_OFF = -7, CAN_NO_COMPANION = -8, CAN_IS_COMPANION = -9 } |
CAN error codes. More... | |
enum | CAN_COUNTERS { CAN_RX_FRAMES = 0, CAN_TX_FRAMES = 1, CAN_INTERRUPTS = 2, CAN_RX_INTERRUPTS = 3, CAN_TX_INTERRUPTS = 4, CAN_SCE_INTERRUPTS = 5, CAN_OVERRUNS = 6, CAN_ERRORS = 7, CAN_NO_COUNTERS = 8 } |
CAN event counters. More... | |
Functions | |
int | NutRegisterCanBus (NUTCANBUS *bus, int8_t ln2_size) |
_NUTCANBUS | |
int | CanAddFilter (NUTCANBUS *bus, CANFILTER *filter) |
int | CanSetBaud (NUTCANBUS *bus, uint8_t baud, uint32_t alt_btr) |
void | CANSetRxTimeout (NUTCANBUS *bus, uint32_t timeout) |
void | CanEnableRx (NUTCANBUS *bus) |
int | CanRxAvail (NUTCANBUS *bus) |
int | CanInput (NUTCANBUS *bus, CANFRAME *output) |
int | CanTxFree (NUTCANBUS *can) |
int | CanOutput (NUTCANBUS *bus, CANFRAME *output) |
int | CanGetCounter (NUTCANBUS *bus, enum CAN_COUNTERS index) |
Headers for canbus interface.
* $Id$ *