nidas  v1.2-1520
Classes | Macros | Functions | Variables
main.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/version.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/ioport.h>
#include <asm/atomic.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include "arinc.h"
#include "Condor/CEI420A/Include/utildefs.h"
#include <nidas/linux/ver_macros.h>
#include <nidas/linux/types.h>
#include <nidas/linux/util.h>
#include <nidas/linux/isa_bus.h>
#include <nidas/linux/klog.h>
#include <nidas/linux/Revision.h>

Classes

struct  arinc_board
 
struct  arinc_dev
 Device structure used in the file operations of the character device which provides ARINC samples. More...
 

Macros

#define TIMESYNC_SECS   10
 
#define REPO_REVISION   "unknown"
 
#define ARINC_SAMPLE_QUEUE_SIZE   8
 
#define BOARD_NUM   0
 
#define ARINC_IOMEM_SIZE   (4096)
 
#define DEVNAME_ARINC   "arinc"
 Info for ARINC user devices. More...
 

Functions

 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("John Wasinger <wasinger@ucar.edu>")
 
 MODULE_DESCRIPTION ("CEI420a ISA driver for Linux")
 
 MODULE_VERSION (REPO_REVISION)
 
 module_param (iomem, uint, 0)
 
 MODULE_PARM_DESC (iomem,"ISA memory base (default 0xd0000)")
 
static void log_error (short board, short err)
 
static short roundUpRate (short rate)
 
static void arinc_timesync (struct timer_list *_tlist)
 
static void arinc_sweep (struct timer_list *tlist)
 
static int arinc_open (struct inode *inode, struct file *filp)
 
static long arinc_ioctl (struct file *filp, unsigned int cmd, unsigned long arg)
 
static unsigned int arinc_poll (struct file *filp, poll_table *wait)
 
static ssize_t arinc_read (struct file *filp, char __user *buf, size_t count, loff_t *pos)
 
static ssize_t arinc_write (struct file *filp, const char __user *buf, size_t count, loff_t *pos)
 
static int arinc_release (struct inode *inode, struct file *filp)
 
static void arinc_cleanup (void)
 
static int scan_ceiisa (void)
 
static int __init arinc_init (void)
 
 module_init (arinc_init)
 
 module_exit (arinc_cleanup)
 

Variables

unsigned int iomem = 0xd0000
 
static struct arinc_board board
 
static struct arinc_devchn_info = 0
 
static dev_t arinc_device = MKDEV(0, 0)
 
static struct cdev arinc_cdev
 
static struct file_operations arinc_fops
 

Macro Definition Documentation

#define ARINC_IOMEM_SIZE   (4096)

Referenced by arinc_cleanup(), and arinc_init().

#define ARINC_SAMPLE_QUEUE_SIZE   8

Referenced by arinc_open(), and arinc_sweep().

#define BOARD_NUM   0
#define DEVNAME_ARINC   "arinc"

Info for ARINC user devices.

#define REPO_REVISION   "unknown"

Referenced by arinc_init().

#define TIMESYNC_SECS   10

Referenced by arinc_init(), and arinc_timesync().

Function Documentation

static void arinc_cleanup ( void  )
static
static int __init arinc_init ( void  )
static
static long arinc_ioctl ( struct file *  filp,
unsigned int  cmd,
unsigned long  arg 
)
static
static int arinc_open ( struct inode *  inode,
struct file *  filp 
)
static
static unsigned int arinc_poll ( struct file *  filp,
poll_table *  wait 
)
static
static ssize_t arinc_read ( struct file *  filp,
char __user *  buf,
size_t  count,
loff_t *  pos 
)
static
static int arinc_release ( struct inode *  inode,
struct file *  filp 
)
static
static void arinc_sweep ( struct timer_list *  tlist)
static
static void arinc_timesync ( struct timer_list *  _tlist)
static
static ssize_t arinc_write ( struct file *  filp,
const char __user *  buf,
size_t  count,
loff_t *  pos 
)
static

References BOARD_NUM, err, log_error(), and N_ARINC_RX.

static void log_error ( short  board,
short  err 
)
static
MODULE_AUTHOR ( "John Wasinger <wasinger@ucar.edu>"  )
MODULE_DESCRIPTION ( "CEI420a ISA driver for Linux"  )
module_exit ( arinc_cleanup  )
module_init ( arinc_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( iomem  ,
uint  ,
 
)
MODULE_PARM_DESC ( iomem  ,
"ISA memory base (default 0xd0000)"   
)
MODULE_VERSION ( REPO_REVISION  )
static short roundUpRate ( short  rate)
static

References rate.

Referenced by arinc_ioctl().

static int scan_ceiisa ( void  )
static

Variable Documentation

struct cdev arinc_cdev
static

Referenced by arinc_cleanup(), and arinc_init().

dev_t arinc_device = MKDEV(0, 0)
static

Referenced by arinc_cleanup(), and arinc_init().

struct file_operations arinc_fops
static
Initial value:
= {
.owner = THIS_MODULE,
.open = arinc_open,
.unlocked_ioctl = arinc_ioctl,
.poll = arinc_poll,
.read = arinc_read,
.write = arinc_write,
.release = arinc_release,
.llseek = no_llseek,
}
static unsigned int arinc_poll(struct file *filp, poll_table *wait)
Definition: main.c:719
static long arinc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
Definition: main.c:471
static ssize_t arinc_write(struct file *filp, const char __user *buf, size_t count, loff_t *pos)
Definition: main.c:751
static int arinc_release(struct inode *inode, struct file *filp)
Definition: main.c:777
static int arinc_open(struct inode *inode, struct file *filp)
Definition: main.c:358
static ssize_t arinc_read(struct file *filp, char __user *buf, size_t count, loff_t *pos)
Definition: main.c:737
struct arinc_board board
static
struct arinc_dev* chn_info = 0
static
unsigned int iomem = 0xd0000

Referenced by arinc_init().