Nut/OS  5.0.5
API Reference
stm32_can.c File Reference
#include <sys/event.h>
#include <sys/heap.h>
#include <sys/atom.h>
#include <string.h>
#include <dev/canbus.h>
Include dependency graph for stm32_can.c:

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 Documentation

#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().


Function Documentation