Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
cc770.h File Reference
#include <linux/can/dev.h>

Go to the source code of this file.

Data Structures

struct  cc770_msgobj
 
struct  cc770_regs
 
struct  cc770_priv
 

Macros

#define CTRL_INI   0x01 /* Initialization */
 
#define CTRL_IE   0x02 /* Interrupt Enable */
 
#define CTRL_SIE   0x04 /* Status Interrupt Enable */
 
#define CTRL_EIE   0x08 /* Error Interrupt Enable */
 
#define CTRL_EAF   0x20 /* Enable additional functions */
 
#define CTRL_CCE   0x40 /* Change Configuration Enable */
 
#define STAT_LEC_STUFF   0x01 /* Stuff error */
 
#define STAT_LEC_FORM   0x02 /* Form error */
 
#define STAT_LEC_ACK   0x03 /* Acknowledgement error */
 
#define STAT_LEC_BIT1   0x04 /* Bit1 error */
 
#define STAT_LEC_BIT0   0x05 /* Bit0 error */
 
#define STAT_LEC_CRC   0x06 /* CRC error */
 
#define STAT_LEC_MASK   0x07 /* Last Error Code mask */
 
#define STAT_TXOK   0x08 /* Transmit Message Successfully */
 
#define STAT_RXOK   0x10 /* Receive Message Successfully */
 
#define STAT_WAKE   0x20 /* Wake Up Status */
 
#define STAT_WARN   0x40 /* Warning Status */
 
#define STAT_BOFF   0x80 /* Bus Off Status */
 
#define INTPND_RES   0x01 /* No Interrupt pending */
 
#define INTPND_SET   0x02 /* Interrupt pending */
 
#define INTPND_UNC   0x03
 
#define RXIE_RES   0x04 /* Receive Interrupt Disable */
 
#define RXIE_SET   0x08 /* Receive Interrupt Enable */
 
#define RXIE_UNC   0x0c
 
#define TXIE_RES   0x10 /* Transmit Interrupt Disable */
 
#define TXIE_SET   0x20 /* Transmit Interrupt Enable */
 
#define TXIE_UNC   0x30
 
#define MSGVAL_RES   0x40 /* Message Invalid */
 
#define MSGVAL_SET   0x80 /* Message Valid */
 
#define MSGVAL_UNC   0xc0
 
#define NEWDAT_RES   0x01 /* No New Data */
 
#define NEWDAT_SET   0x02 /* New Data */
 
#define NEWDAT_UNC   0x03
 
#define MSGLST_RES   0x04 /* No Message Lost */
 
#define MSGLST_SET   0x08 /* Message Lost */
 
#define MSGLST_UNC   0x0c
 
#define CPUUPD_RES   0x04 /* No CPU Updating */
 
#define CPUUPD_SET   0x08 /* CPU Updating */
 
#define CPUUPD_UNC   0x0c
 
#define TXRQST_RES   0x10 /* No Transmission Request */
 
#define TXRQST_SET   0x20 /* Transmission Request */
 
#define TXRQST_UNC   0x30
 
#define RMTPND_RES   0x40 /* No Remote Request Pending */
 
#define RMTPND_SET   0x80 /* Remote Request Pending */
 
#define RMTPND_UNC   0xc0
 
#define MSGCFG_XTD   0x04 /* Extended Identifier */
 
#define MSGCFG_DIR   0x08 /* Direction is Transmit */
 
#define MSGOBJ_FIRST   1
 
#define MSGOBJ_LAST   15
 
#define CC770_IO_SIZE   0x100
 
#define CC770_MAX_IRQ   20 /* max. number of interrupts handled in ISR */
 
#define CC770_MAX_MSG   4 /* max. number of messages handled in ISR */
 
#define CC770_ECHO_SKB_MAX   1
 
#define cc770_read_reg(priv, member)   priv->read_reg(priv, offsetof(struct cc770_regs, member))
 
#define cc770_write_reg(priv, member, value)   priv->write_reg(priv, offsetof(struct cc770_regs, member), value)
 
#define CC770_OBJ_FLAG_RX   0x01
 
#define CC770_OBJ_FLAG_RTR   0x02
 
#define CC770_OBJ_FLAG_EFF   0x04
 
#define obj2msgobj(o)   (MSGOBJ_LAST - (o)) /* message object 11..15 */
 

Enumerations

enum  {
  CC770_OBJ_RX0 = 0, CC770_OBJ_RX1, CC770_OBJ_RX_RTR0, CC770_OBJ_RX_RTR1,
  CC770_OBJ_TX, CC770_OBJ_MAX
}
 

Functions

struct net_devicealloc_cc770dev (int sizeof_priv)
 
void free_cc770dev (struct net_device *dev)
 
int register_cc770dev (struct net_device *dev)
 
void unregister_cc770dev (struct net_device *dev)
 

Variables

struct cc770_msgobj __packed
 

Macro Definition Documentation

#define CC770_ECHO_SKB_MAX   1

Definition at line 146 of file cc770.h.

#define CC770_IO_SIZE   0x100

Definition at line 142 of file cc770.h.

#define CC770_MAX_IRQ   20 /* max. number of interrupts handled in ISR */

Definition at line 143 of file cc770.h.

#define CC770_MAX_MSG   4 /* max. number of messages handled in ISR */

Definition at line 144 of file cc770.h.

#define CC770_OBJ_FLAG_EFF   0x04

Definition at line 159 of file cc770.h.

#define CC770_OBJ_FLAG_RTR   0x02

Definition at line 158 of file cc770.h.

#define CC770_OBJ_FLAG_RX   0x01

Definition at line 157 of file cc770.h.

#define cc770_read_reg (   priv,
  member 
)    priv->read_reg(priv, offsetof(struct cc770_regs, member))

Definition at line 148 of file cc770.h.

#define cc770_write_reg (   priv,
  member,
  value 
)    priv->write_reg(priv, offsetof(struct cc770_regs, member), value)

Definition at line 151 of file cc770.h.

#define CPUUPD_RES   0x04 /* No CPU Updating */

Definition at line 125 of file cc770.h.

#define CPUUPD_SET   0x08 /* CPU Updating */

Definition at line 126 of file cc770.h.

#define CPUUPD_UNC   0x0c

Definition at line 127 of file cc770.h.

#define CTRL_CCE   0x40 /* Change Configuration Enable */

Definition at line 80 of file cc770.h.

#define CTRL_EAF   0x20 /* Enable additional functions */

Definition at line 79 of file cc770.h.

#define CTRL_EIE   0x08 /* Error Interrupt Enable */

Definition at line 78 of file cc770.h.

#define CTRL_IE   0x02 /* Interrupt Enable */

Definition at line 76 of file cc770.h.

#define CTRL_INI   0x01 /* Initialization */

Definition at line 75 of file cc770.h.

#define CTRL_SIE   0x04 /* Status Interrupt Enable */

Definition at line 77 of file cc770.h.

#define INTPND_RES   0x01 /* No Interrupt pending */

Definition at line 105 of file cc770.h.

#define INTPND_SET   0x02 /* Interrupt pending */

Definition at line 106 of file cc770.h.

#define INTPND_UNC   0x03

Definition at line 107 of file cc770.h.

#define MSGCFG_DIR   0x08 /* Direction is Transmit */

Definition at line 137 of file cc770.h.

#define MSGCFG_XTD   0x04 /* Extended Identifier */

Definition at line 136 of file cc770.h.

#define MSGLST_RES   0x04 /* No Message Lost */

Definition at line 122 of file cc770.h.

#define MSGLST_SET   0x08 /* Message Lost */

Definition at line 123 of file cc770.h.

#define MSGLST_UNC   0x0c

Definition at line 124 of file cc770.h.

#define MSGOBJ_FIRST   1

Definition at line 139 of file cc770.h.

#define MSGOBJ_LAST   15

Definition at line 140 of file cc770.h.

#define MSGVAL_RES   0x40 /* Message Invalid */

Definition at line 114 of file cc770.h.

#define MSGVAL_SET   0x80 /* Message Valid */

Definition at line 115 of file cc770.h.

#define MSGVAL_UNC   0xc0

Definition at line 116 of file cc770.h.

#define NEWDAT_RES   0x01 /* No New Data */

Definition at line 119 of file cc770.h.

#define NEWDAT_SET   0x02 /* New Data */

Definition at line 120 of file cc770.h.

#define NEWDAT_UNC   0x03

Definition at line 121 of file cc770.h.

#define obj2msgobj (   o)    (MSGOBJ_LAST - (o)) /* message object 11..15 */

Definition at line 170 of file cc770.h.

#define RMTPND_RES   0x40 /* No Remote Request Pending */

Definition at line 131 of file cc770.h.

#define RMTPND_SET   0x80 /* Remote Request Pending */

Definition at line 132 of file cc770.h.

#define RMTPND_UNC   0xc0

Definition at line 133 of file cc770.h.

#define RXIE_RES   0x04 /* Receive Interrupt Disable */

Definition at line 108 of file cc770.h.

#define RXIE_SET   0x08 /* Receive Interrupt Enable */

Definition at line 109 of file cc770.h.

#define RXIE_UNC   0x0c

Definition at line 110 of file cc770.h.

#define STAT_BOFF   0x80 /* Bus Off Status */

Definition at line 94 of file cc770.h.

#define STAT_LEC_ACK   0x03 /* Acknowledgement error */

Definition at line 85 of file cc770.h.

#define STAT_LEC_BIT0   0x05 /* Bit0 error */

Definition at line 87 of file cc770.h.

#define STAT_LEC_BIT1   0x04 /* Bit1 error */

Definition at line 86 of file cc770.h.

#define STAT_LEC_CRC   0x06 /* CRC error */

Definition at line 88 of file cc770.h.

#define STAT_LEC_FORM   0x02 /* Form error */

Definition at line 84 of file cc770.h.

#define STAT_LEC_MASK   0x07 /* Last Error Code mask */

Definition at line 89 of file cc770.h.

#define STAT_LEC_STUFF   0x01 /* Stuff error */

Definition at line 83 of file cc770.h.

#define STAT_RXOK   0x10 /* Receive Message Successfully */

Definition at line 91 of file cc770.h.

#define STAT_TXOK   0x08 /* Transmit Message Successfully */

Definition at line 90 of file cc770.h.

#define STAT_WAKE   0x20 /* Wake Up Status */

Definition at line 92 of file cc770.h.

#define STAT_WARN   0x40 /* Warning Status */

Definition at line 93 of file cc770.h.

#define TXIE_RES   0x10 /* Transmit Interrupt Disable */

Definition at line 111 of file cc770.h.

#define TXIE_SET   0x20 /* Transmit Interrupt Enable */

Definition at line 112 of file cc770.h.

#define TXIE_UNC   0x30

Definition at line 113 of file cc770.h.

#define TXRQST_RES   0x10 /* No Transmission Request */

Definition at line 128 of file cc770.h.

#define TXRQST_SET   0x20 /* Transmission Request */

Definition at line 129 of file cc770.h.

#define TXRQST_UNC   0x30

Definition at line 130 of file cc770.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
CC770_OBJ_RX0 
CC770_OBJ_RX1 
CC770_OBJ_RX_RTR0 
CC770_OBJ_RX_RTR1 
CC770_OBJ_TX 
CC770_OBJ_MAX 

Definition at line 161 of file cc770.h.

Function Documentation

struct net_device* alloc_cc770dev ( int  sizeof_priv)
read

Definition at line 789 of file cc770.c.

void free_cc770dev ( struct net_device dev)

Definition at line 816 of file cc770.c.

int register_cc770dev ( struct net_device dev)

Definition at line 828 of file cc770.c.

void unregister_cc770dev ( struct net_device dev)

Definition at line 858 of file cc770.c.

Variable Documentation