Moved labpc_cs_boards[] from ni_labpc.c to ni_labpc_cs.c and exported
authorIan Abbott <abbotti@mev.co.uk>
Thu, 10 Apr 2008 11:01:40 +0000 (11:01 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 10 Apr 2008 11:01:40 +0000 (11:01 +0000)
range_labpc_1200_ai, labpc_1200_ai_gain_bits[] and labpc_1200_is_unipolar[]
from ni_labpc.c for use by ni_labpc_cs.c.

comedi/drivers/ni_labpc.c
comedi/drivers/ni_labpc.h
comedi/drivers/ni_labpc_cs.c

index d5baf94eed58d35da5ff3d06edc2021360fef9ef..5dc4373eee22a1ee0dc8cd7593936b826ee8382f 100644 (file)
@@ -273,7 +273,7 @@ static const comedi_lrange range_labpc_plus_ai = {
 
 #define NUM_LABPC_1200_AI_RANGES 14
 // indicates unipolar ranges
-static const int labpc_1200_is_unipolar[NUM_LABPC_1200_AI_RANGES] = {
+const int labpc_1200_is_unipolar[NUM_LABPC_1200_AI_RANGES] = {
        0,
        0,
        0,
@@ -291,7 +291,7 @@ static const int labpc_1200_is_unipolar[NUM_LABPC_1200_AI_RANGES] = {
 };
 
 // map range index to gain bits
-static const int labpc_1200_ai_gain_bits[NUM_LABPC_1200_AI_RANGES] = {
+const int labpc_1200_ai_gain_bits[NUM_LABPC_1200_AI_RANGES] = {
        0x00,
        0x20,
        0x30,
@@ -307,7 +307,7 @@ static const int labpc_1200_ai_gain_bits[NUM_LABPC_1200_AI_RANGES] = {
        0x60,
        0x70,
 };
-static const comedi_lrange range_labpc_1200_ai = {
+const comedi_lrange range_labpc_1200_ai = {
        NUM_LABPC_1200_AI_RANGES,
        {
                        BIP_RANGE(5),
@@ -408,36 +408,6 @@ static const labpc_board labpc_boards[] = {
                },
 };
 
-const labpc_board labpc_cs_boards[NUM_LABPC_CS_BOARDS] = {
-       {
-             name:     "daqcard-1200",
-             device_id:0x103,  // 0x10b is manufacturer id, 0x103 is device id
-             ai_speed:10000,
-             bustype:  pcmcia_bustype,
-             register_layout:labpc_1200_layout,
-             has_ao:   1,
-             ai_range_table:&range_labpc_1200_ai,
-             ai_range_code:labpc_1200_ai_gain_bits,
-             ai_range_is_unipolar:labpc_1200_is_unipolar,
-             ai_scan_up:0,
-             memory_mapped_io:0,
-               },
-       /* duplicate entry, to support using alternate name */
-       {
-             name:     "ni_labpc_cs",
-             device_id:0x103,
-             ai_speed:10000,
-             bustype:  pcmcia_bustype,
-             register_layout:labpc_1200_layout,
-             has_ao:   1,
-             ai_range_table:&range_labpc_1200_ai,
-             ai_range_code:labpc_1200_ai_gain_bits,
-             ai_range_is_unipolar:labpc_1200_is_unipolar,
-             ai_scan_up:0,
-             memory_mapped_io:0,
-               },
-};
-
 /*
  * Useful for shorthand access to the particular board structure
  */
@@ -2004,4 +1974,6 @@ COMEDI_INITCLEANUP(driver_labpc);
 
 EXPORT_SYMBOL_GPL(labpc_common_attach);
 EXPORT_SYMBOL_GPL(labpc_common_detach);
-EXPORT_SYMBOL_GPL(labpc_cs_boards);
+EXPORT_SYMBOL_GPL(range_labpc_1200_ai);
+EXPORT_SYMBOL_GPL(labpc_1200_ai_gain_bits);
+EXPORT_SYMBOL_GPL(labpc_1200_is_unipolar);
index 6eabe5cb5372a0c1590495017830a47ab884fa58..8264fb19288d33f4af6cee627c90d5f34834d8c8 100644 (file)
@@ -74,11 +74,12 @@ typedef struct {
        void (*write_byte) (unsigned int byte, unsigned long address);
 } labpc_private;
 
-#define NUM_LABPC_CS_BOARDS 2
-extern const labpc_board labpc_cs_boards[NUM_LABPC_CS_BOARDS];
-
 int labpc_common_attach(comedi_device * dev, unsigned long iobase,
        unsigned int irq, unsigned int dma);
 int labpc_common_detach(comedi_device * dev);
 
+extern const int labpc_1200_is_unipolar[];
+extern const int labpc_1200_ai_gain_bits[];
+extern const comedi_lrange range_labpc_1200_ai;
+
 #endif /* _NI_LABPC_H */
index e75e916fde3ca2bbbc5854cbe494f20403beddd4..19f900d15441aa0a05a0db5d56b903ff3d154b06 100644 (file)
@@ -82,6 +82,36 @@ static struct pcmcia_device *pcmcia_cur_dev = NULL;
 
 static int labpc_attach(comedi_device * dev, comedi_devconfig * it);
 
+static const labpc_board labpc_cs_boards[] = {
+       {
+             name:     "daqcard-1200",
+             device_id:0x103,  // 0x10b is manufacturer id, 0x103 is device id
+             ai_speed:10000,
+             bustype:  pcmcia_bustype,
+             register_layout:labpc_1200_layout,
+             has_ao:   1,
+             ai_range_table:&range_labpc_1200_ai,
+             ai_range_code:labpc_1200_ai_gain_bits,
+             ai_range_is_unipolar:labpc_1200_is_unipolar,
+             ai_scan_up:0,
+             memory_mapped_io:0,
+               },
+       /* duplicate entry, to support using alternate name */
+       {
+             name:     "ni_labpc_cs",
+             device_id:0x103,
+             ai_speed:10000,
+             bustype:  pcmcia_bustype,
+             register_layout:labpc_1200_layout,
+             has_ao:   1,
+             ai_range_table:&range_labpc_1200_ai,
+             ai_range_code:labpc_1200_ai_gain_bits,
+             ai_range_is_unipolar:labpc_1200_is_unipolar,
+             ai_scan_up:0,
+             memory_mapped_io:0,
+               },
+};
+
 /*
  * Useful for shorthand access to the particular board structure
  */