Staging: comedi: Change "foo * bar" to "foo *bar"
Removes checkpatch.pl errors Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b6c777571b
commit
e473e9120b
|
@ -47,13 +47,13 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
static int postconfig(comedi_device * dev);
|
||||
static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int postconfig(comedi_device *dev);
|
||||
static int insn_rw_emulate_bits(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static void *comedi_recognize(comedi_driver * driv, const char *name);
|
||||
static void comedi_report_boards(comedi_driver * driv);
|
||||
static int poll_invalid(comedi_device * dev, comedi_subdevice * s);
|
||||
int comedi_buf_alloc(comedi_device * dev, comedi_subdevice * s,
|
||||
static void comedi_report_boards(comedi_driver *driv);
|
||||
static int poll_invalid(comedi_device *dev, comedi_subdevice *s);
|
||||
int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned long new_size);
|
||||
|
||||
comedi_driver *comedi_drivers;
|
||||
|
@ -63,7 +63,7 @@ int comedi_modprobe(int minor)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static void cleanup_device(comedi_device * dev)
|
||||
static void cleanup_device(comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
comedi_subdevice *s;
|
||||
|
@ -97,7 +97,7 @@ static void cleanup_device(comedi_device * dev)
|
|||
comedi_set_hw_dev(dev, NULL);
|
||||
}
|
||||
|
||||
static void __comedi_device_detach(comedi_device * dev)
|
||||
static void __comedi_device_detach(comedi_device *dev)
|
||||
{
|
||||
dev->attached = 0;
|
||||
if (dev->driver) {
|
||||
|
@ -108,14 +108,14 @@ static void __comedi_device_detach(comedi_device * dev)
|
|||
cleanup_device(dev);
|
||||
}
|
||||
|
||||
void comedi_device_detach(comedi_device * dev)
|
||||
void comedi_device_detach(comedi_device *dev)
|
||||
{
|
||||
if (!dev->attached)
|
||||
return;
|
||||
__comedi_device_detach(dev);
|
||||
}
|
||||
|
||||
int comedi_device_attach(comedi_device * dev, comedi_devconfig * it)
|
||||
int comedi_device_attach(comedi_device *dev, comedi_devconfig *it)
|
||||
{
|
||||
comedi_driver *driv;
|
||||
int ret;
|
||||
|
@ -182,7 +182,7 @@ attached:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int comedi_driver_register(comedi_driver * driver)
|
||||
int comedi_driver_register(comedi_driver *driver)
|
||||
{
|
||||
driver->next = comedi_drivers;
|
||||
comedi_drivers = driver;
|
||||
|
@ -190,7 +190,7 @@ int comedi_driver_register(comedi_driver * driver)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int comedi_driver_unregister(comedi_driver * driver)
|
||||
int comedi_driver_unregister(comedi_driver *driver)
|
||||
{
|
||||
comedi_driver *prev;
|
||||
int i;
|
||||
|
@ -226,7 +226,7 @@ int comedi_driver_unregister(comedi_driver * driver)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int postconfig(comedi_device * dev)
|
||||
static int postconfig(comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
comedi_subdevice *s;
|
||||
|
@ -315,7 +315,7 @@ void *comedi_recognize(comedi_driver * driv, const char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void comedi_report_boards(comedi_driver * driv)
|
||||
void comedi_report_boards(comedi_driver *driv)
|
||||
{
|
||||
unsigned int i;
|
||||
const char *const *name_ptr;
|
||||
|
@ -333,19 +333,19 @@ void comedi_report_boards(comedi_driver * driv)
|
|||
printk(" %s\n", driv->driver_name);
|
||||
}
|
||||
|
||||
static int poll_invalid(comedi_device * dev, comedi_subdevice * s)
|
||||
static int poll_invalid(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int insn_inval(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
int insn_inval(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int insn_rw_emulate_bits(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
comedi_insn new_insn;
|
||||
int ret;
|
||||
|
@ -381,7 +381,7 @@ static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline unsigned long uvirt_to_kva(pgd_t * pgd, unsigned long adr)
|
||||
static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
|
||||
{
|
||||
unsigned long ret = 0UL;
|
||||
pmd_t *pmd;
|
||||
|
@ -414,7 +414,7 @@ static inline unsigned long kvirt_to_kva(unsigned long adr)
|
|||
return kva;
|
||||
}
|
||||
|
||||
int comedi_buf_alloc(comedi_device * dev, comedi_subdevice * s,
|
||||
int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned long new_size)
|
||||
{
|
||||
comedi_async *async = s->async;
|
||||
|
@ -538,7 +538,7 @@ int comedi_buf_alloc(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
/* munging is applied to data by core as it passes between user
|
||||
* and kernel space */
|
||||
unsigned int comedi_buf_munge(comedi_async * async, unsigned int num_bytes)
|
||||
unsigned int comedi_buf_munge(comedi_async *async, unsigned int num_bytes)
|
||||
{
|
||||
comedi_subdevice *s = async->subdevice;
|
||||
unsigned int count = 0;
|
||||
|
@ -582,7 +582,7 @@ unsigned int comedi_buf_munge(comedi_async * async, unsigned int num_bytes)
|
|||
return count;
|
||||
}
|
||||
|
||||
unsigned int comedi_buf_write_n_available(comedi_async * async)
|
||||
unsigned int comedi_buf_write_n_available(comedi_async *async)
|
||||
{
|
||||
unsigned int free_end;
|
||||
unsigned int nbytes;
|
||||
|
@ -602,7 +602,7 @@ unsigned int comedi_buf_write_n_available(comedi_async * async)
|
|||
}
|
||||
|
||||
/* allocates chunk for the writer from free buffer space */
|
||||
unsigned int comedi_buf_write_alloc(comedi_async * async, unsigned int nbytes)
|
||||
unsigned int comedi_buf_write_alloc(comedi_async *async, unsigned int nbytes)
|
||||
{
|
||||
unsigned int free_end = async->buf_read_count + async->prealloc_bufsz;
|
||||
|
||||
|
@ -617,7 +617,7 @@ unsigned int comedi_buf_write_alloc(comedi_async * async, unsigned int nbytes)
|
|||
}
|
||||
|
||||
/* allocates nothing unless it can completely fulfill the request */
|
||||
unsigned int comedi_buf_write_alloc_strict(comedi_async * async,
|
||||
unsigned int comedi_buf_write_alloc_strict(comedi_async *async,
|
||||
unsigned int nbytes)
|
||||
{
|
||||
unsigned int free_end = async->buf_read_count + async->prealloc_bufsz;
|
||||
|
@ -633,7 +633,7 @@ unsigned int comedi_buf_write_alloc_strict(comedi_async * async,
|
|||
}
|
||||
|
||||
/* transfers a chunk from writer to filled buffer space */
|
||||
unsigned comedi_buf_write_free(comedi_async * async, unsigned int nbytes)
|
||||
unsigned comedi_buf_write_free(comedi_async *async, unsigned int nbytes)
|
||||
{
|
||||
if ((int)(async->buf_write_count + nbytes -
|
||||
async->buf_write_alloc_count) > 0) {
|
||||
|
@ -651,7 +651,7 @@ unsigned comedi_buf_write_free(comedi_async * async, unsigned int nbytes)
|
|||
}
|
||||
|
||||
/* allocates a chunk for the reader from filled (and munged) buffer space */
|
||||
unsigned comedi_buf_read_alloc(comedi_async * async, unsigned nbytes)
|
||||
unsigned comedi_buf_read_alloc(comedi_async *async, unsigned nbytes)
|
||||
{
|
||||
if ((int)(async->buf_read_alloc_count + nbytes - async->munge_count) >
|
||||
0) {
|
||||
|
@ -665,7 +665,7 @@ unsigned comedi_buf_read_alloc(comedi_async * async, unsigned nbytes)
|
|||
}
|
||||
|
||||
/* transfers control of a chunk from reader to free buffer space */
|
||||
unsigned comedi_buf_read_free(comedi_async * async, unsigned int nbytes)
|
||||
unsigned comedi_buf_read_free(comedi_async *async, unsigned int nbytes)
|
||||
{
|
||||
/* barrier insures data has been read out of buffer before read count is incremented */
|
||||
smp_mb();
|
||||
|
@ -681,7 +681,7 @@ unsigned comedi_buf_read_free(comedi_async * async, unsigned int nbytes)
|
|||
return nbytes;
|
||||
}
|
||||
|
||||
void comedi_buf_memcpy_to(comedi_async * async, unsigned int offset,
|
||||
void comedi_buf_memcpy_to(comedi_async *async, unsigned int offset,
|
||||
const void *data, unsigned int num_bytes)
|
||||
{
|
||||
unsigned int write_ptr = async->buf_write_ptr + offset;
|
||||
|
@ -706,7 +706,7 @@ void comedi_buf_memcpy_to(comedi_async * async, unsigned int offset,
|
|||
}
|
||||
}
|
||||
|
||||
void comedi_buf_memcpy_from(comedi_async * async, unsigned int offset,
|
||||
void comedi_buf_memcpy_from(comedi_async *async, unsigned int offset,
|
||||
void *dest, unsigned int nbytes)
|
||||
{
|
||||
void *src;
|
||||
|
@ -732,7 +732,7 @@ void comedi_buf_memcpy_from(comedi_async * async, unsigned int offset,
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int comedi_buf_read_n_available(comedi_async * async)
|
||||
unsigned int comedi_buf_read_n_available(comedi_async *async)
|
||||
{
|
||||
unsigned num_bytes;
|
||||
|
||||
|
@ -747,7 +747,7 @@ unsigned int comedi_buf_read_n_available(comedi_async * async)
|
|||
return num_bytes;
|
||||
}
|
||||
|
||||
int comedi_buf_get(comedi_async * async, sampl_t * x)
|
||||
int comedi_buf_get(comedi_async *async, sampl_t *x)
|
||||
{
|
||||
unsigned int n = comedi_buf_read_n_available(async);
|
||||
|
||||
|
@ -759,7 +759,7 @@ int comedi_buf_get(comedi_async * async, sampl_t * x)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int comedi_buf_put(comedi_async * async, sampl_t x)
|
||||
int comedi_buf_put(comedi_async *async, sampl_t x)
|
||||
{
|
||||
unsigned int n = comedi_buf_write_alloc_strict(async, sizeof(sampl_t));
|
||||
|
||||
|
@ -772,7 +772,7 @@ int comedi_buf_put(comedi_async * async, sampl_t x)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void comedi_reset_async_buf(comedi_async * async)
|
||||
void comedi_reset_async_buf(comedi_async *async)
|
||||
{
|
||||
async->buf_write_alloc_count = 0;
|
||||
async->buf_write_count = 0;
|
||||
|
|
|
@ -123,8 +123,8 @@ static const char range_codes_analog[] = { 0x00, 0x20, 0x10, 0x30 };
|
|||
Forward declarations
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_attach(comedi_device * dev, comedi_devconfig * it);
|
||||
static int icp_multi_detach(comedi_device * dev);
|
||||
static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it);
|
||||
static int icp_multi_detach(comedi_device *dev);
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
@ -214,12 +214,12 @@ typedef struct {
|
|||
*/
|
||||
|
||||
#if 0
|
||||
static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
|
||||
static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan);
|
||||
#endif
|
||||
static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
|
||||
static void setup_channel_list(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan);
|
||||
static int icp_multi_reset(comedi_device * dev);
|
||||
static int icp_multi_reset(comedi_device *dev);
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
@ -245,8 +245,8 @@ static int icp_multi_reset(comedi_device * dev);
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int icp_multi_insn_read_ai(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int n, timeout;
|
||||
|
||||
|
@ -364,8 +364,8 @@ static int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int icp_multi_insn_write_ao(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int n, chan, range, timeout;
|
||||
|
||||
|
@ -472,8 +472,8 @@ static int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int icp_multi_insn_read_ao(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int n, chan;
|
||||
|
||||
|
@ -505,8 +505,8 @@ static int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int icp_multi_insn_bits_di(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
data[1] = readw(devpriv->io_addr + ICP_MULTI_DI);
|
||||
|
||||
|
@ -531,8 +531,8 @@ static int icp_multi_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int icp_multi_insn_bits_do(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
#ifdef ICP_MULTI_EXTDEBUG
|
||||
printk("icp multi EDBG: BGN: icp_multi_insn_bits_do(...)\n");
|
||||
|
@ -573,8 +573,8 @@ static int icp_multi_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int icp_multi_insn_read_ctr(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -597,8 +597,8 @@ static int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_insn_write_ctr(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int icp_multi_insn_write_ctr(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d PT_REGS_ARG)
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
|
||||
static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan)
|
||||
{
|
||||
unsigned int i;
|
||||
|
@ -743,7 +743,7 @@ static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
|
||||
static void setup_channel_list(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan)
|
||||
{
|
||||
unsigned int i, range, chanprog;
|
||||
|
@ -812,7 +812,7 @@ static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_reset(comedi_device * dev)
|
||||
static int icp_multi_reset(comedi_device *dev)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -870,7 +870,7 @@ static int icp_multi_reset(comedi_device * dev)
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_attach(comedi_device * dev, comedi_devconfig * it)
|
||||
static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
int ret, subdev, n_subdevices;
|
||||
|
@ -1061,7 +1061,7 @@ static int icp_multi_attach(comedi_device * dev, comedi_devconfig * it)
|
|||
|
||||
==============================================================================
|
||||
*/
|
||||
static int icp_multi_detach(comedi_device * dev)
|
||||
static int icp_multi_detach(comedi_device *dev)
|
||||
{
|
||||
|
||||
if (dev->private)
|
||||
|
|
|
@ -118,8 +118,8 @@ static const me4000_board_t me4000_boards[] = {
|
|||
/*-----------------------------------------------------------------------------
|
||||
Comedi function prototypes
|
||||
---------------------------------------------------------------------------*/
|
||||
static int me4000_attach(comedi_device * dev, comedi_devconfig * it);
|
||||
static int me4000_detach(comedi_device * dev);
|
||||
static int me4000_attach(comedi_device *dev, comedi_devconfig *it);
|
||||
static int me4000_detach(comedi_device *dev);
|
||||
static comedi_driver driver_me4000 = {
|
||||
driver_name:"me4000",
|
||||
module:THIS_MODULE,
|
||||
|
@ -130,91 +130,91 @@ static comedi_driver driver_me4000 = {
|
|||
/*-----------------------------------------------------------------------------
|
||||
Meilhaus function prototypes
|
||||
---------------------------------------------------------------------------*/
|
||||
static int me4000_probe(comedi_device * dev, comedi_devconfig * it);
|
||||
static int get_registers(comedi_device * dev, struct pci_dev *pci_dev_p);
|
||||
static int init_board_info(comedi_device * dev, struct pci_dev *pci_dev_p);
|
||||
static int init_ao_context(comedi_device * dev);
|
||||
static int init_ai_context(comedi_device * dev);
|
||||
static int init_dio_context(comedi_device * dev);
|
||||
static int init_cnt_context(comedi_device * dev);
|
||||
static int xilinx_download(comedi_device * dev);
|
||||
static int reset_board(comedi_device * dev);
|
||||
static int me4000_probe(comedi_device *dev, comedi_devconfig *it);
|
||||
static int get_registers(comedi_device *dev, struct pci_dev *pci_dev_p);
|
||||
static int init_board_info(comedi_device *dev, struct pci_dev *pci_dev_p);
|
||||
static int init_ao_context(comedi_device *dev);
|
||||
static int init_ai_context(comedi_device *dev);
|
||||
static int init_dio_context(comedi_device *dev);
|
||||
static int init_cnt_context(comedi_device *dev);
|
||||
static int xilinx_download(comedi_device *dev);
|
||||
static int reset_board(comedi_device *dev);
|
||||
|
||||
static int me4000_dio_insn_bits(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_dio_insn_bits(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
static int me4000_dio_insn_config(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_dio_insn_config(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
static int cnt_reset(comedi_device * dev, unsigned int channel);
|
||||
static int cnt_reset(comedi_device *dev, unsigned int channel);
|
||||
|
||||
static int cnt_config(comedi_device * dev,
|
||||
static int cnt_config(comedi_device *dev,
|
||||
unsigned int channel, unsigned int mode);
|
||||
|
||||
static int me4000_cnt_insn_config(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_cnt_insn_config(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
static int me4000_cnt_insn_write(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_cnt_insn_write(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
static int me4000_cnt_insn_read(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_cnt_insn_read(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
static int me4000_ai_insn_read(comedi_device * dev,
|
||||
comedi_subdevice * subdevice, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_ai_insn_read(comedi_device *dev,
|
||||
comedi_subdevice *subdevice, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
static int me4000_ai_cancel(comedi_device * dev, comedi_subdevice * s);
|
||||
static int me4000_ai_cancel(comedi_device *dev, comedi_subdevice *s);
|
||||
|
||||
static int ai_check_chanlist(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_cmd * cmd);
|
||||
static int ai_check_chanlist(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_cmd *cmd);
|
||||
|
||||
static int ai_round_cmd_args(comedi_device * dev,
|
||||
comedi_subdevice * s,
|
||||
comedi_cmd * cmd,
|
||||
static int ai_round_cmd_args(comedi_device *dev,
|
||||
comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
unsigned int *init_ticks,
|
||||
unsigned int *scan_ticks, unsigned int *chan_ticks);
|
||||
|
||||
static int ai_prepare(comedi_device * dev,
|
||||
comedi_subdevice * s,
|
||||
comedi_cmd * cmd,
|
||||
static int ai_prepare(comedi_device *dev,
|
||||
comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
unsigned int init_ticks,
|
||||
unsigned int scan_ticks, unsigned int chan_ticks);
|
||||
|
||||
static int ai_write_chanlist(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_cmd * cmd);
|
||||
static int ai_write_chanlist(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_cmd *cmd);
|
||||
|
||||
static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG);
|
||||
|
||||
static int me4000_ai_do_cmd_test(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_cmd * cmd);
|
||||
static int me4000_ai_do_cmd_test(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_cmd *cmd);
|
||||
|
||||
static int me4000_ai_do_cmd(comedi_device * dev, comedi_subdevice * s);
|
||||
static int me4000_ai_do_cmd(comedi_device *dev, comedi_subdevice *s);
|
||||
|
||||
static int me4000_ao_insn_write(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_ao_insn_write(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
static int me4000_ao_insn_read(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data);
|
||||
static int me4000_ao_insn_read(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data);
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
Meilhaus inline functions
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
static inline void me4000_outb(comedi_device * dev, unsigned char value,
|
||||
static inline void me4000_outb(comedi_device *dev, unsigned char value,
|
||||
unsigned long port)
|
||||
{
|
||||
PORT_PDEBUG("--> 0x%02X port 0x%04lX\n", value, port);
|
||||
outb(value, port);
|
||||
}
|
||||
|
||||
static inline void me4000_outl(comedi_device * dev, unsigned long value,
|
||||
static inline void me4000_outl(comedi_device *dev, unsigned long value,
|
||||
unsigned long port)
|
||||
{
|
||||
PORT_PDEBUG("--> 0x%08lX port 0x%04lX\n", value, port);
|
||||
outl(value, port);
|
||||
}
|
||||
|
||||
static inline unsigned long me4000_inl(comedi_device * dev, unsigned long port)
|
||||
static inline unsigned long me4000_inl(comedi_device *dev, unsigned long port)
|
||||
{
|
||||
unsigned long value;
|
||||
value = inl(port);
|
||||
|
@ -222,7 +222,7 @@ static inline unsigned long me4000_inl(comedi_device * dev, unsigned long port)
|
|||
return value;
|
||||
}
|
||||
|
||||
static inline unsigned char me4000_inb(comedi_device * dev, unsigned long port)
|
||||
static inline unsigned char me4000_inb(comedi_device *dev, unsigned long port)
|
||||
{
|
||||
unsigned char value;
|
||||
value = inb(port);
|
||||
|
@ -247,7 +247,7 @@ static const comedi_lrange me4000_ao_range = {
|
|||
}
|
||||
};
|
||||
|
||||
static int me4000_attach(comedi_device * dev, comedi_devconfig * it)
|
||||
static int me4000_attach(comedi_device *dev, comedi_devconfig *it)
|
||||
{
|
||||
comedi_subdevice *s;
|
||||
int result;
|
||||
|
@ -369,7 +369,7 @@ static int me4000_attach(comedi_device * dev, comedi_devconfig * it)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int me4000_probe(comedi_device * dev, comedi_devconfig * it)
|
||||
static int me4000_probe(comedi_device *dev, comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pci_device;
|
||||
int result, i;
|
||||
|
@ -512,7 +512,7 @@ static int me4000_probe(comedi_device * dev, comedi_devconfig * it)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int get_registers(comedi_device * dev, struct pci_dev *pci_dev_p)
|
||||
static int get_registers(comedi_device *dev, struct pci_dev *pci_dev_p)
|
||||
{
|
||||
|
||||
CALL_PDEBUG("In get_registers()\n");
|
||||
|
@ -564,7 +564,7 @@ static int get_registers(comedi_device * dev, struct pci_dev *pci_dev_p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int init_board_info(comedi_device * dev, struct pci_dev *pci_dev_p)
|
||||
static int init_board_info(comedi_device *dev, struct pci_dev *pci_dev_p)
|
||||
{
|
||||
int result;
|
||||
|
||||
|
@ -598,7 +598,7 @@ static int init_board_info(comedi_device * dev, struct pci_dev *pci_dev_p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int init_ao_context(comedi_device * dev)
|
||||
static int init_ao_context(comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -681,7 +681,7 @@ static int init_ao_context(comedi_device * dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int init_ai_context(comedi_device * dev)
|
||||
static int init_ai_context(comedi_device *dev)
|
||||
{
|
||||
|
||||
CALL_PDEBUG("In init_ai_context()\n");
|
||||
|
@ -715,7 +715,7 @@ static int init_ai_context(comedi_device * dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int init_dio_context(comedi_device * dev)
|
||||
static int init_dio_context(comedi_device *dev)
|
||||
{
|
||||
|
||||
CALL_PDEBUG("In init_dio_context()\n");
|
||||
|
@ -734,7 +734,7 @@ static int init_dio_context(comedi_device * dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int init_cnt_context(comedi_device * dev)
|
||||
static int init_cnt_context(comedi_device *dev)
|
||||
{
|
||||
|
||||
CALL_PDEBUG("In init_cnt_context()\n");
|
||||
|
@ -755,7 +755,7 @@ static int init_cnt_context(comedi_device * dev)
|
|||
extern unsigned char *xilinx_firm;
|
||||
#endif
|
||||
|
||||
static int xilinx_download(comedi_device * dev)
|
||||
static int xilinx_download(comedi_device *dev)
|
||||
{
|
||||
u32 value = 0;
|
||||
wait_queue_head_t queue;
|
||||
|
@ -837,7 +837,7 @@ static int xilinx_download(comedi_device * dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int reset_board(comedi_device * dev)
|
||||
static int reset_board(comedi_device *dev)
|
||||
{
|
||||
unsigned long icr;
|
||||
|
||||
|
@ -895,7 +895,7 @@ static int reset_board(comedi_device * dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int me4000_detach(comedi_device * dev)
|
||||
static int me4000_detach(comedi_device *dev)
|
||||
{
|
||||
CALL_PDEBUG("In me4000_detach()\n");
|
||||
|
||||
|
@ -916,8 +916,8 @@ static int me4000_detach(comedi_device * dev)
|
|||
Analog input section
|
||||
===========================================================================*/
|
||||
|
||||
static int me4000_ai_insn_read(comedi_device * dev,
|
||||
comedi_subdevice * subdevice, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_ai_insn_read(comedi_device *dev,
|
||||
comedi_subdevice *subdevice, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
@ -1040,7 +1040,7 @@ static int me4000_ai_insn_read(comedi_device * dev,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int me4000_ai_cancel(comedi_device * dev, comedi_subdevice * s)
|
||||
static int me4000_ai_cancel(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
|
@ -1057,8 +1057,8 @@ static int me4000_ai_cancel(comedi_device * dev, comedi_subdevice * s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ai_check_chanlist(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_cmd * cmd)
|
||||
static int ai_check_chanlist(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_cmd *cmd)
|
||||
{
|
||||
int aref;
|
||||
int i;
|
||||
|
@ -1138,9 +1138,9 @@ static int ai_check_chanlist(comedi_device * dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ai_round_cmd_args(comedi_device * dev,
|
||||
comedi_subdevice * s,
|
||||
comedi_cmd * cmd,
|
||||
static int ai_round_cmd_args(comedi_device *dev,
|
||||
comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
unsigned int *init_ticks,
|
||||
unsigned int *scan_ticks, unsigned int *chan_ticks)
|
||||
{
|
||||
|
@ -1207,7 +1207,7 @@ static int ai_round_cmd_args(comedi_device * dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void ai_write_timer(comedi_device * dev,
|
||||
static void ai_write_timer(comedi_device *dev,
|
||||
unsigned int init_ticks,
|
||||
unsigned int scan_ticks, unsigned int chan_ticks)
|
||||
{
|
||||
|
@ -1228,9 +1228,9 @@ static void ai_write_timer(comedi_device * dev,
|
|||
me4000_outl(dev, chan_ticks - 1, info->ai_context.chan_timer_reg);
|
||||
}
|
||||
|
||||
static int ai_prepare(comedi_device * dev,
|
||||
comedi_subdevice * s,
|
||||
comedi_cmd * cmd,
|
||||
static int ai_prepare(comedi_device *dev,
|
||||
comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
unsigned int init_ticks,
|
||||
unsigned int scan_ticks, unsigned int chan_ticks)
|
||||
{
|
||||
|
@ -1297,8 +1297,8 @@ static int ai_prepare(comedi_device * dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ai_write_chanlist(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_cmd * cmd)
|
||||
static int ai_write_chanlist(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int entry;
|
||||
unsigned int chan;
|
||||
|
@ -1337,7 +1337,7 @@ static int ai_write_chanlist(comedi_device * dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int me4000_ai_do_cmd(comedi_device * dev, comedi_subdevice * s)
|
||||
static int me4000_ai_do_cmd(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
int err;
|
||||
unsigned int init_ticks = 0;
|
||||
|
@ -1381,8 +1381,8 @@ static int me4000_ai_do_cmd(comedi_device * dev, comedi_subdevice * s)
|
|||
* - invalid chanlist
|
||||
* So I tried to adopt this scheme.
|
||||
*/
|
||||
static int me4000_ai_do_cmd_test(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_cmd * cmd)
|
||||
static int me4000_ai_do_cmd_test(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_cmd *cmd)
|
||||
{
|
||||
|
||||
unsigned int init_ticks;
|
||||
|
@ -1911,8 +1911,8 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG)
|
|||
Analog output section
|
||||
===========================================================================*/
|
||||
|
||||
static int me4000_ao_insn_write(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_ao_insn_write(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
@ -1969,8 +1969,8 @@ static int me4000_ao_insn_write(comedi_device * dev,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int me4000_ao_insn_read(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_ao_insn_read(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
||||
|
@ -1990,8 +1990,8 @@ static int me4000_ao_insn_read(comedi_device * dev,
|
|||
Digital I/O section
|
||||
===========================================================================*/
|
||||
|
||||
static int me4000_dio_insn_bits(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_dio_insn_bits(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
CALL_PDEBUG("In me4000_dio_insn_bits()\n");
|
||||
|
@ -2041,8 +2041,8 @@ static int me4000_dio_insn_bits(comedi_device * dev,
|
|||
return 2;
|
||||
}
|
||||
|
||||
static int me4000_dio_insn_config(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_dio_insn_config(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
unsigned long tmp;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
@ -2135,7 +2135,7 @@ static int me4000_dio_insn_config(comedi_device * dev,
|
|||
Counter section
|
||||
===========================================================================*/
|
||||
|
||||
static int cnt_reset(comedi_device * dev, unsigned int channel)
|
||||
static int cnt_reset(comedi_device *dev, unsigned int channel)
|
||||
{
|
||||
|
||||
CALL_PDEBUG("In cnt_reset()\n");
|
||||
|
@ -2166,7 +2166,7 @@ static int cnt_reset(comedi_device * dev, unsigned int channel)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cnt_config(comedi_device * dev, unsigned int channel,
|
||||
static int cnt_config(comedi_device *dev, unsigned int channel,
|
||||
unsigned int mode)
|
||||
{
|
||||
int tmp = 0;
|
||||
|
@ -2223,8 +2223,8 @@ static int cnt_config(comedi_device * dev, unsigned int channel,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int me4000_cnt_insn_config(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_cnt_insn_config(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
int err;
|
||||
|
@ -2266,8 +2266,8 @@ static int me4000_cnt_insn_config(comedi_device * dev,
|
|||
return 2;
|
||||
}
|
||||
|
||||
static int me4000_cnt_insn_read(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_cnt_insn_read(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
unsigned short tmp;
|
||||
|
@ -2313,8 +2313,8 @@ static int me4000_cnt_insn_read(comedi_device * dev,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int me4000_cnt_insn_write(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int me4000_cnt_insn_write(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
unsigned short tmp;
|
||||
|
|
|
@ -103,7 +103,7 @@ static void dump_chip_signature(u32 csigr_bits)
|
|||
printk("mite: num channels = %i, write post fifo depth = %i, wins = %i, iowins = %i\n", mite_csigr_dmac(csigr_bits), mite_csigr_wpdep(csigr_bits), mite_csigr_wins(csigr_bits), mite_csigr_iowins(csigr_bits));
|
||||
}
|
||||
|
||||
unsigned mite_fifo_size(struct mite_struct * mite, unsigned channel)
|
||||
unsigned mite_fifo_size(struct mite_struct *mite, unsigned channel)
|
||||
{
|
||||
unsigned fcr_bits = readl(mite->mite_io_addr +
|
||||
MITE_FCR(channel));
|
||||
|
@ -459,7 +459,7 @@ u32 mite_device_bytes_transferred(struct mite_channel *mite_chan)
|
|||
return readl(mite->mite_io_addr + MITE_DAR(mite_chan->channel));
|
||||
}
|
||||
|
||||
u32 mite_bytes_in_transit(struct mite_channel * mite_chan)
|
||||
u32 mite_bytes_in_transit(struct mite_channel *mite_chan)
|
||||
{
|
||||
struct mite_struct *mite = mite_chan->mite;
|
||||
return readl(mite->mite_io_addr +
|
||||
|
@ -467,7 +467,7 @@ u32 mite_bytes_in_transit(struct mite_channel * mite_chan)
|
|||
}
|
||||
|
||||
/* returns lower bound for number of bytes transferred from device to memory */
|
||||
u32 mite_bytes_written_to_memory_lb(struct mite_channel * mite_chan)
|
||||
u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan)
|
||||
{
|
||||
u32 device_byte_count;
|
||||
|
||||
|
@ -476,7 +476,7 @@ u32 mite_bytes_written_to_memory_lb(struct mite_channel * mite_chan)
|
|||
}
|
||||
|
||||
/* returns upper bound for number of bytes transferred from device to memory */
|
||||
u32 mite_bytes_written_to_memory_ub(struct mite_channel * mite_chan)
|
||||
u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan)
|
||||
{
|
||||
u32 in_transit_count;
|
||||
|
||||
|
@ -485,7 +485,7 @@ u32 mite_bytes_written_to_memory_ub(struct mite_channel * mite_chan)
|
|||
}
|
||||
|
||||
/* returns lower bound for number of bytes read from memory for transfer to device */
|
||||
u32 mite_bytes_read_from_memory_lb(struct mite_channel * mite_chan)
|
||||
u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan)
|
||||
{
|
||||
u32 device_byte_count;
|
||||
|
||||
|
@ -494,7 +494,7 @@ u32 mite_bytes_read_from_memory_lb(struct mite_channel * mite_chan)
|
|||
}
|
||||
|
||||
/* returns upper bound for number of bytes read from memory for transfer to device */
|
||||
u32 mite_bytes_read_from_memory_ub(struct mite_channel * mite_chan)
|
||||
u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan)
|
||||
{
|
||||
u32 in_transit_count;
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ void mite_setregs(struct mite_struct *mite, unsigned long ll_start, int chan,
|
|||
void mite_prep_dma(struct mite_channel *mite_chan,
|
||||
unsigned int num_device_bits, unsigned int num_memory_bits);
|
||||
int mite_buf_change(struct mite_dma_descriptor_ring *ring,
|
||||
comedi_async * async);
|
||||
comedi_async *async);
|
||||
|
||||
#ifdef DEBUG_MITE
|
||||
void mite_print_chsr(unsigned int chsr);
|
||||
|
|
|
@ -680,8 +680,8 @@ typedef struct {
|
|||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int rtd_attach(comedi_device * dev, comedi_devconfig * it);
|
||||
static int rtd_detach(comedi_device * dev);
|
||||
static int rtd_attach(comedi_device *dev, comedi_devconfig *it);
|
||||
static int rtd_detach(comedi_device *dev);
|
||||
|
||||
static comedi_driver rtd520Driver = {
|
||||
driver_name: DRV_NAME,
|
||||
|
@ -690,20 +690,20 @@ static comedi_driver rtd520Driver = {
|
|||
detach:rtd_detach,
|
||||
};
|
||||
|
||||
static int rtd_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int rtd_ao_winsn(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int rtd_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int rtd_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int rtd_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int rtd_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
static int rtd_ai_cmd(comedi_device * dev, comedi_subdevice * s);
|
||||
static int rtd_ai_cancel(comedi_device * dev, comedi_subdevice * s);
|
||||
static int rtd_ai_rinsn(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int rtd_ao_winsn(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int rtd_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int rtd_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int rtd_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int rtd_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
static int rtd_ai_cmd(comedi_device *dev, comedi_subdevice *s);
|
||||
static int rtd_ai_cancel(comedi_device *dev, comedi_subdevice *s);
|
||||
/* static int rtd_ai_poll (comedi_device *dev,comedi_subdevice *s); */
|
||||
static int rtd_ns_to_timer(unsigned int *ns, int roundMode);
|
||||
static irqreturn_t rtd_interrupt(int irq, void *d PT_REGS_ARG);
|
||||
|
@ -715,7 +715,7 @@ static int rtd520_probe_fifo_depth(comedi_device *dev);
|
|||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int rtd_attach(comedi_device * dev, comedi_devconfig * it)
|
||||
static int rtd_attach(comedi_device *dev, comedi_devconfig *it)
|
||||
{ /* board name and options flags */
|
||||
comedi_subdevice *s;
|
||||
struct pci_dev *pcidev;
|
||||
|
@ -1057,7 +1057,7 @@ static int rtd_attach(comedi_device * dev, comedi_devconfig * it)
|
|||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int rtd_detach(comedi_device * dev)
|
||||
static int rtd_detach(comedi_device *dev)
|
||||
{
|
||||
#ifdef USE_DMA
|
||||
int index;
|
||||
|
@ -1137,7 +1137,7 @@ static int rtd_detach(comedi_device * dev)
|
|||
/*
|
||||
Convert a single comedi channel-gain entry to a RTD520 table entry
|
||||
*/
|
||||
static unsigned short rtdConvertChanGain(comedi_device * dev,
|
||||
static unsigned short rtdConvertChanGain(comedi_device *dev,
|
||||
unsigned int comediChan, int chanIndex)
|
||||
{ /* index in channel list */
|
||||
unsigned int chan, range, aref;
|
||||
|
@ -1187,7 +1187,7 @@ static unsigned short rtdConvertChanGain(comedi_device * dev,
|
|||
/*
|
||||
Setup the channel-gain table from a comedi list
|
||||
*/
|
||||
static void rtd_load_channelgain_list(comedi_device * dev,
|
||||
static void rtd_load_channelgain_list(comedi_device *dev,
|
||||
unsigned int n_chan, unsigned int *list)
|
||||
{
|
||||
if (n_chan > 1) { /* setup channel gain table */
|
||||
|
@ -1251,8 +1251,8 @@ static int rtd520_probe_fifo_depth(comedi_device *dev)
|
|||
Note, we don't do any settling delays. Use a instruction list to
|
||||
select, delay, then read.
|
||||
*/
|
||||
static int rtd_ai_rinsn(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int rtd_ai_rinsn(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int n, ii;
|
||||
int stat;
|
||||
|
@ -1304,7 +1304,7 @@ static int rtd_ai_rinsn(comedi_device * dev,
|
|||
|
||||
The manual claims that we can do a lword read, but it doesn't work here.
|
||||
*/
|
||||
static int ai_read_n(comedi_device * dev, comedi_subdevice * s, int count)
|
||||
static int ai_read_n(comedi_device *dev, comedi_subdevice *s, int count)
|
||||
{
|
||||
int ii;
|
||||
|
||||
|
@ -1343,7 +1343,7 @@ static int ai_read_n(comedi_device * dev, comedi_subdevice * s, int count)
|
|||
/*
|
||||
unknown amout of data is waiting in fifo.
|
||||
*/
|
||||
static int ai_read_dregs(comedi_device * dev, comedi_subdevice * s)
|
||||
static int ai_read_dregs(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
while (RtdFifoStatus(dev) & FS_ADC_NOT_EMPTY) { /* 1 -> not empty */
|
||||
sampl_t sample;
|
||||
|
@ -1372,7 +1372,7 @@ static int ai_read_dregs(comedi_device * dev, comedi_subdevice * s)
|
|||
/*
|
||||
Terminate a DMA transfer and wait for everything to quiet down
|
||||
*/
|
||||
void abort_dma(comedi_device * dev, unsigned int channel)
|
||||
void abort_dma(comedi_device *dev, unsigned int channel)
|
||||
{ /* DMA channel 0, 1 */
|
||||
unsigned long dma_cs_addr; /* the control/status register */
|
||||
uint8_t status;
|
||||
|
@ -1431,7 +1431,7 @@ void abort_dma(comedi_device * dev, unsigned int channel)
|
|||
Process what is in the DMA transfer buffer and pass to comedi
|
||||
Note: this is not re-entrant
|
||||
*/
|
||||
static int ai_process_dma(comedi_device * dev, comedi_subdevice * s)
|
||||
static int ai_process_dma(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
int ii, n;
|
||||
s16 *dp;
|
||||
|
@ -1645,7 +1645,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */
|
|||
/*
|
||||
return the number of samples available
|
||||
*/
|
||||
static int rtd_ai_poll(comedi_device * dev, comedi_subdevice * s)
|
||||
static int rtd_ai_poll(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
/* TODO: This needs to mask interrupts, read_dregs, and then re-enable */
|
||||
/* Not sure what to do if DMA is active */
|
||||
|
@ -1662,8 +1662,8 @@ static int rtd_ai_poll(comedi_device * dev, comedi_subdevice * s)
|
|||
the command passes.
|
||||
*/
|
||||
|
||||
static int rtd_ai_cmdtest(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_cmd * cmd)
|
||||
static int rtd_ai_cmdtest(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
@ -1867,7 +1867,7 @@ static int rtd_ai_cmdtest(comedi_device * dev,
|
|||
This is usually done by an interrupt handler.
|
||||
Userland gets to the data using read calls.
|
||||
*/
|
||||
static int rtd_ai_cmd(comedi_device * dev, comedi_subdevice * s)
|
||||
static int rtd_ai_cmd(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
int timer;
|
||||
|
@ -2064,7 +2064,7 @@ static int rtd_ai_cmd(comedi_device * dev, comedi_subdevice * s)
|
|||
/*
|
||||
Stop a running data aquisition.
|
||||
*/
|
||||
static int rtd_ai_cancel(comedi_device * dev, comedi_subdevice * s)
|
||||
static int rtd_ai_cancel(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
u16 status;
|
||||
|
||||
|
@ -2132,8 +2132,8 @@ static int rtd_ns_to_timer(unsigned int *ns, int round_mode)
|
|||
/*
|
||||
Output one (or more) analog values to a single port as fast as possible.
|
||||
*/
|
||||
static int rtd_ao_winsn(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int rtd_ao_winsn(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
@ -2187,8 +2187,8 @@ static int rtd_ao_winsn(comedi_device * dev,
|
|||
|
||||
/* AO subdevices should have a read insn as well as a write insn.
|
||||
* Usually this means copying a value stored in devpriv. */
|
||||
static int rtd_ao_rinsn(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int rtd_ao_rinsn(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
@ -2210,8 +2210,8 @@ static int rtd_ao_rinsn(comedi_device * dev,
|
|||
* This allows packed reading/writing of the DIO channels. The
|
||||
* comedi core can convert between insn_bits and insn_read/write
|
||||
*/
|
||||
static int rtd_dio_insn_bits(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int rtd_dio_insn_bits(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
|
@ -2237,8 +2237,8 @@ static int rtd_dio_insn_bits(comedi_device * dev,
|
|||
/*
|
||||
Configure one bit on a IO port as Input or Output (hence the name :-).
|
||||
*/
|
||||
static int rtd_dio_insn_config(comedi_device * dev,
|
||||
comedi_subdevice * s, comedi_insn * insn, lsampl_t * data)
|
||||
static int rtd_dio_insn_config(comedi_device *dev,
|
||||
comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
||||
|
|
|
@ -118,8 +118,8 @@ static DEFINE_PCI_DEVICE_TABLE(s626_pci_table) = {
|
|||
|
||||
MODULE_DEVICE_TABLE(pci, s626_pci_table);
|
||||
|
||||
static int s626_attach(comedi_device * dev, comedi_devconfig * it);
|
||||
static int s626_detach(comedi_device * dev);
|
||||
static int s626_attach(comedi_device *dev, comedi_devconfig *it);
|
||||
static int s626_detach(comedi_device *dev);
|
||||
|
||||
static comedi_driver driver_s626 = {
|
||||
driver_name:"s626",
|
||||
|
@ -222,36 +222,36 @@ static dio_private *dio_private_word[]={
|
|||
COMEDI_PCI_INITCLEANUP_NOMODULE(driver_s626, s626_pci_table);
|
||||
|
||||
/* ioctl routines */
|
||||
static int s626_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_ai_insn_config(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
/* static int s626_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); */
|
||||
static int s626_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_ai_cmd(comedi_device * dev, comedi_subdevice * s);
|
||||
static int s626_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
static int s626_ai_cancel(comedi_device * dev, comedi_subdevice * s);
|
||||
static int s626_ao_winsn(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_dio_set_irq(comedi_device * dev, unsigned int chan);
|
||||
static int s626_dio_reset_irq(comedi_device * dev, unsigned int gruop,
|
||||
static int s626_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_ai_cmd(comedi_device *dev, comedi_subdevice *s);
|
||||
static int s626_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
static int s626_ai_cancel(comedi_device *dev, comedi_subdevice *s);
|
||||
static int s626_ao_winsn(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_dio_set_irq(comedi_device *dev, unsigned int chan);
|
||||
static int s626_dio_reset_irq(comedi_device *dev, unsigned int gruop,
|
||||
unsigned int mask);
|
||||
static int s626_dio_clear_irq(comedi_device * dev);
|
||||
static int s626_enc_insn_config(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_enc_insn_read(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_enc_insn_write(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data);
|
||||
static int s626_dio_clear_irq(comedi_device *dev);
|
||||
static int s626_enc_insn_config(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_enc_insn_read(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_enc_insn_write(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data);
|
||||
static int s626_ns_to_timer(int *nanosec, int round_mode);
|
||||
static int s626_ai_load_polllist(uint8_t * ppl, comedi_cmd * cmd);
|
||||
static int s626_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
|
||||
static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd);
|
||||
static int s626_ai_inttrig(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned int trignum);
|
||||
static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG);
|
||||
static lsampl_t s626_ai_reg_to_uint(int data);
|
||||
|
@ -260,36 +260,36 @@ static lsampl_t s626_ai_reg_to_uint(int data);
|
|||
/* end ioctl routines */
|
||||
|
||||
/* internal routines */
|
||||
static void s626_dio_init(comedi_device * dev);
|
||||
static void ResetADC(comedi_device * dev, uint8_t * ppl);
|
||||
static void LoadTrimDACs(comedi_device * dev);
|
||||
static void WriteTrimDAC(comedi_device * dev, uint8_t LogicalChan,
|
||||
static void s626_dio_init(comedi_device *dev);
|
||||
static void ResetADC(comedi_device *dev, uint8_t *ppl);
|
||||
static void LoadTrimDACs(comedi_device *dev);
|
||||
static void WriteTrimDAC(comedi_device *dev, uint8_t LogicalChan,
|
||||
uint8_t DacData);
|
||||
static uint8_t I2Cread(comedi_device * dev, uint8_t addr);
|
||||
static uint32_t I2Chandshake(comedi_device * dev, uint32_t val);
|
||||
static void SetDAC(comedi_device * dev, uint16_t chan, short dacdata);
|
||||
static void SendDAC(comedi_device * dev, uint32_t val);
|
||||
static void WriteMISC2(comedi_device * dev, uint16_t NewImage);
|
||||
static void DEBItransfer(comedi_device * dev);
|
||||
static uint16_t DEBIread(comedi_device * dev, uint16_t addr);
|
||||
static void DEBIwrite(comedi_device * dev, uint16_t addr, uint16_t wdata);
|
||||
static void DEBIreplace(comedi_device * dev, uint16_t addr, uint16_t mask,
|
||||
static uint8_t I2Cread(comedi_device *dev, uint8_t addr);
|
||||
static uint32_t I2Chandshake(comedi_device *dev, uint32_t val);
|
||||
static void SetDAC(comedi_device *dev, uint16_t chan, short dacdata);
|
||||
static void SendDAC(comedi_device *dev, uint32_t val);
|
||||
static void WriteMISC2(comedi_device *dev, uint16_t NewImage);
|
||||
static void DEBItransfer(comedi_device *dev);
|
||||
static uint16_t DEBIread(comedi_device *dev, uint16_t addr);
|
||||
static void DEBIwrite(comedi_device *dev, uint16_t addr, uint16_t wdata);
|
||||
static void DEBIreplace(comedi_device *dev, uint16_t addr, uint16_t mask,
|
||||
uint16_t wdata);
|
||||
static void CloseDMAB(comedi_device * dev, DMABUF * pdma, size_t bsize);
|
||||
static void CloseDMAB(comedi_device *dev, DMABUF *pdma, size_t bsize);
|
||||
|
||||
/* COUNTER OBJECT ------------------------------------------------ */
|
||||
typedef struct enc_private_struct {
|
||||
/* Pointers to functions that differ for A and B counters: */
|
||||
uint16_t(*GetEnable) (comedi_device * dev, struct enc_private_struct *); /* Return clock enable. */
|
||||
uint16_t(*GetIntSrc) (comedi_device * dev, struct enc_private_struct *); /* Return interrupt source. */
|
||||
uint16_t(*GetLoadTrig) (comedi_device * dev, struct enc_private_struct *); /* Return preload trigger source. */
|
||||
uint16_t(*GetMode) (comedi_device * dev, struct enc_private_struct *); /* Return standardized operating mode. */
|
||||
void (*PulseIndex) (comedi_device * dev, struct enc_private_struct *); /* Generate soft index strobe. */
|
||||
void (*SetEnable) (comedi_device * dev, struct enc_private_struct *, uint16_t enab); /* Program clock enable. */
|
||||
void (*SetIntSrc) (comedi_device * dev, struct enc_private_struct *, uint16_t IntSource); /* Program interrupt source. */
|
||||
void (*SetLoadTrig) (comedi_device * dev, struct enc_private_struct *, uint16_t Trig); /* Program preload trigger source. */
|
||||
void (*SetMode) (comedi_device * dev, struct enc_private_struct *, uint16_t Setup, uint16_t DisableIntSrc); /* Program standardized operating mode. */
|
||||
void (*ResetCapFlags) (comedi_device * dev, struct enc_private_struct *); /* Reset event capture flags. */
|
||||
uint16_t(*GetEnable) (comedi_device *dev, struct enc_private_struct *); /* Return clock enable. */
|
||||
uint16_t(*GetIntSrc) (comedi_device *dev, struct enc_private_struct *); /* Return interrupt source. */
|
||||
uint16_t(*GetLoadTrig) (comedi_device *dev, struct enc_private_struct *); /* Return preload trigger source. */
|
||||
uint16_t(*GetMode) (comedi_device *dev, struct enc_private_struct *); /* Return standardized operating mode. */
|
||||
void (*PulseIndex) (comedi_device *dev, struct enc_private_struct *); /* Generate soft index strobe. */
|
||||
void (*SetEnable) (comedi_device *dev, struct enc_private_struct *, uint16_t enab); /* Program clock enable. */
|
||||
void (*SetIntSrc) (comedi_device *dev, struct enc_private_struct *, uint16_t IntSource); /* Program interrupt source. */
|
||||
void (*SetLoadTrig) (comedi_device *dev, struct enc_private_struct *, uint16_t Trig); /* Program preload trigger source. */
|
||||
void (*SetMode) (comedi_device *dev, struct enc_private_struct *, uint16_t Setup, uint16_t DisableIntSrc); /* Program standardized operating mode. */
|
||||
void (*ResetCapFlags) (comedi_device *dev, struct enc_private_struct *); /* Reset event capture flags. */
|
||||
|
||||
uint16_t MyCRA; /* Address of CRA register. */
|
||||
uint16_t MyCRB; /* Address of CRB register. */
|
||||
|
@ -301,33 +301,33 @@ typedef struct enc_private_struct {
|
|||
#define encpriv ((enc_private *)(dev->subdevices+5)->private)
|
||||
|
||||
/* counters routines */
|
||||
static void s626_timer_load(comedi_device * dev, enc_private * k, int tick);
|
||||
static uint32_t ReadLatch(comedi_device * dev, enc_private * k);
|
||||
static void ResetCapFlags_A(comedi_device * dev, enc_private * k);
|
||||
static void ResetCapFlags_B(comedi_device * dev, enc_private * k);
|
||||
static uint16_t GetMode_A(comedi_device * dev, enc_private * k);
|
||||
static uint16_t GetMode_B(comedi_device * dev, enc_private * k);
|
||||
static void SetMode_A(comedi_device * dev, enc_private * k, uint16_t Setup,
|
||||
static void s626_timer_load(comedi_device *dev, enc_private *k, int tick);
|
||||
static uint32_t ReadLatch(comedi_device *dev, enc_private *k);
|
||||
static void ResetCapFlags_A(comedi_device *dev, enc_private *k);
|
||||
static void ResetCapFlags_B(comedi_device *dev, enc_private *k);
|
||||
static uint16_t GetMode_A(comedi_device *dev, enc_private *k);
|
||||
static uint16_t GetMode_B(comedi_device *dev, enc_private *k);
|
||||
static void SetMode_A(comedi_device *dev, enc_private *k, uint16_t Setup,
|
||||
uint16_t DisableIntSrc);
|
||||
static void SetMode_B(comedi_device * dev, enc_private * k, uint16_t Setup,
|
||||
static void SetMode_B(comedi_device *dev, enc_private *k, uint16_t Setup,
|
||||
uint16_t DisableIntSrc);
|
||||
static void SetEnable_A(comedi_device * dev, enc_private * k, uint16_t enab);
|
||||
static void SetEnable_B(comedi_device * dev, enc_private * k, uint16_t enab);
|
||||
static uint16_t GetEnable_A(comedi_device * dev, enc_private * k);
|
||||
static uint16_t GetEnable_B(comedi_device * dev, enc_private * k);
|
||||
static void SetLatchSource(comedi_device * dev, enc_private * k,
|
||||
static void SetEnable_A(comedi_device *dev, enc_private *k, uint16_t enab);
|
||||
static void SetEnable_B(comedi_device *dev, enc_private *k, uint16_t enab);
|
||||
static uint16_t GetEnable_A(comedi_device *dev, enc_private *k);
|
||||
static uint16_t GetEnable_B(comedi_device *dev, enc_private *k);
|
||||
static void SetLatchSource(comedi_device *dev, enc_private *k,
|
||||
uint16_t value);
|
||||
/* static uint16_t GetLatchSource(comedi_device *dev, enc_private *k ); */
|
||||
static void SetLoadTrig_A(comedi_device * dev, enc_private * k, uint16_t Trig);
|
||||
static void SetLoadTrig_B(comedi_device * dev, enc_private * k, uint16_t Trig);
|
||||
static uint16_t GetLoadTrig_A(comedi_device * dev, enc_private * k);
|
||||
static uint16_t GetLoadTrig_B(comedi_device * dev, enc_private * k);
|
||||
static void SetIntSrc_B(comedi_device * dev, enc_private * k,
|
||||
static void SetLoadTrig_A(comedi_device *dev, enc_private *k, uint16_t Trig);
|
||||
static void SetLoadTrig_B(comedi_device *dev, enc_private *k, uint16_t Trig);
|
||||
static uint16_t GetLoadTrig_A(comedi_device *dev, enc_private *k);
|
||||
static uint16_t GetLoadTrig_B(comedi_device *dev, enc_private *k);
|
||||
static void SetIntSrc_B(comedi_device *dev, enc_private *k,
|
||||
uint16_t IntSource);
|
||||
static void SetIntSrc_A(comedi_device * dev, enc_private * k,
|
||||
static void SetIntSrc_A(comedi_device *dev, enc_private *k,
|
||||
uint16_t IntSource);
|
||||
static uint16_t GetIntSrc_A(comedi_device * dev, enc_private * k);
|
||||
static uint16_t GetIntSrc_B(comedi_device * dev, enc_private * k);
|
||||
static uint16_t GetIntSrc_A(comedi_device *dev, enc_private *k);
|
||||
static uint16_t GetIntSrc_B(comedi_device *dev, enc_private *k);
|
||||
/* static void SetClkMult(comedi_device *dev, enc_private *k, uint16_t value ) ; */
|
||||
/* static uint16_t GetClkMult(comedi_device *dev, enc_private *k ) ; */
|
||||
/* static void SetIndexPol(comedi_device *dev, enc_private *k, uint16_t value ); */
|
||||
|
@ -336,10 +336,10 @@ static uint16_t GetIntSrc_B(comedi_device * dev, enc_private * k);
|
|||
/* static uint16_t GetClkSrc( comedi_device *dev,enc_private *k ); */
|
||||
/* static void SetIndexSrc( comedi_device *dev,enc_private *k, uint16_t value ); */
|
||||
/* static uint16_t GetIndexSrc( comedi_device *dev,enc_private *k ); */
|
||||
static void PulseIndex_A(comedi_device * dev, enc_private * k);
|
||||
static void PulseIndex_B(comedi_device * dev, enc_private * k);
|
||||
static void Preload(comedi_device * dev, enc_private * k, uint32_t value);
|
||||
static void CountersInit(comedi_device * dev);
|
||||
static void PulseIndex_A(comedi_device *dev, enc_private *k);
|
||||
static void PulseIndex_B(comedi_device *dev, enc_private *k);
|
||||
static void Preload(comedi_device *dev, enc_private *k, uint32_t value);
|
||||
static void CountersInit(comedi_device *dev);
|
||||
/* end internal routines */
|
||||
|
||||
/* Counter objects constructor. */
|
||||
|
@ -485,7 +485,7 @@ static const comedi_lrange s626_range_table = { 2, {
|
|||
}
|
||||
};
|
||||
|
||||
static int s626_attach(comedi_device * dev, comedi_devconfig * it)
|
||||
static int s626_attach(comedi_device *dev, comedi_devconfig *it)
|
||||
{
|
||||
/* uint8_t PollList; */
|
||||
/* uint16_t AdcData; */
|
||||
|
@ -1261,7 +1261,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int s626_detach(comedi_device * dev)
|
||||
static int s626_detach(comedi_device *dev)
|
||||
{
|
||||
if (devpriv) {
|
||||
/* stop ai_command */
|
||||
|
@ -1307,7 +1307,7 @@ static int s626_detach(comedi_device * dev)
|
|||
/*
|
||||
* this functions build the RPS program for hardware driven acquistion
|
||||
*/
|
||||
void ResetADC(comedi_device * dev, uint8_t * ppl)
|
||||
void ResetADC(comedi_device *dev, uint8_t *ppl)
|
||||
{
|
||||
register uint32_t *pRPS;
|
||||
uint32_t JmpAdrs;
|
||||
|
@ -1499,8 +1499,8 @@ void ResetADC(comedi_device * dev, uint8_t * ppl)
|
|||
}
|
||||
|
||||
/* TO COMPLETE, IF NECESSARY */
|
||||
static int s626_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_ai_insn_config(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
return -EINVAL;
|
||||
|
@ -1536,8 +1536,8 @@ static int s626_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
|
|||
/* return i; */
|
||||
/* } */
|
||||
|
||||
static int s626_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
uint16_t chan = CR_CHAN(insn->chanspec);
|
||||
uint16_t range = CR_RANGE(insn->chanspec);
|
||||
|
@ -1632,7 +1632,7 @@ static int s626_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
|
|||
return n;
|
||||
}
|
||||
|
||||
static int s626_ai_load_polllist(uint8_t * ppl, comedi_cmd * cmd)
|
||||
static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd)
|
||||
{
|
||||
|
||||
int n;
|
||||
|
@ -1648,7 +1648,7 @@ static int s626_ai_load_polllist(uint8_t * ppl, comedi_cmd * cmd)
|
|||
return n;
|
||||
}
|
||||
|
||||
static int s626_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
|
||||
static int s626_ai_inttrig(comedi_device *dev, comedi_subdevice *s,
|
||||
unsigned int trignum)
|
||||
{
|
||||
if (trignum != 0)
|
||||
|
@ -1667,7 +1667,7 @@ static int s626_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
|
|||
}
|
||||
|
||||
/* TO COMPLETE */
|
||||
static int s626_ai_cmd(comedi_device * dev, comedi_subdevice * s)
|
||||
static int s626_ai_cmd(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
|
||||
uint8_t ppl[16];
|
||||
|
@ -1813,8 +1813,8 @@ static int s626_ai_cmd(comedi_device * dev, comedi_subdevice * s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s626_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
static int s626_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
@ -1998,7 +1998,7 @@ static int s626_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s626_ai_cancel(comedi_device * dev, comedi_subdevice * s)
|
||||
static int s626_ai_cancel(comedi_device *dev, comedi_subdevice *s)
|
||||
{
|
||||
/* Stop RPS program in case it is currently running. */
|
||||
MC_DISABLE(P_MC1, MC1_ERPS1);
|
||||
|
@ -2039,8 +2039,8 @@ static int s626_ns_to_timer(int *nanosec, int round_mode)
|
|||
return divider - 1;
|
||||
}
|
||||
|
||||
static int s626_ao_winsn(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_ao_winsn(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
@ -2058,8 +2058,8 @@ static int s626_ao_winsn(comedi_device * dev, comedi_subdevice * s,
|
|||
return i;
|
||||
}
|
||||
|
||||
static int s626_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -2076,7 +2076,7 @@ static int s626_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
|
|||
* ports A, B and C, respectively.
|
||||
*/
|
||||
|
||||
static void s626_dio_init(comedi_device * dev)
|
||||
static void s626_dio_init(comedi_device *dev)
|
||||
{
|
||||
uint16_t group;
|
||||
comedi_subdevice *s;
|
||||
|
@ -2105,8 +2105,8 @@ static void s626_dio_init(comedi_device * dev)
|
|||
* This allows packed reading/writing of the DIO channels. The comedi
|
||||
* core can convert between insn_bits and insn_read/write */
|
||||
|
||||
static int s626_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
/* Length of data must be 2 (mask and new data, see below) */
|
||||
|
@ -2141,8 +2141,8 @@ static int s626_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
|
|||
return 2;
|
||||
}
|
||||
|
||||
static int s626_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
switch (data[0]) {
|
||||
|
@ -2168,7 +2168,7 @@ static int s626_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int s626_dio_set_irq(comedi_device * dev, unsigned int chan)
|
||||
static int s626_dio_set_irq(comedi_device *dev, unsigned int chan)
|
||||
{
|
||||
unsigned int group;
|
||||
unsigned int bitmask;
|
||||
|
@ -2210,7 +2210,7 @@ static int s626_dio_set_irq(comedi_device * dev, unsigned int chan)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s626_dio_reset_irq(comedi_device * dev, unsigned int group,
|
||||
static int s626_dio_reset_irq(comedi_device *dev, unsigned int group,
|
||||
unsigned int mask)
|
||||
{
|
||||
DEBUG("s626_dio_reset_irq: disable interrupt on dio channel %d group %d\n", mask, group);
|
||||
|
@ -2226,7 +2226,7 @@ static int s626_dio_reset_irq(comedi_device * dev, unsigned int group,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s626_dio_clear_irq(comedi_device * dev)
|
||||
static int s626_dio_clear_irq(comedi_device *dev)
|
||||
{
|
||||
unsigned int group;
|
||||
|
||||
|
@ -2246,8 +2246,8 @@ static int s626_dio_clear_irq(comedi_device * dev)
|
|||
/* Now this function initializes the value of the counter (data[0])
|
||||
and set the subdevice. To complete with trigger and interrupt
|
||||
configuration */
|
||||
static int s626_enc_insn_config(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_enc_insn_config(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
uint16_t Setup = (LOADSRC_INDX << BF_LOADSRC) | /* Preload upon */
|
||||
/* index. */
|
||||
|
@ -2276,8 +2276,8 @@ static int s626_enc_insn_config(comedi_device * dev, comedi_subdevice * s,
|
|||
return insn->n;
|
||||
}
|
||||
|
||||
static int s626_enc_insn_read(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_enc_insn_read(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
int n;
|
||||
|
@ -2294,8 +2294,8 @@ static int s626_enc_insn_read(comedi_device * dev, comedi_subdevice * s,
|
|||
return n;
|
||||
}
|
||||
|
||||
static int s626_enc_insn_write(comedi_device * dev, comedi_subdevice * s,
|
||||
comedi_insn * insn, lsampl_t * data)
|
||||
static int s626_enc_insn_write(comedi_device *dev, comedi_subdevice *s,
|
||||
comedi_insn *insn, lsampl_t *data)
|
||||
{
|
||||
|
||||
enc_private *k = &encpriv[CR_CHAN(insn->chanspec)];
|
||||
|
@ -2317,7 +2317,7 @@ static int s626_enc_insn_write(comedi_device * dev, comedi_subdevice * s,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void s626_timer_load(comedi_device * dev, enc_private * k, int tick)
|
||||
static void s626_timer_load(comedi_device *dev, enc_private *k, int tick)
|
||||
{
|
||||
uint16_t Setup = (LOADSRC_INDX << BF_LOADSRC) | /* Preload upon */
|
||||
/* index. */
|
||||
|
@ -2363,7 +2363,7 @@ static uint8_t trimchan[] = { 10, 9, 8, 3, 2, 7, 6, 1, 0, 5, 4 };
|
|||
static uint8_t trimadrs[] =
|
||||
{ 0x40, 0x41, 0x42, 0x50, 0x51, 0x52, 0x53, 0x60, 0x61, 0x62, 0x63 };
|
||||
|
||||
static void LoadTrimDACs(comedi_device * dev)
|
||||
static void LoadTrimDACs(comedi_device *dev)
|
||||
{
|
||||
register uint8_t i;
|
||||
|
||||
|
@ -2372,7 +2372,7 @@ static void LoadTrimDACs(comedi_device * dev)
|
|||
WriteTrimDAC(dev, i, I2Cread(dev, trimadrs[i]));
|
||||
}
|
||||
|
||||
static void WriteTrimDAC(comedi_device * dev, uint8_t LogicalChan,
|
||||
static void WriteTrimDAC(comedi_device *dev, uint8_t LogicalChan,
|
||||
uint8_t DacData)
|
||||
{
|
||||
uint32_t chan;
|
||||
|
@ -2413,7 +2413,7 @@ static void WriteTrimDAC(comedi_device * dev, uint8_t LogicalChan,
|
|||
/* ************** EEPROM ACCESS FUNCTIONS ************** */
|
||||
/* Read uint8_t from EEPROM. */
|
||||
|
||||
static uint8_t I2Cread(comedi_device * dev, uint8_t addr)
|
||||
static uint8_t I2Cread(comedi_device *dev, uint8_t addr)
|
||||
{
|
||||
uint8_t rtnval;
|
||||
|
||||
|
@ -2448,7 +2448,7 @@ static uint8_t I2Cread(comedi_device * dev, uint8_t addr)
|
|||
return rtnval;
|
||||
}
|
||||
|
||||
static uint32_t I2Chandshake(comedi_device * dev, uint32_t val)
|
||||
static uint32_t I2Chandshake(comedi_device *dev, uint32_t val)
|
||||
{
|
||||
/* Write I2C command to I2C Transfer Control shadow register. */
|
||||
WR7146(P_I2CCTRL, val);
|
||||
|
@ -2469,7 +2469,7 @@ static uint32_t I2Chandshake(comedi_device * dev, uint32_t val)
|
|||
|
||||
/* Private helper function: Write setpoint to an application DAC channel. */
|
||||
|
||||
static void SetDAC(comedi_device * dev, uint16_t chan, short dacdata)
|
||||
static void SetDAC(comedi_device *dev, uint16_t chan, short dacdata)
|
||||
{
|
||||
register uint16_t signmask;
|
||||
register uint32_t WSImage;
|
||||
|
@ -2530,7 +2530,7 @@ static void SetDAC(comedi_device * dev, uint16_t chan, short dacdata)
|
|||
* Dacpol contains valid target image.
|
||||
*/
|
||||
|
||||
static void SendDAC(comedi_device * dev, uint32_t val)
|
||||
static void SendDAC(comedi_device *dev, uint32_t val)
|
||||
{
|
||||
|
||||
/* START THE SERIAL CLOCK RUNNING ------------- */
|
||||
|
@ -2646,7 +2646,7 @@ static void SendDAC(comedi_device * dev, uint32_t val)
|
|||
while ((RR7146(P_FB_BUFFER2) & 0xFF000000) == 0) ;
|
||||
}
|
||||
|
||||
static void WriteMISC2(comedi_device * dev, uint16_t NewImage)
|
||||
static void WriteMISC2(comedi_device *dev, uint16_t NewImage)
|
||||
{
|
||||
DEBIwrite(dev, LP_MISC1, MISC1_WENABLE); /* enab writes to */
|
||||
/* MISC2 register. */
|
||||
|
@ -2656,7 +2656,7 @@ static void WriteMISC2(comedi_device * dev, uint16_t NewImage)
|
|||
|
||||
/* Initialize the DEBI interface for all transfers. */
|
||||
|
||||
static uint16_t DEBIread(comedi_device * dev, uint16_t addr)
|
||||
static uint16_t DEBIread(comedi_device *dev, uint16_t addr)
|
||||
{
|
||||
uint16_t retval;
|
||||
|
||||
|
@ -2675,7 +2675,7 @@ static uint16_t DEBIread(comedi_device * dev, uint16_t addr)
|
|||
|
||||
/* Execute a DEBI transfer. This must be called from within a */
|
||||
/* critical section. */
|
||||
static void DEBItransfer(comedi_device * dev)
|
||||
static void DEBItransfer(comedi_device *dev)
|
||||
{
|
||||
/* Initiate upload of shadow RAM to DEBI control register. */
|
||||
MC_ENABLE(P_MC2, MC2_UPLD_DEBI);
|
||||
|
@ -2689,7 +2689,7 @@ static void DEBItransfer(comedi_device * dev)
|
|||
}
|
||||
|
||||
/* Write a value to a gate array register. */
|
||||
static void DEBIwrite(comedi_device * dev, uint16_t addr, uint16_t wdata)
|
||||
static void DEBIwrite(comedi_device *dev, uint16_t addr, uint16_t wdata)
|
||||
{
|
||||
|
||||
/* Set up DEBI control register value in shadow RAM. */
|
||||
|
@ -2704,7 +2704,7 @@ static void DEBIwrite(comedi_device * dev, uint16_t addr, uint16_t wdata)
|
|||
* specifies bits that are to be preserved, wdata is new value to be
|
||||
* or'd with the masked original.
|
||||
*/
|
||||
static void DEBIreplace(comedi_device * dev, uint16_t addr, uint16_t mask,
|
||||
static void DEBIreplace(comedi_device *dev, uint16_t addr, uint16_t mask,
|
||||
uint16_t wdata)
|
||||
{
|
||||
|
||||
|
@ -2722,7 +2722,7 @@ static void DEBIreplace(comedi_device * dev, uint16_t addr, uint16_t mask,
|
|||
DEBItransfer(dev); /* Execute the DEBI Write transfer. */
|
||||
}
|
||||
|
||||
static void CloseDMAB(comedi_device * dev, DMABUF * pdma, size_t bsize)
|
||||
static void CloseDMAB(comedi_device *dev, DMABUF *pdma, size_t bsize)
|
||||
{
|
||||
void *vbptr;
|
||||
dma_addr_t vpptr;
|
||||
|
@ -2757,7 +2757,7 @@ static void CloseDMAB(comedi_device * dev, DMABUF * pdma, size_t bsize)
|
|||
|
||||
/* Read a counter's output latch. */
|
||||
|
||||
static uint32_t ReadLatch(comedi_device * dev, enc_private * k)
|
||||
static uint32_t ReadLatch(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
register uint32_t value;
|
||||
/* DEBUG FIXME DEBUG("ReadLatch: Read Latch enter\n"); */
|
||||
|
@ -2776,13 +2776,13 @@ static uint32_t ReadLatch(comedi_device * dev, enc_private * k)
|
|||
|
||||
/* Reset a counter's index and overflow event capture flags. */
|
||||
|
||||
static void ResetCapFlags_A(comedi_device * dev, enc_private * k)
|
||||
static void ResetCapFlags_A(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
DEBIreplace(dev, k->MyCRB, (uint16_t) (~CRBMSK_INTCTRL),
|
||||
CRBMSK_INTRESETCMD | CRBMSK_INTRESET_A);
|
||||
}
|
||||
|
||||
static void ResetCapFlags_B(comedi_device * dev, enc_private * k)
|
||||
static void ResetCapFlags_B(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
DEBIreplace(dev, k->MyCRB, (uint16_t) (~CRBMSK_INTCTRL),
|
||||
CRBMSK_INTRESETCMD | CRBMSK_INTRESET_B);
|
||||
|
@ -2791,7 +2791,7 @@ static void ResetCapFlags_B(comedi_device * dev, enc_private * k)
|
|||
/* Return counter setup in a format (COUNTER_SETUP) that is consistent */
|
||||
/* for both A and B counters. */
|
||||
|
||||
static uint16_t GetMode_A(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetMode_A(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
register uint16_t cra;
|
||||
register uint16_t crb;
|
||||
|
@ -2829,7 +2829,7 @@ static uint16_t GetMode_A(comedi_device * dev, enc_private * k)
|
|||
return setup;
|
||||
}
|
||||
|
||||
static uint16_t GetMode_B(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetMode_B(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
register uint16_t cra;
|
||||
register uint16_t crb;
|
||||
|
@ -2875,7 +2875,7 @@ static uint16_t GetMode_B(comedi_device * dev, enc_private * k)
|
|||
* ClkPol, ClkEnab, IndexSrc, IndexPol, LoadSrc.
|
||||
*/
|
||||
|
||||
static void SetMode_A(comedi_device * dev, enc_private * k, uint16_t Setup,
|
||||
static void SetMode_A(comedi_device *dev, enc_private *k, uint16_t Setup,
|
||||
uint16_t DisableIntSrc)
|
||||
{
|
||||
register uint16_t cra;
|
||||
|
@ -2933,7 +2933,7 @@ static void SetMode_A(comedi_device * dev, enc_private * k, uint16_t Setup,
|
|||
(uint16_t) (~(CRBMSK_INTCTRL | CRBMSK_CLKENAB_A)), crb);
|
||||
}
|
||||
|
||||
static void SetMode_B(comedi_device * dev, enc_private * k, uint16_t Setup,
|
||||
static void SetMode_B(comedi_device *dev, enc_private *k, uint16_t Setup,
|
||||
uint16_t DisableIntSrc)
|
||||
{
|
||||
register uint16_t cra;
|
||||
|
@ -2997,7 +2997,7 @@ static void SetMode_B(comedi_device * dev, enc_private * k, uint16_t Setup,
|
|||
|
||||
/* Return/set a counter's enable. enab: 0=always enabled, 1=enabled by index. */
|
||||
|
||||
static void SetEnable_A(comedi_device * dev, enc_private * k, uint16_t enab)
|
||||
static void SetEnable_A(comedi_device *dev, enc_private *k, uint16_t enab)
|
||||
{
|
||||
DEBUG("SetEnable_A: SetEnable_A enter 3541\n");
|
||||
DEBIreplace(dev, k->MyCRB,
|
||||
|
@ -3005,19 +3005,19 @@ static void SetEnable_A(comedi_device * dev, enc_private * k, uint16_t enab)
|
|||
(uint16_t) (enab << CRBBIT_CLKENAB_A));
|
||||
}
|
||||
|
||||
static void SetEnable_B(comedi_device * dev, enc_private * k, uint16_t enab)
|
||||
static void SetEnable_B(comedi_device *dev, enc_private *k, uint16_t enab)
|
||||
{
|
||||
DEBIreplace(dev, k->MyCRB,
|
||||
(uint16_t) (~(CRBMSK_INTCTRL | CRBMSK_CLKENAB_B)),
|
||||
(uint16_t) (enab << CRBBIT_CLKENAB_B));
|
||||
}
|
||||
|
||||
static uint16_t GetEnable_A(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetEnable_A(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
return (DEBIread(dev, k->MyCRB) >> CRBBIT_CLKENAB_A) & 1;
|
||||
}
|
||||
|
||||
static uint16_t GetEnable_B(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetEnable_B(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
return (DEBIread(dev, k->MyCRB) >> CRBBIT_CLKENAB_B) & 1;
|
||||
}
|
||||
|
@ -3027,7 +3027,7 @@ static uint16_t GetEnable_B(comedi_device * dev, enc_private * k)
|
|||
* latches B.
|
||||
*/
|
||||
|
||||
static void SetLatchSource(comedi_device * dev, enc_private * k, uint16_t value)
|
||||
static void SetLatchSource(comedi_device *dev, enc_private *k, uint16_t value)
|
||||
{
|
||||
DEBUG("SetLatchSource: SetLatchSource enter 3550 \n");
|
||||
DEBIreplace(dev, k->MyCRB,
|
||||
|
@ -3050,25 +3050,25 @@ static void SetLatchSource(comedi_device * dev, enc_private * k, uint16_t value)
|
|||
* 2=OverflowA (B counters only), 3=disabled.
|
||||
*/
|
||||
|
||||
static void SetLoadTrig_A(comedi_device * dev, enc_private * k, uint16_t Trig)
|
||||
static void SetLoadTrig_A(comedi_device *dev, enc_private *k, uint16_t Trig)
|
||||
{
|
||||
DEBIreplace(dev, k->MyCRA, (uint16_t) (~CRAMSK_LOADSRC_A),
|
||||
(uint16_t) (Trig << CRABIT_LOADSRC_A));
|
||||
}
|
||||
|
||||
static void SetLoadTrig_B(comedi_device * dev, enc_private * k, uint16_t Trig)
|
||||
static void SetLoadTrig_B(comedi_device *dev, enc_private *k, uint16_t Trig)
|
||||
{
|
||||
DEBIreplace(dev, k->MyCRB,
|
||||
(uint16_t) (~(CRBMSK_LOADSRC_B | CRBMSK_INTCTRL)),
|
||||
(uint16_t) (Trig << CRBBIT_LOADSRC_B));
|
||||
}
|
||||
|
||||
static uint16_t GetLoadTrig_A(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetLoadTrig_A(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
return (DEBIread(dev, k->MyCRA) >> CRABIT_LOADSRC_A) & 3;
|
||||
}
|
||||
|
||||
static uint16_t GetLoadTrig_B(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetLoadTrig_B(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
return (DEBIread(dev, k->MyCRB) >> CRBBIT_LOADSRC_B) & 3;
|
||||
}
|
||||
|
@ -3078,7 +3078,7 @@ static uint16_t GetLoadTrig_B(comedi_device * dev, enc_private * k)
|
|||
* 2=IndexOnly, 3=IndexAndOverflow.
|
||||
*/
|
||||
|
||||
static void SetIntSrc_A(comedi_device * dev, enc_private * k,
|
||||
static void SetIntSrc_A(comedi_device *dev, enc_private *k,
|
||||
uint16_t IntSource)
|
||||
{
|
||||
/* Reset any pending counter overflow or index captures. */
|
||||
|
@ -3095,7 +3095,7 @@ static void SetIntSrc_A(comedi_device * dev, enc_private * k,
|
|||
MyEventBits[IntSource];
|
||||
}
|
||||
|
||||
static void SetIntSrc_B(comedi_device * dev, enc_private * k,
|
||||
static void SetIntSrc_B(comedi_device *dev, enc_private *k,
|
||||
uint16_t IntSource)
|
||||
{
|
||||
uint16_t crb;
|
||||
|
@ -3118,12 +3118,12 @@ static void SetIntSrc_B(comedi_device * dev, enc_private * k,
|
|||
MyEventBits[IntSource];
|
||||
}
|
||||
|
||||
static uint16_t GetIntSrc_A(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetIntSrc_A(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
return (DEBIread(dev, k->MyCRA) >> CRABIT_INTSRC_A) & 3;
|
||||
}
|
||||
|
||||
static uint16_t GetIntSrc_B(comedi_device * dev, enc_private * k)
|
||||
static uint16_t GetIntSrc_B(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
return (DEBIread(dev, k->MyCRB) >> CRBBIT_INTSRC_B) & 3;
|
||||
}
|
||||
|
@ -3191,7 +3191,7 @@ static uint16_t GetIntSrc_B(comedi_device * dev, enc_private * k)
|
|||
|
||||
/* Generate an index pulse. */
|
||||
|
||||
static void PulseIndex_A(comedi_device * dev, enc_private * k)
|
||||
static void PulseIndex_A(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
register uint16_t cra;
|
||||
|
||||
|
@ -3203,7 +3203,7 @@ static void PulseIndex_A(comedi_device * dev, enc_private * k)
|
|||
DEBIwrite(dev, k->MyCRA, cra);
|
||||
}
|
||||
|
||||
static void PulseIndex_B(comedi_device * dev, enc_private * k)
|
||||
static void PulseIndex_B(comedi_device *dev, enc_private *k)
|
||||
{
|
||||
register uint16_t crb;
|
||||
|
||||
|
@ -3214,7 +3214,7 @@ static void PulseIndex_B(comedi_device * dev, enc_private * k)
|
|||
|
||||
/* Write value into counter preload register. */
|
||||
|
||||
static void Preload(comedi_device * dev, enc_private * k, uint32_t value)
|
||||
static void Preload(comedi_device *dev, enc_private *k, uint32_t value)
|
||||
{
|
||||
DEBUG("Preload: preload enter\n");
|
||||
DEBIwrite(dev, (uint16_t) (k->MyLatchLsw), (uint16_t) value); /* Write value to preload register. */
|
||||
|
@ -3223,7 +3223,7 @@ static void Preload(comedi_device * dev, enc_private * k, uint32_t value)
|
|||
(uint16_t) (value >> 16));
|
||||
}
|
||||
|
||||
static void CountersInit(comedi_device * dev)
|
||||
static void CountersInit(comedi_device *dev)
|
||||
{
|
||||
int chan;
|
||||
enc_private *k;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <linux/string.h>
|
||||
|
||||
int comedi_data_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
||||
int comedi_data_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
|
||||
unsigned int range, unsigned int aref, lsampl_t data)
|
||||
{
|
||||
comedi_insn insn;
|
||||
|
@ -42,8 +42,8 @@ int comedi_data_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
|||
return comedi_do_insn(dev, &insn);
|
||||
}
|
||||
|
||||
int comedi_data_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
||||
unsigned int range, unsigned int aref, lsampl_t * data)
|
||||
int comedi_data_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
|
||||
unsigned int range, unsigned int aref, lsampl_t *data)
|
||||
{
|
||||
comedi_insn insn;
|
||||
|
||||
|
@ -57,7 +57,7 @@ int comedi_data_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
|||
return comedi_do_insn(dev, &insn);
|
||||
}
|
||||
|
||||
int comedi_data_read_hint(comedi_t * dev, unsigned int subdev,
|
||||
int comedi_data_read_hint(comedi_t *dev, unsigned int subdev,
|
||||
unsigned int chan, unsigned int range, unsigned int aref)
|
||||
{
|
||||
comedi_insn insn;
|
||||
|
@ -73,9 +73,9 @@ int comedi_data_read_hint(comedi_t * dev, unsigned int subdev,
|
|||
return comedi_do_insn(dev, &insn);
|
||||
}
|
||||
|
||||
int comedi_data_read_delayed(comedi_t * dev, unsigned int subdev,
|
||||
int comedi_data_read_delayed(comedi_t *dev, unsigned int subdev,
|
||||
unsigned int chan, unsigned int range, unsigned int aref,
|
||||
lsampl_t * data, unsigned int nano_sec)
|
||||
lsampl_t *data, unsigned int nano_sec)
|
||||
{
|
||||
int retval;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <linux/string.h>
|
||||
|
||||
int comedi_dio_config(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
||||
int comedi_dio_config(comedi_t *dev, unsigned int subdev, unsigned int chan,
|
||||
unsigned int io)
|
||||
{
|
||||
comedi_insn insn;
|
||||
|
@ -41,7 +41,7 @@ int comedi_dio_config(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
|||
return comedi_do_insn(dev, &insn);
|
||||
}
|
||||
|
||||
int comedi_dio_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
||||
int comedi_dio_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
|
||||
unsigned int *val)
|
||||
{
|
||||
comedi_insn insn;
|
||||
|
@ -56,7 +56,7 @@ int comedi_dio_read(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
|||
return comedi_do_insn(dev, &insn);
|
||||
}
|
||||
|
||||
int comedi_dio_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
||||
int comedi_dio_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
|
||||
unsigned int val)
|
||||
{
|
||||
comedi_insn insn;
|
||||
|
@ -71,7 +71,7 @@ int comedi_dio_write(comedi_t * dev, unsigned int subdev, unsigned int chan,
|
|||
return comedi_do_insn(dev, &insn);
|
||||
}
|
||||
|
||||
int comedi_dio_bitfield(comedi_t * dev, unsigned int subdev, unsigned int mask,
|
||||
int comedi_dio_bitfield(comedi_t *dev, unsigned int subdev, unsigned int mask,
|
||||
unsigned int *bits)
|
||||
{
|
||||
comedi_insn insn;
|
||||
|
|
|
@ -26,14 +26,14 @@
|
|||
#include "../comedilib.h"
|
||||
#include "../comedidev.h"
|
||||
|
||||
int comedi_get_n_subdevices(comedi_t * d)
|
||||
int comedi_get_n_subdevices(comedi_t *d)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
||||
return dev->n_subdevices;
|
||||
}
|
||||
|
||||
int comedi_get_version_code(comedi_t * d)
|
||||
int comedi_get_version_code(comedi_t *d)
|
||||
{
|
||||
return COMEDI_VERSION_CODE;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ const char *comedi_get_board_name(comedi_t * d)
|
|||
return dev->board_name;
|
||||
}
|
||||
|
||||
int comedi_get_subdevice_type(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_get_subdevice_type(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -60,7 +60,7 @@ int comedi_get_subdevice_type(comedi_t * d, unsigned int subdevice)
|
|||
return s->type;
|
||||
}
|
||||
|
||||
unsigned int comedi_get_subdevice_flags(comedi_t * d, unsigned int subdevice)
|
||||
unsigned int comedi_get_subdevice_flags(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -68,7 +68,7 @@ unsigned int comedi_get_subdevice_flags(comedi_t * d, unsigned int subdevice)
|
|||
return s->subdev_flags;
|
||||
}
|
||||
|
||||
int comedi_find_subdevice_by_type(comedi_t * d, int type, unsigned int subd)
|
||||
int comedi_find_subdevice_by_type(comedi_t *d, int type, unsigned int subd)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
||||
|
@ -82,7 +82,7 @@ int comedi_find_subdevice_by_type(comedi_t * d, int type, unsigned int subd)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int comedi_get_n_channels(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_get_n_channels(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -90,7 +90,7 @@ int comedi_get_n_channels(comedi_t * d, unsigned int subdevice)
|
|||
return s->n_chan;
|
||||
}
|
||||
|
||||
int comedi_get_len_chanlist(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_get_len_chanlist(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -98,7 +98,7 @@ int comedi_get_len_chanlist(comedi_t * d, unsigned int subdevice)
|
|||
return s->len_chanlist;
|
||||
}
|
||||
|
||||
lsampl_t comedi_get_maxdata(comedi_t * d, unsigned int subdevice,
|
||||
lsampl_t comedi_get_maxdata(comedi_t *d, unsigned int subdevice,
|
||||
unsigned int chan)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
@ -111,7 +111,7 @@ lsampl_t comedi_get_maxdata(comedi_t * d, unsigned int subdevice,
|
|||
}
|
||||
|
||||
#ifdef KCOMEDILIB_DEPRECATED
|
||||
int comedi_get_rangetype(comedi_t * d, unsigned int subdevice,
|
||||
int comedi_get_rangetype(comedi_t *d, unsigned int subdevice,
|
||||
unsigned int chan)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
@ -130,7 +130,7 @@ int comedi_get_rangetype(comedi_t * d, unsigned int subdevice,
|
|||
}
|
||||
#endif
|
||||
|
||||
int comedi_get_n_ranges(comedi_t * d, unsigned int subdevice, unsigned int chan)
|
||||
int comedi_get_n_ranges(comedi_t *d, unsigned int subdevice, unsigned int chan)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -148,8 +148,8 @@ int comedi_get_n_ranges(comedi_t * d, unsigned int subdevice, unsigned int chan)
|
|||
/*
|
||||
* ALPHA (non-portable)
|
||||
*/
|
||||
int comedi_get_krange(comedi_t * d, unsigned int subdevice, unsigned int chan,
|
||||
unsigned int range, comedi_krange * krange)
|
||||
int comedi_get_krange(comedi_t *d, unsigned int subdevice, unsigned int chan,
|
||||
unsigned int range, comedi_krange *krange)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -171,7 +171,7 @@ int comedi_get_krange(comedi_t * d, unsigned int subdevice, unsigned int chan,
|
|||
/*
|
||||
* ALPHA (may be renamed)
|
||||
*/
|
||||
unsigned int comedi_get_buf_head_pos(comedi_t * d, unsigned int subdevice)
|
||||
unsigned int comedi_get_buf_head_pos(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -184,7 +184,7 @@ unsigned int comedi_get_buf_head_pos(comedi_t * d, unsigned int subdevice)
|
|||
return async->buf_write_count;
|
||||
}
|
||||
|
||||
int comedi_get_buffer_contents(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_get_buffer_contents(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
@ -203,7 +203,7 @@ int comedi_get_buffer_contents(comedi_t * d, unsigned int subdevice)
|
|||
/*
|
||||
* ALPHA
|
||||
*/
|
||||
int comedi_set_user_int_count(comedi_t * d, unsigned int subdevice,
|
||||
int comedi_set_user_int_count(comedi_t *d, unsigned int subdevice,
|
||||
unsigned int buf_user_count)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
@ -224,7 +224,7 @@ int comedi_set_user_int_count(comedi_t * d, unsigned int subdevice,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int comedi_mark_buffer_read(comedi_t * d, unsigned int subdevice,
|
||||
int comedi_mark_buffer_read(comedi_t *d, unsigned int subdevice,
|
||||
unsigned int num_bytes)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
@ -243,7 +243,7 @@ int comedi_mark_buffer_read(comedi_t * d, unsigned int subdevice,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int comedi_mark_buffer_written(comedi_t * d, unsigned int subdevice,
|
||||
int comedi_mark_buffer_written(comedi_t *d, unsigned int subdevice,
|
||||
unsigned int num_bytes)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
@ -263,7 +263,7 @@ int comedi_mark_buffer_written(comedi_t * d, unsigned int subdevice,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int comedi_get_buffer_size(comedi_t * d, unsigned int subdev)
|
||||
int comedi_get_buffer_size(comedi_t *d, unsigned int subdev)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdev;
|
||||
|
@ -278,7 +278,7 @@ int comedi_get_buffer_size(comedi_t * d, unsigned int subdev)
|
|||
return async->prealloc_bufsz;
|
||||
}
|
||||
|
||||
int comedi_get_buffer_offset(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_get_buffer_offset(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices + subdevice;
|
||||
|
|
|
@ -89,7 +89,7 @@ comedi_t *comedi_open_old(unsigned int minor)
|
|||
return (comedi_t *) dev;
|
||||
}
|
||||
|
||||
int comedi_close(comedi_t * d)
|
||||
int comedi_close(comedi_t *d)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
||||
|
@ -113,7 +113,7 @@ char *comedi_strerror(int err)
|
|||
return "unknown error";
|
||||
}
|
||||
|
||||
int comedi_fileno(comedi_t * d)
|
||||
int comedi_fileno(comedi_t *d)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
||||
|
@ -121,7 +121,7 @@ int comedi_fileno(comedi_t * d)
|
|||
return dev->minor;
|
||||
}
|
||||
|
||||
int comedi_command(comedi_t * d, comedi_cmd * cmd)
|
||||
int comedi_command(comedi_t *d, comedi_cmd *cmd)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
@ -161,7 +161,7 @@ int comedi_command(comedi_t * d, comedi_cmd * cmd)
|
|||
return s->do_cmd(dev, s);
|
||||
}
|
||||
|
||||
int comedi_command_test(comedi_t * d, comedi_cmd * cmd)
|
||||
int comedi_command_test(comedi_t *d, comedi_cmd *cmd)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
@ -183,7 +183,7 @@ int comedi_command_test(comedi_t * d, comedi_cmd * cmd)
|
|||
* COMEDI_INSN
|
||||
* perform an instruction
|
||||
*/
|
||||
int comedi_do_insn(comedi_t * d, comedi_insn * insn)
|
||||
int comedi_do_insn(comedi_t *d, comedi_insn *insn)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
@ -323,7 +323,7 @@ int comedi_do_insn(comedi_t * d, comedi_insn * insn)
|
|||
- lock while subdevice being programmed
|
||||
|
||||
*/
|
||||
int comedi_lock(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_lock(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
@ -366,7 +366,7 @@ int comedi_lock(comedi_t * d, unsigned int subdevice)
|
|||
none
|
||||
|
||||
*/
|
||||
int comedi_unlock(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_unlock(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
@ -418,7 +418,7 @@ int comedi_unlock(comedi_t * d, unsigned int subdevice)
|
|||
nothing
|
||||
|
||||
*/
|
||||
int comedi_cancel(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_cancel(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
@ -461,7 +461,7 @@ int comedi_cancel(comedi_t * d, unsigned int subdevice)
|
|||
/*
|
||||
registration of callback functions
|
||||
*/
|
||||
int comedi_register_callback(comedi_t * d, unsigned int subdevice,
|
||||
int comedi_register_callback(comedi_t *d, unsigned int subdevice,
|
||||
unsigned int mask, int (*cb) (unsigned int, void *), void *arg)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
|
@ -498,7 +498,7 @@ int comedi_register_callback(comedi_t * d, unsigned int subdevice,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int comedi_poll(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_poll(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s = dev->subdevices;
|
||||
|
@ -525,7 +525,7 @@ int comedi_poll(comedi_t * d, unsigned int subdevice)
|
|||
}
|
||||
|
||||
/* WARNING: not portable */
|
||||
int comedi_map(comedi_t * d, unsigned int subdevice, void *ptr)
|
||||
int comedi_map(comedi_t *d, unsigned int subdevice, void *ptr)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
@ -548,7 +548,7 @@ int comedi_map(comedi_t * d, unsigned int subdevice, void *ptr)
|
|||
}
|
||||
|
||||
/* WARNING: not portable */
|
||||
int comedi_unmap(comedi_t * d, unsigned int subdevice)
|
||||
int comedi_unmap(comedi_t *d, unsigned int subdevice)
|
||||
{
|
||||
comedi_device *dev = (comedi_device *) d;
|
||||
comedi_subdevice *s;
|
||||
|
|
|
@ -44,7 +44,7 @@ const comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} };
|
|||
writes:
|
||||
n comedi_krange structures to rangeinfo->range_ptr
|
||||
*/
|
||||
int do_rangeinfo_ioctl(comedi_device * dev, comedi_rangeinfo * arg)
|
||||
int do_rangeinfo_ioctl(comedi_device *dev, comedi_rangeinfo *arg)
|
||||
{
|
||||
comedi_rangeinfo it;
|
||||
int subd, chan;
|
||||
|
@ -84,7 +84,7 @@ int do_rangeinfo_ioctl(comedi_device * dev, comedi_rangeinfo * arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int aref_invalid(comedi_subdevice * s, unsigned int chanspec)
|
||||
static int aref_invalid(comedi_subdevice *s, unsigned int chanspec)
|
||||
{
|
||||
unsigned int aref;
|
||||
|
||||
|
@ -120,7 +120,7 @@ static int aref_invalid(comedi_subdevice * s, unsigned int chanspec)
|
|||
This function checks each element in a channel/gain list to make
|
||||
make sure it is valid.
|
||||
*/
|
||||
int check_chanlist(comedi_subdevice * s, int n, unsigned int *chanlist)
|
||||
int check_chanlist(comedi_subdevice *s, int n, unsigned int *chanlist)
|
||||
{
|
||||
int i;
|
||||
int chan;
|
||||
|
|
|
@ -67,7 +67,7 @@ static struct comedi_irq_struct *comedi_irqs[NR_IRQS];
|
|||
|
||||
int comedi_request_irq(unsigned irq, irqreturn_t(*handler) (int,
|
||||
void *PT_REGS_ARG), unsigned long flags, const char *device,
|
||||
comedi_device * dev_id)
|
||||
comedi_device *dev_id)
|
||||
{
|
||||
struct comedi_irq_struct *it;
|
||||
int ret;
|
||||
|
@ -102,7 +102,7 @@ int comedi_request_irq(unsigned irq, irqreturn_t(*handler) (int,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void comedi_free_irq(unsigned int irq, comedi_device * dev_id)
|
||||
void comedi_free_irq(unsigned int irq, comedi_device *dev_id)
|
||||
{
|
||||
struct comedi_irq_struct *it;
|
||||
|
||||
|
@ -121,7 +121,7 @@ void comedi_free_irq(unsigned int irq, comedi_device * dev_id)
|
|||
comedi_irqs[irq] = NULL;
|
||||
}
|
||||
|
||||
int comedi_switch_to_rt(comedi_device * dev)
|
||||
int comedi_switch_to_rt(comedi_device *dev)
|
||||
{
|
||||
struct comedi_irq_struct *it;
|
||||
unsigned long flags;
|
||||
|
@ -145,7 +145,7 @@ int comedi_switch_to_rt(comedi_device * dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void comedi_switch_to_non_rt(comedi_device * dev)
|
||||
void comedi_switch_to_non_rt(comedi_device *dev)
|
||||
{
|
||||
struct comedi_irq_struct *it;
|
||||
unsigned long flags;
|
||||
|
@ -170,7 +170,7 @@ void wake_up_int_handler(int arg1, void *arg2)
|
|||
wake_up_interruptible((wait_queue_head_t *) arg2);
|
||||
}
|
||||
|
||||
void comedi_rt_pend_wakeup(wait_queue_head_t * q)
|
||||
void comedi_rt_pend_wakeup(wait_queue_head_t *q)
|
||||
{
|
||||
rt_pend_call(wake_up_int_handler, 0, q);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue