Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
baycom_epp.c File Reference
#include <linux/crc-ccitt.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/workqueue.h>
#include <linux/fs.h>
#include <linux/parport.h>
#include <linux/if_arp.h>
#include <linux/hdlcdrv.h>
#include <linux/baycom.h>
#include <linux/jiffies.h>
#include <linux/random.h>
#include <net/ax25.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  baycom_state
 
struct  baycom_state::debug_vals
 

Macros

#define BAYCOM_DEBUG
 
#define BAYCOM_MAGIC   19730510
 
#define NR_PORTS   4
 
#define EPP_DCDBIT   0x80
 
#define EPP_PTTBIT   0x08
 
#define EPP_NREF   0x01
 
#define EPP_NRAEF   0x02
 
#define EPP_NRHF   0x04
 
#define EPP_NTHF   0x20
 
#define EPP_NTAEF   0x10
 
#define EPP_NTEF   EPP_PTTBIT
 
#define EPP_TX_FIFO_ENABLE   0x10
 
#define EPP_RX_FIFO_ENABLE   0x08
 
#define EPP_MODEM_ENABLE   0x20
 
#define EPP_LEDS   0xC0
 
#define EPP_IRQ_ENABLE   0x10
 
#define LPTREG_ECONTROL   0x402
 
#define LPTREG_CONFIGB   0x401
 
#define LPTREG_CONFIGA   0x400
 
#define LPTREG_EPPDATA   0x004
 
#define LPTREG_EPPADDR   0x003
 
#define LPTREG_CONTROL   0x002
 
#define LPTREG_STATUS   0x001
 
#define LPTREG_DATA   0x000
 
#define LPTCTRL_PROGRAM   0x04 /* 0 to reprogram */
 
#define LPTCTRL_WRITE   0x01
 
#define LPTCTRL_ADDRSTB   0x08
 
#define LPTCTRL_DATASTB   0x02
 
#define LPTCTRL_INTEN   0x10
 
#define LPTSTAT_SHIFT_NINTR   6
 
#define LPTSTAT_WAIT   0x80
 
#define LPTSTAT_NINTR   (1<<LPTSTAT_SHIFT_NINTR)
 
#define LPTSTAT_PE   0x20
 
#define LPTSTAT_DONE   0x10
 
#define LPTSTAT_NERROR   0x08
 
#define LPTSTAT_EPPTIMEOUT   0x01
 
#define LPTDATA_SHIFT_TDI   0
 
#define LPTDATA_SHIFT_TMS   2
 
#define LPTDATA_TDI   (1<<LPTDATA_SHIFT_TDI)
 
#define LPTDATA_TCK   0x02
 
#define LPTDATA_TMS   (1<<LPTDATA_SHIFT_TMS)
 
#define LPTDATA_INITBIAS   0x80
 
#define EPP_DCDBIT   0x80
 
#define EPP_PTTBIT   0x08
 
#define EPP_RXEBIT   0x01
 
#define EPP_RXAEBIT   0x02
 
#define EPP_RXHFULL   0x04
 
#define EPP_NTHF   0x20
 
#define EPP_NTAEF   0x10
 
#define EPP_NTEF   EPP_PTTBIT
 
#define EPP_TX_FIFO_ENABLE   0x10
 
#define EPP_RX_FIFO_ENABLE   0x08
 
#define EPP_MODEM_ENABLE   0x20
 
#define EPP_LEDS   0xC0
 
#define EPP_IRQ_ENABLE   0x10
 
#define XC4K_IRLENGTH   3
 
#define XC4K_EXTEST   0
 
#define XC4K_PRELOAD   1
 
#define XC4K_CONFIGURE   5
 
#define XC4K_BYPASS   7
 
#define EPP_CONVENTIONAL   0
 
#define EPP_FPGA   1
 
#define EPP_FPGAEXTSTATUS   2
 
#define TXBUFFER_SIZE   ((HDLCDRV_MAXFLEN*6/5)+8)
 
#define KISS_VERBOSE
 
#define PARAM_TXDELAY   1
 
#define PARAM_PERSIST   2
 
#define PARAM_SLOTTIME   3
 
#define PARAM_TXTAIL   4
 
#define PARAM_FULLDUP   5
 
#define PARAM_HARDWARE   6
 
#define PARAM_RETURN   255
 
#define tenms_to_flags(bc, tenms)   ((tenms * bc->bitrate) / 800)
 
#define PKP(a, b)   printk(KERN_INFO "baycomm_epp: channel params: " a "\n", b)
 
#define GETTICK(x)
 

Functions

 module_param_array (mode, charp, NULL, 0)
 
 MODULE_PARM_DESC (mode,"baycom operating mode")
 
 module_param_array (iobase, int, NULL, 0)
 
 MODULE_PARM_DESC (iobase,"baycom io base address")
 
 MODULE_AUTHOR ("Thomas M. Sailer, [email protected], [email protected]")
 
 MODULE_DESCRIPTION ("Baycom epp amateur radio modem driver")
 
 MODULE_LICENSE ("GPL")
 
 module_init (init_baycomepp)
 
 module_exit (cleanup_baycomepp)
 
 __setup ("baycom_epp=", baycom_epp_setup)
 

Macro Definition Documentation

#define BAYCOM_DEBUG

Definition at line 62 of file baycom_epp.c.

#define BAYCOM_MAGIC   19730510

Definition at line 63 of file baycom_epp.c.

#define EPP_CONVENTIONAL   0

Definition at line 158 of file baycom_epp.c.

#define EPP_DCDBIT   0x80

Definition at line 135 of file baycom_epp.c.

#define EPP_DCDBIT   0x80

Definition at line 135 of file baycom_epp.c.

#define EPP_FPGA   1

Definition at line 159 of file baycom_epp.c.

#define EPP_FPGAEXTSTATUS   2

Definition at line 160 of file baycom_epp.c.

#define EPP_IRQ_ENABLE   0x10

Definition at line 149 of file baycom_epp.c.

#define EPP_IRQ_ENABLE   0x10

Definition at line 149 of file baycom_epp.c.

#define EPP_LEDS   0xC0

Definition at line 148 of file baycom_epp.c.

#define EPP_LEDS   0xC0

Definition at line 148 of file baycom_epp.c.

#define EPP_MODEM_ENABLE   0x20

Definition at line 147 of file baycom_epp.c.

#define EPP_MODEM_ENABLE   0x20

Definition at line 147 of file baycom_epp.c.

#define EPP_NRAEF   0x02

Definition at line 86 of file baycom_epp.c.

#define EPP_NREF   0x01

Definition at line 85 of file baycom_epp.c.

#define EPP_NRHF   0x04

Definition at line 87 of file baycom_epp.c.

#define EPP_NTAEF   0x10

Definition at line 142 of file baycom_epp.c.

#define EPP_NTAEF   0x10

Definition at line 142 of file baycom_epp.c.

#define EPP_NTEF   EPP_PTTBIT

Definition at line 143 of file baycom_epp.c.

#define EPP_NTEF   EPP_PTTBIT

Definition at line 143 of file baycom_epp.c.

#define EPP_NTHF   0x20

Definition at line 141 of file baycom_epp.c.

#define EPP_NTHF   0x20

Definition at line 141 of file baycom_epp.c.

#define EPP_PTTBIT   0x08

Definition at line 136 of file baycom_epp.c.

#define EPP_PTTBIT   0x08

Definition at line 136 of file baycom_epp.c.

#define EPP_RX_FIFO_ENABLE   0x08

Definition at line 146 of file baycom_epp.c.

#define EPP_RX_FIFO_ENABLE   0x08

Definition at line 146 of file baycom_epp.c.

#define EPP_RXAEBIT   0x02

Definition at line 138 of file baycom_epp.c.

#define EPP_RXEBIT   0x01

Definition at line 137 of file baycom_epp.c.

#define EPP_RXHFULL   0x04

Definition at line 139 of file baycom_epp.c.

#define EPP_TX_FIFO_ENABLE   0x10

Definition at line 145 of file baycom_epp.c.

#define EPP_TX_FIFO_ENABLE   0x10

Definition at line 145 of file baycom_epp.c.

#define GETTICK (   x)

Definition at line 644 of file baycom_epp.c.

#define KISS_VERBOSE

Definition at line 225 of file baycom_epp.c.

#define LPTCTRL_ADDRSTB   0x08

Definition at line 112 of file baycom_epp.c.

#define LPTCTRL_DATASTB   0x02

Definition at line 113 of file baycom_epp.c.

#define LPTCTRL_INTEN   0x10

Definition at line 114 of file baycom_epp.c.

#define LPTCTRL_PROGRAM   0x04 /* 0 to reprogram */

Definition at line 110 of file baycom_epp.c.

#define LPTCTRL_WRITE   0x01

Definition at line 111 of file baycom_epp.c.

#define LPTDATA_INITBIAS   0x80

Definition at line 131 of file baycom_epp.c.

#define LPTDATA_SHIFT_TDI   0

Definition at line 126 of file baycom_epp.c.

#define LPTDATA_SHIFT_TMS   2

Definition at line 127 of file baycom_epp.c.

#define LPTDATA_TCK   0x02

Definition at line 129 of file baycom_epp.c.

#define LPTDATA_TDI   (1<<LPTDATA_SHIFT_TDI)

Definition at line 128 of file baycom_epp.c.

#define LPTDATA_TMS   (1<<LPTDATA_SHIFT_TMS)

Definition at line 130 of file baycom_epp.c.

#define LPTREG_CONFIGA   0x400

Definition at line 102 of file baycom_epp.c.

#define LPTREG_CONFIGB   0x401

Definition at line 101 of file baycom_epp.c.

#define LPTREG_CONTROL   0x002

Definition at line 105 of file baycom_epp.c.

#define LPTREG_DATA   0x000

Definition at line 107 of file baycom_epp.c.

#define LPTREG_ECONTROL   0x402

Definition at line 100 of file baycom_epp.c.

#define LPTREG_EPPADDR   0x003

Definition at line 104 of file baycom_epp.c.

#define LPTREG_EPPDATA   0x004

Definition at line 103 of file baycom_epp.c.

#define LPTREG_STATUS   0x001

Definition at line 106 of file baycom_epp.c.

#define LPTSTAT_DONE   0x10

Definition at line 121 of file baycom_epp.c.

#define LPTSTAT_EPPTIMEOUT   0x01

Definition at line 123 of file baycom_epp.c.

#define LPTSTAT_NERROR   0x08

Definition at line 122 of file baycom_epp.c.

#define LPTSTAT_NINTR   (1<<LPTSTAT_SHIFT_NINTR)

Definition at line 119 of file baycom_epp.c.

#define LPTSTAT_PE   0x20

Definition at line 120 of file baycom_epp.c.

#define LPTSTAT_SHIFT_NINTR   6

Definition at line 117 of file baycom_epp.c.

#define LPTSTAT_WAIT   0x80

Definition at line 118 of file baycom_epp.c.

#define NR_PORTS   4

Definition at line 76 of file baycom_epp.c.

#define PARAM_FULLDUP   5

Definition at line 233 of file baycom_epp.c.

#define PARAM_HARDWARE   6

Definition at line 234 of file baycom_epp.c.

#define PARAM_PERSIST   2

Definition at line 230 of file baycom_epp.c.

#define PARAM_RETURN   255

Definition at line 235 of file baycom_epp.c.

#define PARAM_SLOTTIME   3

Definition at line 231 of file baycom_epp.c.

#define PARAM_TXDELAY   1

Definition at line 229 of file baycom_epp.c.

#define PARAM_TXTAIL   4

Definition at line 232 of file baycom_epp.c.

#define PKP (   a,
  b 
)    printk(KERN_INFO "baycomm_epp: channel params: " a "\n", b)
#define tenms_to_flags (   bc,
  tenms 
)    ((tenms * bc->bitrate) / 800)

Definition at line 275 of file baycom_epp.c.

#define TXBUFFER_SIZE   ((HDLCDRV_MAXFLEN*6/5)+8)

Definition at line 162 of file baycom_epp.c.

#define XC4K_BYPASS   7

Definition at line 156 of file baycom_epp.c.

#define XC4K_CONFIGURE   5

Definition at line 155 of file baycom_epp.c.

#define XC4K_EXTEST   0

Definition at line 153 of file baycom_epp.c.

#define XC4K_IRLENGTH   3

Definition at line 152 of file baycom_epp.c.

#define XC4K_PRELOAD   1

Definition at line 154 of file baycom_epp.c.

Function Documentation

__setup ( )
MODULE_AUTHOR ( "Thomas M.  Sailer,
sailer @ife.ee.ethz.  ch,
hb9jnx @hb9w.che.eu"   
)
MODULE_DESCRIPTION ( "Baycom epp amateur radio modem driver )
module_exit ( cleanup_baycomepp  )
module_init ( init_baycomepp  )
MODULE_LICENSE ( "GPL"  )
module_param_array ( mode  ,
charp  ,
NULL  ,
 
)
module_param_array ( iobase  ,
int  ,
NULL  ,
 
)
MODULE_PARM_DESC ( mode  ,
"baycom operating mode  
)
MODULE_PARM_DESC ( iobase  ,
"baycom io base address  
)