#include <sys/event.h>#include <sys/heap.h>#include <sys/atom.h>#include <string.h>#include <dev/canbus.h>Defines | |
| #define | INAK_TimeOut ((uint32_t)0x0000FFFF) |
| #define | SLAK_TimeOut ((uint32_t)0x0000FFFF) |
| #define | CAN_APB1_DIV(x) ((x-1) & 0x3ff) |
| #define | CAN_BS1(x) (((x-1) & 0xf) << 16) |
| #define | CAN_BS2(x) (((x-1) & 0x7) << 20) |
| #define | CAN_SJW(x) (((x-1) & 0x3) << 24) |
| #define | BTR2FREQ(x) (((x & 0x3ff) + 1) * (((x >> 16) & 0xf) + ((x >> 20) & 0x7) + 3)) |
| #define | CAN_DEF_RX_ENTRIES 16 |
| #define | __MAY_ALIAS |
Functions | |
| int | CanAddFilter (NUTCANBUS *bus, CANFILTER *filter) |
| int | CanRxAvail (NUTCANBUS *bus) |
| int | CanSetFeatures (NUTCANBUS *bus, uint32_t flags, uint8_t ena) |
| Set CAN Bus features during initialization. | |
| int | CanGetFeatures (NUTCANBUS *bus, uint32_t flags) |
| int | CanSetBaud (NUTCANBUS *bus, uint8_t baud, uint32_t alt_btr) |
| void | CANSetRxTimeout (NUTCANBUS *bus, uint32_t timeout) |
| int | NutRegisterCanBus (NUTCANBUS *bus, int8_t ln2_size) |
| Initialize CAN interface. | |
| int | CanTxFree (NUTCANBUS *bus) |
| int | CanInput (NUTCANBUS *bus, CANFRAME *frame) |
| void | CanEnableRx (NUTCANBUS *bus) |
| int | CanOutput (NUTCANBUS *bus, CANFRAME *frame) |
| int | CanGetCounter (NUTCANBUS *bus, enum CAN_COUNTERS index) |
| #define INAK_TimeOut ((uint32_t)0x0000FFFF) |
| #define SLAK_TimeOut ((uint32_t)0x0000FFFF) |
| #define CAN_APB1_DIV | ( | x | ) | ((x-1) & 0x3ff) |
| #define CAN_BS1 | ( | x | ) | (((x-1) & 0xf) << 16) |
| #define CAN_BS2 | ( | x | ) | (((x-1) & 0x7) << 20) |
| #define CAN_SJW | ( | x | ) | (((x-1) & 0x3) << 24) |
| #define BTR2FREQ | ( | x | ) | (((x & 0x3ff) + 1) * (((x >> 16) & 0xf) + ((x >> 20) & 0x7) + 3)) |
| #define CAN_DEF_RX_ENTRIES 16 |
Referenced by NutRegisterCanBus().
| #define __MAY_ALIAS |
Referenced by CanInput().
Set CAN Bus features during initialization.
References _NUTCANBUS::bus_base, CAN_ABOM, CAN_AWUM, CAN_BUS_OFF, CAN_ERROR, CAN_IS_COMPANION, CAN_MCR_ABOM, CAN_MCR_AWUM, CAN_MCR_NART, CAN_MCR_RFLM, CAN_MCR_TTCM, CAN_MCR_TXFP, CAN_NART, CAN_RFLM, CAN_TTCM, CAN_TXFP, CAN_TypeDef::MCR, rc, and _NUTCANBUS::sig_tx_irq.
References _NUTCANBUS::bus_base, CAN_ABOM, CAN_AWUM, CAN_ERROR, CAN_MCR_ABOM, CAN_MCR_AWUM, CAN_MCR_NART, CAN_MCR_RFLM, CAN_MCR_TTCM, CAN_MCR_TXFP, CAN_NART, CAN_RFLM, CAN_TTCM, CAN_TXFP, CAN_TypeDef::MCR, and rc.