#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
-comedi_driver driver_pci9118={
+static comedi_driver driver_pci9118={
driver_name: "adl_pci9118",
module: THIS_MODULE,
attach: pci9118_attach,
==============================================================================
*/
-int check_channel_list(comedi_device * dev, comedi_subdevice * s, int n_chan,
+static int check_channel_list(comedi_device * dev, comedi_subdevice * s, int n_chan,
unsigned int *chanlist);
-int setup_channel_list(comedi_device * dev, comedi_subdevice * s, int n_chan,
+static int setup_channel_list(comedi_device * dev, comedi_subdevice * s, int n_chan,
unsigned int *chanlist,int rot);
-void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2);
+static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2);
static int pci9118_reset(comedi_device *dev);
-int pci9118_exttrg_add(comedi_device * dev, unsigned char source);
-int pci9118_exttrg_del(comedi_device * dev, unsigned char source);
-int pci9118_ai_cancel(comedi_device * dev, comedi_subdevice * s);
+static int pci9118_exttrg_add(comedi_device * dev, unsigned char source);
+static int pci9118_exttrg_del(comedi_device * dev, unsigned char source);
+static int pci9118_ai_cancel(comedi_device * dev, comedi_subdevice * s);
/*
==============================================================================
/*
==============================================================================
*/
-int pci9118_insn_read_ai(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
+static int pci9118_insn_read_ai(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
{
int n,timeout;
/*
==============================================================================
*/
-int pci9118_insn_write_ao(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
+static int pci9118_insn_write_ao(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
{
int n,chanreg,ch;
/*
==============================================================================
*/
-int pci9118_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int pci9118_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n,chan;
/*
==============================================================================
*/
-int pci9118_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
+static int pci9118_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
{
data[1] = inl(dev->iobase + PCI9118_DI) & 0xf;
/*
==============================================================================
*/
-int pci9118_insn_bits_do(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
+static int pci9118_insn_bits_do(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
{
if(data[0]){
s->state &= ~data[0];
/*
==============================================================================
*/
-int check_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
int n_chan, unsigned int *chanlist)
{
unsigned int i, differencial=0, bipolar=0;
return 1;
}
-int setup_channel_list(comedi_device * dev, comedi_subdevice * s, int n_chan,
+static int setup_channel_list(comedi_device * dev, comedi_subdevice * s, int n_chan,
unsigned int *chanlist,int rot)
{
unsigned int i, differencial=0, bipolar=0;
/*
==============================================================================
*/
-void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2)
+static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2)
{
outl(0x74, dev->iobase + PCI9118_CNTCTRL);
outl(0x30, dev->iobase + PCI9118_CNTCTRL);
/*
==============================================================================
*/
-int pci9118_exttrg_add(comedi_device * dev, unsigned char source)
+static int pci9118_exttrg_add(comedi_device * dev, unsigned char source)
{
if (source>3) return -1; // incorrect source
devpriv->exttrg_users|=(1<<source);
/*
==============================================================================
*/
-int pci9118_exttrg_del(comedi_device * dev, unsigned char source)
+static int pci9118_exttrg_del(comedi_device * dev, unsigned char source)
{
if (source>3) return -1; // incorrect source
devpriv->exttrg_users&=~(1<<source);
/*
==============================================================================
*/
-int pci9118_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_cancel(comedi_device * dev, comedi_subdevice * s)
{
outl(inl(devpriv->iobase_a+AMCC_OP_REG_INTCSR)&(~AINT_WRITE_COMPL), devpriv->iobase_a+AMCC_OP_REG_INTCSR); // stop amcc irqs
outl(inl(devpriv->iobase_a+AMCC_OP_REG_MCSR)&(~EN_A2P_TRANSFERS), devpriv->iobase_a+AMCC_OP_REG_MCSR); // stop DMA
#define Syncont_SC0 1 /* set synchronous output mode */
-comedi_lrange range_pci1710_3={ 9, {
+static comedi_lrange range_pci1710_3={ 9, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
static char range_codes_pci1710_3[]={0x00, 0x01, 0x02, 0x03, 0x04, 0x10, 0x11, 0x12, 0x13 };
-comedi_lrange range_pci1710hg={ 12, {
+static comedi_lrange range_pci1710hg={ 12, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
static char range_codes_pci1710hg[]={0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12, 0x13 };
-comedi_lrange range_pci17x1={ 5, {
+static comedi_lrange range_pci17x1={ 5, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
static char range_codes_pci17x1[]={0x00, 0x01, 0x02, 0x03, 0x04 };
-comedi_lrange range_pci1720={ 4, {
+static comedi_lrange range_pci1720={ 4, {
UNI_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(5),
}
};
-comedi_lrange range_pci171x_da={ 2, {
+static comedi_lrange range_pci171x_da={ 2, {
UNI_RANGE(5),
UNI_RANGE(10),
}
#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
-comedi_driver driver_pci1710={
+static comedi_driver driver_pci1710={
driver_name: "adv_pci1710",
module: THIS_MODULE,
attach: pci1710_attach,
==============================================================================
*/
-int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan);
-void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist,
+static int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan);
+static void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist,
unsigned int n_chan, unsigned int seglen);
-void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2);
+static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2);
static int pci1710_reset(comedi_device *dev);
-int pci171x_ai_cancel(comedi_device * dev, comedi_subdevice * s);
+static int pci171x_ai_cancel(comedi_device * dev, comedi_subdevice * s);
static unsigned int muxonechan[] ={ 0x0000, 0x0101, 0x0202, 0x0303, 0x0404, 0x0505, 0x0606, 0x0707, // used for gain list programming
0x0808, 0x0909, 0x0a0a, 0x0b0b, 0x0c0c, 0x0d0d, 0x0e0e, 0x0f0f,
/*
==============================================================================
*/
-int pci171x_insn_read_ai(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int pci171x_insn_read_ai(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n,timeout;
#ifdef PCI171x_PARANOIDCHECK
/*
==============================================================================
*/
-int pci171x_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int pci171x_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n,chan,range,ofs;
/*
==============================================================================
*/
-int pci171x_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int pci171x_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n,chan;
/*
==============================================================================
*/
-int pci171x_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
+static int pci171x_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
{
data[1] = inw(dev->iobase + PCI171x_DI);
/*
==============================================================================
*/
-int pci171x_insn_bits_do(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
+static int pci171x_insn_bits_do(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data)
{
if(data[0]){
s->state &= ~data[0];
/*
==============================================================================
*/
-int pci1720_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int pci1720_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n,rangereg,chan;
/*
==============================================================================
*/
-void pci171x_cmdtest_out(int e,comedi_cmd *cmd) {
+static void pci171x_cmdtest_out(int e,comedi_cmd *cmd) {
rt_printk("adv_pci1710 e=%d startsrc=%x scansrc=%x convsrc=%x\n",e,cmd->start_src,cmd->scan_begin_src,cmd->convert_src);
rt_printk("adv_pci1710 e=%d startarg=%d scanarg=%d convarg=%d\n",e,cmd->start_arg,cmd->scan_begin_arg,cmd->convert_arg);
rt_printk("adv_pci1710 e=%d stopsrc=%x scanend=%x\n",e,cmd->stop_src,cmd->scan_end_src);
If it's ok, then program scan/gain logic.
This works for all cards.
*/
-int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan)
+static int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan)
{
unsigned int chansegment[32];
unsigned int i, nowmustbechan, seglen, segpos;
return seglen;
}
-void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist,
+static void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist,
unsigned int n_chan, unsigned int seglen)
{
unsigned int i, range, chanprog;
/*
==============================================================================
*/
-void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2)
+static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1, unsigned int divisor2)
{
DPRINTK("adv_pci1710 EDBG: BGN: start_pacer(%d,%u,%u)\n",mode,divisor1,divisor2);
outw(0xb4, dev->iobase + PCI171x_CNTCTRL);
/*
==============================================================================
*/
-int pci171x_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci171x_ai_cancel(comedi_device * dev, comedi_subdevice * s)
{
DPRINTK("adv_pci1710 EDBG: BGN: pci171x_ai_cancel(...)\n");