#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/list.h>
#include <linux/io.h>
#include <linux/pm_runtime.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
#include "c_can.h"
Go to the source code of this file.
|
enum | c_can_lec_type {
LEC_NO_ERROR = 0,
LEC_STUFF_ERROR,
LEC_FORM_ERROR,
LEC_ACK_ERROR,
LEC_BIT1_ERROR,
LEC_BIT0_ERROR,
LEC_CRC_ERROR,
LEC_UNUSED
} |
|
enum | c_can_bus_error_types { C_CAN_NO_ERROR = 0,
C_CAN_BUS_OFF,
C_CAN_ERROR_WARNING,
C_CAN_ERROR_PASSIVE
} |
|
#define BRP_EXT_BRPE_MASK 0x0f |
#define BRP_EXT_BRPE_SHIFT 0 |
#define BTR_BRP_MASK 0x3f |
#define BTR_SJW_MASK (0x3 << BTR_SJW_SHIFT) |
#define BTR_TSEG1_MASK (0xf << BTR_TSEG1_SHIFT) |
#define BTR_TSEG1_SHIFT 8 |
#define BTR_TSEG2_MASK (0x7 << BTR_TSEG2_SHIFT) |
#define BTR_TSEG2_SHIFT 12 |
#define C_CAN_MSG_OBJ_RX_FIRST 1 |
#define C_CAN_MSG_OBJ_RX_LAST |
Value:
C_CAN_MSG_OBJ_RX_NUM - 1)
Definition at line 148 of file c_can.c.
#define C_CAN_MSG_OBJ_RX_NUM 16 |
#define C_CAN_MSG_OBJ_RX_SPLIT 9 |
#define C_CAN_MSG_OBJ_TX_LAST |
Value:
C_CAN_MSG_OBJ_TX_NUM - 1)
Definition at line 152 of file c_can.c.
#define C_CAN_MSG_OBJ_TX_NUM 16 |
#define C_CAN_NO_OF_OBJECTS 32 |
#define CONTROL_CCE BIT(6) |
#define CONTROL_DISABLE_AR BIT(5) |
#define CONTROL_EIE BIT(3) |
#define CONTROL_ENABLE_AR (0 << 5) |
#define CONTROL_EX_PDR BIT(8) |
#define CONTROL_IE BIT(1) |
#define CONTROL_INIT BIT(0) |
#define CONTROL_SIE BIT(2) |
#define CONTROL_TEST BIT(7) |
#define DISABLE_ALL_INTERRUPTS 0 |
#define ENABLE_ALL_INTERRUPTS 1 |
#define ERR_CNT_REC_MASK (0x7f << ERR_CNT_REC_SHIFT) |
#define ERR_CNT_REC_SHIFT 8 |
#define ERR_CNT_RP_MASK (0x1 << ERR_CNT_RP_SHIFT) |
#define ERR_CNT_RP_SHIFT 15 |
#define ERR_CNT_TEC_MASK 0xff |
#define ERR_CNT_TEC_SHIFT 0 |
#define IF_ARB_MSGVAL BIT(15) |
#define IF_ARB_MSGXTD BIT(14) |
#define IF_ARB_TRANSMIT BIT(13) |
#define IF_COMM_ARB BIT(5) |
#define IF_COMM_CLR_INT_PND BIT(3) |
#define IF_COMM_CONTROL BIT(4) |
#define IF_COMM_DATAA BIT(1) |
#define IF_COMM_DATAB BIT(0) |
#define IF_COMM_MASK BIT(6) |
#define IF_COMM_TXRQST BIT(2) |
#define IF_COMM_WR BIT(7) |
#define IF_COMR_BUSY BIT(15) |
#define IF_ENUM_REG_LEN 11 |
#define IF_MCONT_CLR_MSGLST (0 << 14) |
#define IF_MCONT_DLC_MASK 0xf |
#define IF_MCONT_EOB BIT(7) |
#define IF_MCONT_INTPND BIT(13) |
#define IF_MCONT_MSGLST BIT(14) |
#define IF_MCONT_NEWDAT BIT(15) |
#define IF_MCONT_RMTEN BIT(9) |
#define IF_MCONT_RXIE BIT(10) |
#define IF_MCONT_TXIE BIT(11) |
#define IF_MCONT_TXRQST BIT(8) |
#define IF_MCONT_UMASK BIT(12) |
#define IFX_WRITE_HIGH_16BIT |
( |
|
x | ) |
(((x) & 0xFFFF0000) >> 16) |
#define IFX_WRITE_LOW_16BIT |
( |
|
x | ) |
((x) & 0xFFFF) |
#define INIT_WAIT_MS 1000 |
#define MIN_TIMEOUT_VALUE 6 |
#define RECEIVE_OBJECT_BITS 0x0000ffff |
#define STATUS_BOFF BIT(7) |
#define STATUS_EPASS BIT(5) |
#define STATUS_EWARN BIT(6) |
#define STATUS_INTERRUPT 0x8000 |
#define STATUS_PDA BIT(10) |
#define STATUS_RXOK BIT(4) |
#define STATUS_TXOK BIT(3) |
#define TEST_BASIC BIT(2) |
#define TEST_LBACK BIT(4) |
#define TEST_SILENT BIT(3) |
- Enumerator:
C_CAN_NO_ERROR |
|
C_CAN_BUS_OFF |
|
C_CAN_ERROR_WARNING |
|
C_CAN_ERROR_PASSIVE |
|
Definition at line 193 of file c_can.c.
- Enumerator:
LEC_NO_ERROR |
|
LEC_STUFF_ERROR |
|
LEC_FORM_ERROR |
|
LEC_ACK_ERROR |
|
LEC_BIT1_ERROR |
|
LEC_BIT0_ERROR |
|
LEC_CRC_ERROR |
|
LEC_UNUSED |
|
Definition at line 178 of file c_can.c.
MODULE_LICENSE |
( |
"GPL v2" |
| ) |
|