Collaboration diagram for AT90CAN128 CAN device:
Data Structures | |
struct | _CANBuffer |
Defines | |
#define | MAX_NO_MOB 15 |
#define | RX_MOB 8 |
#define | CAN_BUF_SIZE 64 |
Typedefs | |
typedef _CANBuffer | CANBuffer |
Enumerations | |
enum | CAN_RESULT { CAN_SUCCESS = 0, CAN_TXBUF_FULL = -1, CAN_RXBUF_EMPTY = -2, CAN_ILLEGAL_MOB = -3, CAN_INVALID_SPEED = -4 } |
Functions | |
int8_t | AtCanGetFreeMob (void) |
int8_t | AtCanEnableMsgObj (uint8_t mob, uint32_t id, int8_t idIsExt, int8_t idRemTag, uint32_t mask, int8_t maskIsExt, int8_t maskRemTag) |
int8_t | AtCanEnableRx (uint8_t noOfMsgObjs, uint32_t id, int8_t idIsExt, int8_t idRemTag, uint32_t mask, int8_t maskIsExt, int8_t maskRemTag) |
int8_t | AtCanSendMsg (CANFRAME *frame) |
u_char | AtCanRxAvail (NUTDEVICE *dev) |
u_char | AtCanTxFree (NUTDEVICE *dev) |
void | AtCanOutput (NUTDEVICE *dev, CANFRAME *frame) |
void | AtCanInput (NUTDEVICE *dev, CANFRAME *frame) |
void | AtCanSetAccCode (NUTDEVICE *dev, u_char *ac) |
void | AtCanSetAccMask (NUTDEVICE *dev, u_char *am) |
u_char | AtCanSetBaudrate (NUTDEVICE *dev, u_long baudrate) |
int | AtCanInit (NUTDEVICE *dev) |
Variables | |
NUTDEVICE | devAtCan |
CANBuffer | canRxBuf |
CANINFO | dcb_atcan |
IFCAN | ifc_atcan |
NUTDEVICE | devAtCan |
|
CAN result codes |
|
Configure a single message object for receiption.
|
|
Configure message objects for receiption.
|
|
Send a CAN message
|
|
Checks if data is available in input buffer
|
|
Checks if there's still space in output buffer
|
|
Write a frame from to output buffer This function writes a frame to the output buffer. If the output buffer is full the function will block until frames are send.
|
|
Reads a frame from input buffer This function reads a frame from the input buffer. If the input buffer is empty the function will block unitl new frames are received.
|
|
Sets the acceptance code
|
|
Sets the acceptance mask
|
|
Sets the CAN baudrate
|
|
Initialize CAN interface. Applications typically do not use this function, but call NutRegisterDevice().
|
|
Initial value: { 0, {'a', 't', 'c', 'a', 'n', '0', 0, 0, 0}, IFTYP_CAN, 0, 0, &ifc_atcan, &dcb_atcan, AtCanInit, 0, 0, 0, 0, 0, 0, 0 } Applications must pass this structure to NutRegisterDevice() to bind this CAN device driver to the Nut/OS kernel. |
|
Initial value: { CAN_IF_2B, CAN_SPEED_125K, {0xFF, 0xFF, 0xFF, 0xFF}, {0x00, 0x00, 0x00, 0x00}, AtCanRxAvail, AtCanTxFree, AtCanInput, AtCanOutput, AtCanSetAccCode, AtCanSetAccMask, AtCanSetBaudrate } This structure stores some interface parameters like bit rate, acceptance mask, acceptance code and callback handlers. |
|
Initial value: { 0, {'a', 't', 'c', 'a', 'n', '0', 0, 0, 0}, IFTYP_CAN, 0, 0, &ifc_atcan, &dcb_atcan, AtCanInit, 0, 0, 0, 0, 0, 0, 0 } Applications must pass this structure to NutRegisterDevice() to bind this CAN device driver to the Nut/OS kernel. |