Data Structures | |
struct | _CANFRAME |
CAN frame structure. More... | |
struct | _CANINFO |
CAN controller information structure. More... | |
struct | ifcan |
CAN interface structure. More... | |
Defines | |
#define | CAN_IF_2A 0x01 |
#define | CAN_IF_2B 0x02 |
#define | CAN_SPEED_10K 0 |
10 kbit/s, max. cable length 5000 m | |
#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 |
Typedefs | |
typedef struct _CANFRAME | CANFRAME |
CAN frame type. | |
typedef struct _CANINFO | CANINFO |
CAN controller information type. | |
typedef struct ifcan | IFCAN |
Canbus interface type. | |
Functions | |
uint8_t | CAN_SetSpeed (NUTDEVICE *dev, uint32_t baudrate) |
void | CAN_SetFilter (NUTDEVICE *dev, uint8_t *ac, uint8_t *am) |
void | CAN_TxFrame (NUTDEVICE *dev, CANFRAME *frame) |
uint8_t | CAN_TryTxFrame (NUTDEVICE *dev, CANFRAME *frame) |
uint8_t | CAN_TxFree (NUTDEVICE *dev) |
uint8_t | CAN_RxFrame (NUTDEVICE *dev, CANFRAME *frame) |
uint8_t | CAN_TryRxFrame (NUTDEVICE *dev, CANFRAME *frame) |
uint8_t | CAN_RxAvail (NUTDEVICE *dev) |
void | CAN_SetRxTimeout (NUTDEVICE *dev, uint32_t timeout) |
#define CAN_SPEED_10K 0 |
10 kbit/s, max. cable length 5000 m
Definition at line 83 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_20K 1 |
20 kbit/s, max. cable length 2500 m
Definition at line 84 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_50K 2 |
50 kbit/s, max. cable length 1000 m
Definition at line 85 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_100K 3 |
100 kbit/s, max. cable length 600 m
Definition at line 86 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_125K 4 |
125 kbit/s, max. cable length 500 m
Definition at line 87 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_250K 5 |
250 kbit/s, max. cable length 250 m
Definition at line 88 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_500K 6 |
500 kbit/s, max. cable length 100 m
Definition at line 89 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_800K 7 |
800 kbit/s, max. cable length 50 m
Definition at line 90 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_1M 8 |
1 Mbit/s, max. cable length 25 m
Definition at line 91 of file can_dev.h.
Referenced by AtCanSetBaudrate(), SJAInit(), and SJASetBaudrate().
#define CAN_SPEED_CUSTOM 255 |
Definition at line 92 of file can_dev.h.
Referenced by AtCanSetBaudrate().
Definition at line 83 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Definition at line 88 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Definition at line 94 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Definition at line 99 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Definition at line 108 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Definition at line 113 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Definition at line 118 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Definition at line 127 of file can_dev.c.
References _NUTDEVICE::dev_icb.
Sets the CAN receive timeout
dev | Pointer to the device structure |
timeout | Timeout in milliseconds, NUT_WAIT_INFINITE = no time-out |
Definition at line 142 of file can_dev.c.
References _NUTDEVICE::dev_icb.