RTEMS  5.1
Data Structures | Macros | Typedefs | Enumerations
can-defs.h File Reference

CAN controller for the lpc176x controller. More...

#include <bsp/common-types.h>
#include <bsp/can.h>

Go to the source code of this file.

Data Structures

struct  can_transmit_info
 The CAN status and control masks to send a message for each transmit buffer. More...
 
struct  can_device
 Represents the CAN controller registers. More...
 
struct  can_driver_entry
 A driver entry for each low level device. More...
 
struct  can_central
 Represents the CAN centralized registers. More...
 
struct  can_acceptance_filter
 Represents the acceptance filter registers. More...
 

Macros

#define CAN_ACCEPT_BASE_ADDR   0x4003C000
 
#define CAN_DRIVER_IS_MINOR_VALID(minor)   ( minor < CAN_DEVICES_NUMBER )
 
#define CAN_DEFAULT_BAUD_RATE   1000000u
 
#define CAN_DEFAULT_INTERRUPT_CONFIGURATION   0
 
#define MAX_NUMBER_OF_CAN_BITS   25u
 
#define MIN_NUMBER_OF_CAN_BITS   4u
 
#define CAN_BRP_EXTRA_BIT   1u
 
#define CAN_TSEG_EXTRA_BITS   3u
 
#define MAX_TSEG1_TSEG2_BITS   22u
 
#define CAN_GSR_RBS_MASK   1u
 
#define CAN_CMR_RRB_MASK   4u
 
#define CAN_MAXIMUM_DATA_SIZE   8u
 
#define CAN10_MAXIMUM_ID   0x7FFu
 
#define CAN_BTR_TSEG1_SHIFT   16u
 
#define CAN_BTR_TSEG2_SHIFT   20u
 
#define CAN_BTR_SJW_SHIFT   14u
 
#define CAN_BTR_BRP_SHIFT   0u
 
#define CAN_BTR_TSEG1_MASK   0x000F0000U
 
#define CAN_BTR_TSEG2_MASK   0x00700000U
 
#define CAN_BTR_SJW_MASK   0x0000C000U
 
#define CAN_BTR_BRP_MASK   0x000003FFU
 
#define WRONG_BTR_VALUE   0xFFFFFFFF
 
#define CAN_INTERRUPT_TYPE_MASK   0x1ffu
 
#define CAN_MOD_RM   0x00000001U
 
#define CAN_ACCF_AFMR_ACCOF   0x00000001U
 
#define CAN_ACCF_AFMR_ACCBP   0x00000002U
 
#define CAN_ACCF_AFMR_EFCAN   0x00000004U
 
#define CAN_IER_RIE   0x000000001U
 
#define CAN_IER_TIE1   0x000000002U
 
#define CAN_IER_EIE   0x000000004U
 
#define CAN_IER_DOIE   0x000000008U
 
#define CAN_IER_WUIE   0x000000010U
 
#define CAN_IER_EPIEX   0x000000020U
 
#define CAN_IER_ALIEX   0x000000040U
 
#define CAN_IER_BEIEX   0x000000080U
 
#define CAN_IER_IDIEX   0x000000100U
 
#define CAN_IER_TIE2   0x000000200U
 
#define CAN_IER_TIE3   0x000000400U
 

Typedefs

typedef lpc176x_can_isr lpc176x_can_isr_vector[CAN_IRQ_NUMBER]
 The vector with all the callbacks for the CAN isr.
 

Enumerations

enum  can_tseg_number { CAN_TSEG1, CAN_TSEG2, CAN_NUMBER_OF_TSEG }
 The Time segments of a CAN bit.
 
enum  can_transmit_number { CAN_TRANSMIT1, CAN_TRANSMIT2, CAN_TRANSMIT3, CAN_NUMBER_OF_TRANSMIT_BUFFERS }
 The transmit buffers of the CAN device.
 
enum  can_pin_number { CAN_TX_PIN, CAN_RX_PIN, NUMBER_OF_CAN_PINS }
 A TX or RX pin for each CAN device .
 
enum  can_format { CANStandard = 0, CANExtended = 1, CANAny = 2 }
 The possible CAN formats for a message.
 
enum  can_type { CANData = 0, CANRemote = 1 }
 The types of message.
 

Detailed Description

CAN controller for the lpc176x controller.