- From: Anders Blomdell <anders.blomdell_at_control.lth.se>
- Date: Fri, 15 Jun 2007 18:54:14 +0200
Still work to do, but this version seems to be fully working Anders -- Anders Blomdell Email: anders.blomdell_at_control.lth.se Department of Automatic Control Lund University Phone: +46 46 222 4625 P.O. Box 118 Fax: +46 46 138118 SE-221 00 Lund, Sweden
diff -urbN orig/comedi/drivers/jr3_pci.c new/comedi/drivers/jr3_pci.c
--- orig/comedi/drivers/jr3_pci.c 1970-01-01 01:00:00.000000000 +0100
+++ new/comedi/drivers/jr3_pci.c 2007-06-15 18:33:59.000000000 +0200
_at__at_ -0,0 +1,744 _at__at_
+/*
+ comedi/drivers/jr3_pci.c
+ hardware driver for JR3/PCI force sensor board
+
+ COMEDI - Linux Control and Measurement Device Interface
+ Copyright (C) 2007 Anders Blomdell <anders.blomdell_at_control.lth.se>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+/*
+ Driver: jr3_pci.o
+ Description: JR3/PCI force sensor board
+ Author: Anders Blomdell <anders.blomdell_at_control.lth.se>
+ Status: works
+ Devices: [JR3] PCI force sensor board (jr3_pci)
+
+ The FPGA on the board requires initialization code, which can
+ be loaded by comedi_config using the -i
+ option. The initialization code is available from http://www.comedi.org
+ in the comedi_nonfree_firmware tarball.
+
+ Configuration options:
+ [0] - PCI bus number - if bus number and slot number are 0,
+ then driver search for first unused card
+ [1] - PCI slot number
+
+*/
+
+#include <linux/comedidev.h>
+
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include "jr3_pci_firmware.h"
+#include "jr3_pci_intern.h"
+
+#define PCI_VENDOR_ID_JR3 0x1762
+#define PCI_DEVICE_ID_JR3_1_CHANNEL 0x3111
+#define PCI_DEVICE_ID_JR3_2_CHANNEL 0x3112
+#define PCI_DEVICE_ID_JR3_3_CHANNEL 0x3113
+#define PCI_DEVICE_ID_JR3_4_CHANNEL 0x3114
+
+static int jr3_pci_attach(comedi_device *dev,comedi_devconfig *it);
+static int jr3_pci_detach(comedi_device *dev);
+
+static comedi_driver driver_jr3_pci = {
+ driver_name: "jr3_pci",
+ module: THIS_MODULE,
+ attach: jr3_pci_attach,
+ detach: jr3_pci_detach,
+};
+
+static struct pci_device_id jr3_pci_pci_table[] __devinitdata = {
+ { PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_1_CHANNEL,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_2_CHANNEL,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_3_CHANNEL,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_JR3, PCI_DEVICE_ID_JR3_4_CHANNEL,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { 0 }
+};
+MODULE_DEVICE_TABLE(pci, jr3_pci_pci_table);
+
+typedef struct {
+ struct pci_dev *pci_dev;
+ volatile jr3_t *iobase;
+ int n_channels;
+} jr3_pci_dev_private;
+
+typedef struct {
+ volatile jr3_channel_t *channel;
+ struct timer_list timer;
+ enum { state_jr3_poll,
+ state_jr3_init_wait_for_offset,
+ state_jr3_init_transform_complete,
+ state_jr3_init_set_full_scale_complete,
+ state_jr3_init_use_offset_complete,
+ state_jr3_done } state;
+ int channel_no;
+ int serial_no;
+ int model_no;
+ struct {
+ int length;
+ comedi_krange range;
+ } range[9];
+ comedi_lrange *range_table_list[8 * 7 + 2];
+ lsampl_t maxdata_list[8 * 7 + 2];
+ u16 errors;
+ int retries;
+} jr3_pci_subdev_private;
+
+#define devpriv ((jr3_pci_dev_private*)dev->private)
+
+static int is_complete(volatile jr3_channel_t *channel)
+{
+ return get_s16(channel->command_word0) == 0;
+}
+
+typedef struct {
+ struct {
+ u16 link_type;
+ s16 link_amount;
+ } link[8];
+} transform_t;
+
+static void set_transforms(volatile jr3_channel_t *channel,
+ transform_t transf,
+ short num)
+{
+ int i;
+
+ num &= 0x000f; // Make sure that 0 <= num <= 15
+ for (i = 0 ; i < 8 ; i++) {
+
+ set_u16(&channel->transforms[num].link[i].link_type,
+ transf.link[i].link_type);
+ comedi_udelay(1);
+ set_s16(&channel->transforms[num].link[i].link_amount,
+ transf.link[i].link_amount);
+ comedi_udelay(1);
+ if (transf.link[i].link_type == end_x_form) {
+ break;
+ }
+ }
+}
+
+static void use_transform(volatile jr3_channel_t *channel,
+ short transf_num)
+{
+ set_s16(&channel->command_word0, 0x0500 + (transf_num & 0x000f));
+}
+
+static void use_offset(volatile jr3_channel_t *channel, short offset_num)
+{
+ set_s16(&channel->command_word0, 0x0600 + (offset_num & 0x000f));
+}
+
+static void set_offset(volatile jr3_channel_t *channel)
+{
+ set_s16(&channel->command_word0, 0x0700);
+}
+
+typedef struct {
+ s16 fx;
+ s16 fy;
+ s16 fz;
+ s16 mx;
+ s16 my;
+ s16 mz;
+} six_axis_t;
+
+static void set_full_scales(volatile jr3_channel_t *channel,
+ six_axis_t full_scale)
+{
+ printk("%d %d %d %d %d %d\n",
+ full_scale.fx,
+ full_scale.fy,
+ full_scale.fz,
+ full_scale.mx,
+ full_scale.my,
+ full_scale.mz);
+ set_s16(&channel->full_scale.fx, full_scale.fx);
+ set_s16(&channel->full_scale.fy, full_scale.fy);
+ set_s16(&channel->full_scale.fz, full_scale.fz);
+ set_s16(&channel->full_scale.mx, full_scale.mx);
+ set_s16(&channel->full_scale.my, full_scale.my);
+ set_s16(&channel->full_scale.mz, full_scale.mz);
+ set_s16(&channel->command_word0, 0x0a00);
+}
+
+static six_axis_t get_min_full_scales(volatile jr3_channel_t *channel)
+{
+ six_axis_t result;
+ result.fx = get_s16(channel->min_full_scale.fx);
+ result.fy = get_s16(channel->min_full_scale.fy);
+ result.fz = get_s16(channel->min_full_scale.fz);
+ result.mx = get_s16(channel->min_full_scale.mx);
+ result.my = get_s16(channel->min_full_scale.my);
+ result.mz = get_s16(channel->min_full_scale.mz);
+ return result;
+}
+
+static six_axis_t get_max_full_scales(volatile jr3_channel_t *channel)
+{
+ six_axis_t result;
+ result.fx = get_s16(channel->max_full_scale.fx);
+ result.fy = get_s16(channel->max_full_scale.fy);
+ result.fz = get_s16(channel->max_full_scale.fz);
+ result.mx = get_s16(channel->max_full_scale.mx);
+ result.my = get_s16(channel->max_full_scale.my);
+ result.mz = get_s16(channel->max_full_scale.mz);
+ return result;
+}
+
+static int jr3_pci_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
+ comedi_insn *insn, lsampl_t *data)
+{
+ int result;
+ jr3_pci_subdev_private *p;
+ int channel;
+
+ p = s->private;
+ channel = CR_CHAN(insn->chanspec);
+ if (p == NULL || channel > 57) {
+ result = -EINVAL;
+ } else {
+ int i;
+
+ result = insn->n;
+ if (p->state != state_jr3_done ||
+ (get_u16(p->channel->errors) & 0xe800) != 0) {
+ /* No sensor or sensor changed */
+ if (p->state == state_jr3_done) {
+ /* Restart polling */
+ p->state = state_jr3_poll;
+ }
+ result = -EAGAIN;
+ }
+ for(i = 0 ; i < insn->n ; i++){
+ if (channel < 56) {
+ int axis, filter;
+
+ axis = channel % 8;
+ filter = channel / 8;
+ if (p->state != state_jr3_done) {
+ data[i] = 0;
+ } else {
+ int F = 0;
+ switch (axis) {
+ case 0: {
+ F = get_s16(p->channel->filter[filter].fx);
+ } break;
+ case 1: {
+ F = get_s16(p->channel->filter[filter].fy);
+ } break;
+ case 2: {
+ F = get_s16(p->channel->filter[filter].fz);
+ } break;
+ case 3: {
+ F = get_s16(p->channel->filter[filter].mx);
+ } break;
+ case 4: {
+ F = get_s16(p->channel->filter[filter].my);
+ } break;
+ case 5: {
+ F = get_s16(p->channel->filter[filter].mz);
+ } break;
+ case 6: {
+ F = get_s16(p->channel->filter[filter].v1);
+ } break;
+ case 7: {
+ F = get_s16(p->channel->filter[filter].v2);
+ } break;
+ }
+ data[i] = F + 0x4000;
+ }
+ } else if (channel == 56) {
+ if (p->state != state_jr3_done) {
+ data[i] = 0;
+ } else {
+ data[i] = get_u16(p->channel->model_no);
+ }
+ } else if (channel == 57) {
+ if (p->state != state_jr3_done) {
+ data[i] = 0;
+ } else {
+ data[i] = get_u16(p->channel->serial_no);
+ }
+ }
+ }
+ }
+ return result;
+}
+
+static void jr3_pci_open(comedi_device *dev)
+{
+ int i;
+
+ printk("jr3_pci_open\n");
+ for (i = 0 ; i < devpriv->n_channels ; i++) {
+ jr3_pci_subdev_private *p;
+
+ p = dev->subdevices[i].private;
+ if (p) {
+ printk("serial: %p %d (%d)\n", p, p->serial_no, p->channel_no);
+ }
+ }
+}
+
+static void jr3_download(volatile jr3_t *iobase, int pnum)
+{
+ u32 *jr3 = (u32*)iobase;
+ if (jr3) {
+ int pos = 0;
+
+ while (pos < sizeof(jr3_program) / sizeof(unsigned short) &&
+ jr3_program[pos] != 0xffff) {
+ int count, addr;
+
+ count = jr3_program[pos++];
+ addr = jr3_program[pos++];
+ while (count > 0) {
+ if (addr & 0x4000) {
+ // 16 bit data, not used!!
+ int data;
+
+ data = jr3_program[pos++];
+ count--;
+
+ // printk("jr3_data, not tested\n");
+ jr3[addr + 0x20000 * pnum] = data;
+ } else {
+ // Download 24 bit program
+ int data1, data2;
+
+ data1 = jr3_program[pos++];
+ data2 = jr3_program[pos++];
+ count -= 2;
+
+ // printk("before: %x %x %x \n", data1,data2,addr);
+
+ jr3[addr + 0x20000 * pnum] = data1;
+ comedi_udelay(100);
+ jr3[addr + 0x20000 * pnum + 0x10000] = data2;
+ comedi_udelay(100);
+ }
+ addr++;
+ }
+ }
+ }
+}
+
+static int jr3_pci_poll_subdevice(comedi_subdevice *s)
+{
+ int result = 0;
+ jr3_pci_subdev_private *p = s->private;
+
+ if (p) {
+ volatile jr3_channel_t *channel = p->channel;
+ int errors = get_u16(channel->errors);
+
+ if (errors != p->errors) {
+ printk("Errors: %x -> %x\n", p->errors, errors);
+ p->errors = errors;
+ }
+ if ((errors & 0xe800) != 0) {
+ // Sensor communication lost, force poll mode
+ p->state = state_jr3_poll;
+
+ }
+ switch (p->state) {
+ case state_jr3_poll: {
+ u16 model_no = get_u16(channel->model_no);
+ u16 serial_no = get_u16(channel->serial_no);
+ if ((errors & 0xe000) != 0 || model_no == 0 || serial_no == 0) {
+ // Still no sensor, keep on polling. Since it seems to take a
+ // little more than 2 seconds to sync to a sensor, polling each
+ // second should suffice.
+ result = 1000;
+ } else {
+ p->retries = 0;
+ p->state = state_jr3_init_wait_for_offset;
+ result = 1000;
+ }
+ } break;
+ case state_jr3_init_wait_for_offset: {
+ printk("OFFSET %d %d %d %d %d %d\n",
+ get_s16(channel->offsets.fx),
+ get_s16(channel->offsets.fy),
+ get_s16(channel->offsets.fz),
+ get_s16(channel->offsets.mx),
+ get_s16(channel->offsets.my),
+ get_s16(channel->offsets.mz));
+ p->retries++;
+ if (p->retries < 10) {
+ // Wait for offeset to stabilize (< 10 s according to manual)
+ result = 1000;
+ } else {
+ transform_t transf;
+
+ p->model_no = get_u16(channel->model_no);
+ p->serial_no = get_u16(channel->serial_no);
+
+ printk("Setting transform for channel %d\n", p->channel_no);
+ printk("Sensor Model = %i\n", p->model_no);
+ printk("Sensor Serial = %i\n", p->serial_no);
+#if 0
+ printk("Sensor Bits = %i\n", *(short *)(BASE_ADDR+BITS));
+ printk("Sensor Units = %i\n", *(short *)(BASE_ADDR+UNITS));
+ printk("Sensor Thickness = %i\n", *(short *)(BASE_ADDR+THICKNESS));
+ printk("Poll: %p %d %d\n", p, p->channel_no, p->state);
+#endif
+
+ // Transformation all zeros
+ transf.link[0].link_type=(enum link_types)0;
+ transf.link[0].link_amount=0;
+ transf.link[1].link_type=(enum link_types)0;
+ transf.link[1].link_amount=0;
+ transf.link[2].link_type=(enum link_types)0;
+ transf.link[2].link_amount=0;
+ transf.link[3].link_type=(enum link_types)0;
+ transf.link[3].link_amount=0;
+
+ set_transforms(channel, transf, 0);
+ use_transform(channel, 0);
+ p->state = state_jr3_init_transform_complete;
+ result = 20; // Allow 20 ms for completion
+ }
+ } break;
+ case state_jr3_init_transform_complete: {
+ if (! is_complete(channel)) {
+ printk("state_jr3_init_transform_complete complete = %d\n",
+ is_complete(channel));
+ result = 20;
+ } else {
+ // Set full scale
+ six_axis_t min_full_scale;
+ six_axis_t max_full_scale;
+
+ min_full_scale = get_min_full_scales(channel);
+ printk("Obtained Min. Full Scales:\n");
+ printk("%i ", (min_full_scale).fx);
+ printk("%i ", (min_full_scale).fy);
+ printk("%i ", (min_full_scale).fz);
+ printk("%i ", (min_full_scale).mx);
+ printk("%i ", (min_full_scale).my);
+ printk("%i ", (min_full_scale).mz);
+ printk("\n");
+
+
+ max_full_scale = get_max_full_scales(channel);
+ printk("Obtained Max. Full Scales:\n");
+ printk("%i ", (max_full_scale).fx);
+ printk("%i ", (max_full_scale).fy);
+ printk("%i ", (max_full_scale).fz);
+ printk("%i ", (max_full_scale).mx);
+ printk("%i ", (max_full_scale).my);
+ printk("%i ", (max_full_scale).mz);
+ printk("\n");
+
+ set_full_scales(channel, max_full_scale);
+
+ p->state = state_jr3_init_set_full_scale_complete;
+ result = 20; // Allow 20 ms for completion
+ }
+ } break;
+ case state_jr3_init_set_full_scale_complete: {
+ if (! is_complete(channel)) {
+ printk("state_jr3_init_set_full_scale_complete complete = %d\n",
+ is_complete(channel));
+ result = 20;
+ } else {
+ volatile force_array_t *full_scale;
+
+ // Use ranges in kN or we will overflow arount 2000N!
+ full_scale = &channel->full_scale;
+ p->range[0].range.min = -get_s16(full_scale->fx) * 1000;
+ p->range[0].range.max = get_s16(full_scale->fx) * 1000;
+ p->range[1].range.min = -get_s16(full_scale->fy) * 1000;
+ p->range[1].range.max = get_s16(full_scale->fy) * 1000;
+ p->range[2].range.min = -get_s16(full_scale->fz) * 1000;
+ p->range[2].range.max = get_s16(full_scale->fz) * 1000;
+ p->range[3].range.min = -get_s16(full_scale->mx) * 100;
+ p->range[3].range.max = get_s16(full_scale->mx) * 100;
+ p->range[4].range.min = -get_s16(full_scale->my) * 100;
+ p->range[4].range.max = get_s16(full_scale->my) * 100;
+ p->range[5].range.min = -get_s16(full_scale->mz) * 100;
+ p->range[5].range.max = get_s16(full_scale->mz) * 100;
+ p->range[6].range.min = -get_s16(full_scale->v1) * 100; // ??
+ p->range[6].range.max = get_s16(full_scale->v1) * 100; // ??
+ p->range[7].range.min = -get_s16(full_scale->v2) * 100; // ??
+ p->range[7].range.max = get_s16(full_scale->v2) * 100; // ??
+ p->range[7].range.min = 0;
+ p->range[7].range.max = 65535;
+
+ use_offset(channel, 0);
+ p->state = state_jr3_init_use_offset_complete;
+ result = 40; // Allow 40 ms for completion
+ }
+ }
+ case state_jr3_init_use_offset_complete: {
+ if (! is_complete(channel)) {
+ printk("state_jr3_init_use_offset_complete complete = %d\n",
+ is_complete(channel));
+ result = 20;
+ } else {
+ printk("%d %d %d %d %d %d\n",
+ get_s16(channel->offsets.fx),
+ get_s16(channel->offsets.fy),
+ get_s16(channel->offsets.fz),
+ get_s16(channel->offsets.mx),
+ get_s16(channel->offsets.my),
+ get_s16(channel->offsets.mz));
+#if 1
+ set_s16(&channel->offsets.fx, 0);
+ set_s16(&channel->offsets.fy, 0);
+ set_s16(&channel->offsets.fz, 0);
+ set_s16(&channel->offsets.mx, 0);
+ set_s16(&channel->offsets.my, 0);
+ set_s16(&channel->offsets.mz, 0);
+#endif
+ set_offset(channel);
+ printk("%d %d %d %d %d %d\n",
+ get_s16(channel->offsets.fx),
+ get_s16(channel->offsets.fy),
+ get_s16(channel->offsets.fz),
+ get_s16(channel->offsets.mx),
+ get_s16(channel->offsets.my),
+ get_s16(channel->offsets.mz));
+
+ p->state = state_jr3_done;
+ }
+ } break;
+ case state_jr3_done: {
+
+ } break;
+ default: {
+
+ } break;
+ }
+ }
+ return result;
+}
+
+static void jr3_pci_poll (unsigned long data)
+{
+ unsigned long flags;
+ comedi_subdevice *s = (comedi_subdevice*)data;
+ jr3_pci_subdev_private *p = s->private;
+ int delay;
+
+ comedi_spin_lock_irqsave(&s->device->spinlock, flags);
+ delay = jr3_pci_poll_subdevice(s);
+ comedi_spin_unlock_irqrestore(&s->device->spinlock, flags);
+
+ if (delay == 0) { delay = 1000; }
+ if (p && delay != 0) {
+ p->timer.expires = jiffies + msecs_to_jiffies(delay);
+ add_timer (&p->timer);
+ }
+}
+
+
+/*
+ The test command, REMOVE!!:
+
+ rmmod jr3_pci ; rmmod comedi; make install ; modprobe jr3_pci; /usr/sbin/comedi_config /dev/comedi0 daqboard/2000 ; tail -40 /var/log/messages
+*/
+
+static int jr3_pci_attach(comedi_device *dev, comedi_devconfig *it)
+{
+ int result = 0;
+ struct pci_dev *card = NULL;
+ int opt_bus, opt_slot, i;
+
+ printk("comedi%d: jr3_pci\n", dev->minor);
+
+ opt_bus = it->options[0];
+ opt_slot = it->options[1];
+
+ if (sizeof(jr3_channel_t) != 0xc00) {
+ printk("sizeof(jr3_channel_t) = %x [expected %x]\n",
+ sizeof(jr3_channel_t), 0xc00);
+ return -EINVAL;
+ }
+
+ result = alloc_private(dev, sizeof(jr3_pci_dev_private));
+ if(result < 0){
+ return -ENOMEM;
+ }
+ card = NULL;
+
+ while(1) {
+ card = pci_get_device(PCI_VENDOR_ID_JR3, PCI_ANY_ID, card);
+ if (card == NULL) {
+ /* No card found */
+ break;
+ } else {
+ switch(card->device) {
+ case PCI_DEVICE_ID_JR3_1_CHANNEL: {
+ devpriv->n_channels = 1;
+ } break;
+ case PCI_DEVICE_ID_JR3_2_CHANNEL: {
+ devpriv->n_channels = 2;
+ } break;
+ case PCI_DEVICE_ID_JR3_3_CHANNEL: {
+ devpriv->n_channels = 3;
+ } break;
+ case PCI_DEVICE_ID_JR3_4_CHANNEL: {
+ devpriv->n_channels = 4;
+ } break;
+ default: {
+ devpriv->n_channels = 0;
+ }
+ }
+ if (devpriv->n_channels >= 1) {
+ if (opt_bus == 0 && opt_slot == 0) {
+ /* Take first available card */
+ break;
+ } else if (opt_bus == card->bus->number &&
+ opt_slot == PCI_SLOT(card->devfn)) {
+ /* Take requested card */
+ break;
+ }
+ }
+ }
+ }
+ if (!card) {
+ printk(" no jr3_pci found\n");
+ return -EIO;
+ }else{
+ devpriv->pci_dev = card;
+ dev->board_name = "jr3_pci";
+ }
+ if((result = pci_enable_device(card))<0){
+ return -EIO;
+ }
+ if((result = pci_request_regions(card, "jr3_pci")) < 0) {
+ return -EIO;
+ }
+ devpriv->iobase = ioremap(pci_resource_start(card,0), sizeof(jr3_t));
+ {
+ // Reset DSP card
+ devpriv->iobase->channel[0].reset = 0;
+
+ // Download code for all channels
+ for (i = devpriv->n_channels - 1 ; i >= 0 ; i--) {
+ jr3_download(devpriv->iobase, i);
+ }
+
+ // It takes a few milliseconds for software to settle
+ // as much as we can read firmware version
+ msleep_interruptible(25);
+ for (i=0 ; i < 0x18 ; i++){
+ printk("%c", get_u16(devpriv->iobase->channel[0].data.copyright[i])>>8);
+ }
+ printk(" (%d channel card)\n", devpriv->n_channels);
+
+ // It takes approximately a little more than 2 seconds for the card to
+ //properly start the new code and synchronize with the force sensors
+// msleep_interruptible(2500);
+ for (i = 0 ; i < devpriv->n_channels ; i++) {
+// jr3_initialize_channel(&devpriv->iobase->channel[i].data);
+ }
+ }
+
+ result = alloc_subdevices(dev, devpriv->n_channels);
+ if(result < 0) goto out;
+
+ dev->open = jr3_pci_open;
+ for (i = 0 ; i < devpriv->n_channels ; i++) {
+ dev->subdevices[i].type = COMEDI_SUBD_AI;
+ dev->subdevices[i].subdev_flags = SDF_READABLE|SDF_GROUND;
+ dev->subdevices[i].n_chan = 8 * 7 + 2;
+ dev->subdevices[i].insn_read = jr3_pci_ai_insn_read;
+ dev->subdevices[i].private = kmalloc(sizeof(jr3_pci_subdev_private),
+ GFP_KERNEL);
+ if (dev->subdevices[i].private) {
+ jr3_pci_subdev_private *p;
+ int j;
+
+ p = dev->subdevices[i].private;
+ memset(p, 0, sizeof(*p));
+ p->channel = &devpriv->iobase->channel[i].data;
+ p->channel_no = i;
+ for (j = 0 ; j < 8 ; j++) {
+ int k;
+
+ p->range[j].length = 1;
+ p->range[j].range.min = -1000000;
+ p->range[j].range.max = 1000000;
+ for (k = 0 ; k < 7 ; k++) {
+ p->range_table_list[j + k * 8] = (comedi_lrange*)&p->range[j];
+ p->maxdata_list[j + k * 8] = 0x7fff;
+ }
+ }
+ p->range[8].length = 1;
+ p->range[j].range.min = 0;
+ p->range[j].range.max = 65536;
+
+ p->range_table_list[56] = (comedi_lrange*)&p->range[8];
+ p->range_table_list[57] = (comedi_lrange*)&p->range[8];
+ p->maxdata_list[56] = 0xffff;
+ p->maxdata_list[57] = 0xffff;
+ // Channel specific range and maxdata
+ dev->subdevices[i].range_table = 0;
+ dev->subdevices[i].range_table_list = p->range_table_list;
+ dev->subdevices[i].maxdata =0;
+ dev->subdevices[i].maxdata_list = p->maxdata_list;
+
+ init_timer (&p->timer);
+ p->timer.data = (unsigned long)&dev->subdevices[i];
+ p->timer.function = jr3_pci_poll;
+ p->timer.expires = jiffies + 10;
+ add_timer (&p->timer);
+ }
+ }
+ out:
+ return result;
+}
+
+static int jr3_pci_detach(comedi_device * dev)
+{
+ int i;
+
+ printk("comedi%d: jr3_pci: remove\n", dev->minor);
+ if (devpriv && devpriv->pci_dev) {
+ if(devpriv->iobase) {
+ iounmap((void*)devpriv->iobase);
+
+ pci_release_regions(devpriv->pci_dev);
+ pci_disable_device(devpriv->pci_dev);
+ }
+ pci_dev_put(devpriv->pci_dev);
+ for (i = 0 ; i < devpriv->n_channels ;i++) {
+ jr3_pci_subdev_private *p;
+
+ p = dev->subdevices[i].private;
+ printk("Cleanup subdevice %d %p\n", i, p);
+ if (p) {
+ del_timer (&p->timer);
+ kfree(dev->subdevices[i].private);
+ }
+ }
+ }
+ return 0;
+}
+
+COMEDI_INITCLEANUP(driver_jr3_pci);
+
diff -urbN orig/comedi/drivers/jr3_pci_firmware.h new/comedi/drivers/jr3_pci_firmware.h
--- orig/comedi/drivers/jr3_pci_firmware.h 1970-01-01 01:00:00.000000000 +0100
+++ new/comedi/drivers/jr3_pci_firmware.h 2007-06-11 10:02:08.000000000 +0200
_at__at_ -0,0 +1,553 _at__at_
+unsigned short jr3_program[] = {
+ /* 4892 words, starting at 0x0004 */
+ 0x131c, 0x0004,
+ 0x0c00, 0x0030, 0x83ff, 0x00f1, 0x4f7f, 0x00f5, 0x2389, 0x000f, 0x93ff,
+ 0x00fa, 0x820e, 0x00e5, 0x2228, 0x000f, 0x3c03, 0x00fc, 0x920e, 0x00ea,
+ 0x93ff, 0x00f1, 0x0a00, 0x001f, 0xffff, 0x00ff, 0xffff, 0x00ff, 0xffff,
+ 0x00ff, 0xffff, 0x00ff, 0xffff, 0x00ff, 0xffff, 0x00ff, 0xffff, 0x00ff,
+ 0x0310, 0x0000, 0x0324, 0x0000, 0x0338, 0x0000, 0x0354, 0x0000, 0x0390,
+ 0x0000, 0x03cc, 0x0000, 0x0408, 0x0000, 0x3240, 0x0000, 0x0053, 0x0000,
+ 0xaacc, 0x0000, 0x08b7, 0x0000, 0x1cce, 0x0000, 0xffff, 0x00ff, 0xffff,
+ 0x00ff, 0x0c00, 0x0030, 0x0d03, 0x00e8, 0x0f06, 0x0002, 0x0d01, 0x00e0,
+ 0x0d04, 0x000f, 0x83ff, 0x00cf, 0x6800, 0x00f1, 0x0d03, 0x00fa, 0x6800,
+ 0x00f1, 0x6000, 0x00f1, 0x6e78, 0x00fd, 0x0d04, 0x000e, 0x0a00, 0x0010,
+ 0x0a00, 0x000f, 0x4003, 0x00c0, 0x2380, 0x000f, 0x0d04, 0x000a, 0x8e0e,
+ 0x006a, 0x1802, 0x009f, 0x0140, 0x0000, 0x015e, 0x0000, 0x0100, 0x0000,
+ 0x0103, 0x0000, 0x0106, 0x0000, 0x0109, 0x0000, 0x010c, 0x0000, 0x010f,
+ 0x0000, 0x085e, 0x0000, 0x5422, 0x0000, 0xce29, 0x0000, 0x0989, 0x0000,
+ 0xf2e7, 0x0000, 0x0989, 0x0000, 0x5422, 0x0000, 0xce29, 0x0000, 0x614f,
+ 0x0000, 0xd577, 0x0000, 0x0bdc, 0x0000, 0xf420, 0x0000, 0x0bdc, 0x0000,
+ 0x614f, 0x0000, 0xd577, 0x0000, 0x74f3, 0x0000, 0xe300, 0x0000, 0x065f,
+ 0x0000, 0x0535, 0x0000, 0x065f, 0x0000, 0x74f3, 0x0000, 0xe300, 0x0000,
+ 0x3801, 0x0002, 0x36fd, 0x0000, 0x82f9, 0x005c, 0x82f9, 0x004b, 0x8000,
+ 0x0056, 0x1c21, 0x00ef, 0x9209, 0x000a, 0x36e8, 0x00f0, 0x36e9, 0x0071,
+ 0x1c25, 0x00af, 0x9209, 0x008a, 0x0a00, 0x000f, 0x3801, 0x0012, 0x36fd,
+ 0x0080, 0x82f9, 0x007c, 0x82f9, 0x006b, 0x8000, 0x0096, 0x1c21, 0x00ef,
+ 0x9209, 0x001a, 0x36e9, 0x00d0, 0x36ea, 0x0051, 0x1c25, 0x00af, 0x9209,
+ 0x009a, 0x0a00, 0x000f, 0x3801, 0x0022, 0x36fe, 0x0000, 0x82f9, 0x009c,
+ 0x82f9, 0x008b, 0x8000, 0x00d6, 0x1c21, 0x00ef, 0x9209, 0x002a, 0x36ea,
+ 0x00b0, 0x36eb, 0x0031, 0x1c25, 0x00af, 0x9209, 0x00aa, 0x0a00, 0x000f,
+ 0x3801, 0x0032, 0x36fe, 0x0080, 0x82f9, 0x00bc, 0x82f9, 0x00ab, 0x8001,
+ 0x0016, 0x1c21, 0x00ef, 0x9209, 0x003a, 0x36eb, 0x0090, 0x36ec, 0x0011,
+ 0x1c25, 0x00af, 0x9209, 0x00ba, 0x0a00, 0x000f, 0x3801, 0x0042, 0x36ff,
+ 0x0000, 0x82f9, 0x00dc, 0x82f9, 0x00cb, 0x8001, 0x0056, 0x1c21, 0x00ef,
+ 0x9209, 0x004a, 0x36ec, 0x0070, 0x36ec, 0x00f1, 0x1c25, 0x00af, 0x9209,
+ 0x00ca, 0x0a00, 0x000f, 0x3801, 0x0052, 0x36ff, 0x0080, 0x82f9, 0x00fc,
+ 0x82f9, 0x00eb, 0x8001, 0x0096, 0x1c21, 0x00ef, 0x9209, 0x005a, 0x36ed,
+ 0x0050, 0x36ed, 0x00d1, 0x1c25, 0x00af, 0x9209, 0x00da, 0x0a00, 0x000f,
+ 0x820e, 0x0084, 0x4000, 0x0010, 0x2780, 0x000f, 0x180b, 0x0041, 0x867a,
+ 0x0000, 0x388b, 0x00c1, 0x1c8c, 0x002f, 0x9209, 0x006a, 0x867a, 0x0070,
+ 0x388b, 0x00f1, 0x1c8c, 0x002f, 0x9209, 0x007a, 0x820e, 0x0084, 0x4000,
+ 0x0030, 0x2780, 0x000f, 0x180b, 0x0041, 0x86e0, 0x0062, 0x36e7, 0x0000,
+ 0x8ee6, 0x00f5, 0x140b, 0x002e, 0x6000, 0x0001, 0x6800, 0x0009, 0x96e0,
+ 0x0062, 0x1c87, 0x002f, 0x1c80, 0x009f, 0x4fff, 0x00fa, 0x8000, 0x0010,
+ 0x4600, 0x0004, 0x26e0, 0x000f, 0x180b, 0x00c2, 0x4000, 0x000a, 0x0d0c,
+ 0x009a, 0x820e, 0x0084, 0x2220, 0x000f, 0x920e, 0x008a, 0x0a00, 0x000f,
+ 0x4000, 0x0084, 0x2260, 0x000f, 0x0d04, 0x0000, 0x0d04, 0x001a, 0x3800,
+ 0x0084, 0x7000, 0x00a4, 0x1c25, 0x00af, 0x7800, 0x00a6, 0x0a00, 0x000f,
+ 0x8209, 0x008a, 0x36ee, 0x0030, 0x36ee, 0x00b1, 0x1c25, 0x00af, 0x920a,
+ 0x000a, 0x0a00, 0x000f, 0x8209, 0x009a, 0x36ef, 0x0010, 0x36ef, 0x0091,
+ 0x1c25, 0x00af, 0x920a, 0x001a, 0x0a00, 0x000f, 0x8209, 0x00aa, 0x36ef,
+ 0x00f0, 0x36f0, 0x0071, 0x1c25, 0x00af, 0x920a, 0x002a, 0x0a00, 0x000f,
+ 0x8209, 0x00ba, 0x36f0, 0x00d0, 0x36f1, 0x0051, 0x1c25, 0x00af, 0x920a,
+ 0x003a, 0x0a00, 0x000f, 0x8209, 0x00ca, 0x36f1, 0x00b0, 0x36f2, 0x0031,
+ 0x1c25, 0x00af, 0x920a, 0x004a, 0x0a00, 0x000f, 0x8209, 0x00da, 0x36f2,
+ 0x0090, 0x36f3, 0x0011, 0x1c25, 0x00af, 0x920a, 0x005a, 0x0a00, 0x000f,
+ 0x3a0a, 0x0001, 0x42f3, 0x0070, 0x180c, 0x001f, 0x3a0a, 0x0011, 0x42f4,
+ 0x0050, 0x180c, 0x001f, 0x3a0a, 0x0021, 0x42f5, 0x0030, 0x180c, 0x001f,
+ 0x3a0a, 0x0031, 0x42f6, 0x0010, 0x180c, 0x001f, 0x3a0a, 0x0041, 0x42f6,
+ 0x00f0, 0x180c, 0x001f, 0x3a0a, 0x0051, 0x42f7, 0x00d0, 0x180c, 0x001f,
+ 0x3a0a, 0x0081, 0x42d0, 0x0040, 0x180c, 0x001f, 0x3a0a, 0x0091, 0x42d1,
+ 0x0020, 0x180c, 0x001f, 0x3a0a, 0x00a1, 0x42d2, 0x0000, 0x180c, 0x001f,
+ 0x3a0a, 0x00b1, 0x42d2, 0x00e0, 0x180c, 0x001f, 0x3a0a, 0x00c1, 0x42d3,
+ 0x00c0, 0x180c, 0x001f, 0x3a0a, 0x00d1, 0x42d4, 0x00a0, 0x180c, 0x001f,
+ 0x3a0b, 0x0001, 0x42d5, 0x0080, 0x180c, 0x001f, 0x3a0b, 0x0011, 0x42d6,
+ 0x0060, 0x180c, 0x001f, 0x3a0b, 0x0021, 0x42d7, 0x0040, 0x180c, 0x001f,
+ 0x3a0b, 0x0031, 0x42d8, 0x0020, 0x180c, 0x001f, 0x3a0b, 0x0041, 0x42d9,
+ 0x0000, 0x180c, 0x001f, 0x3a0b, 0x0051, 0x42d9, 0x00e0, 0x180c, 0x001f,
+ 0x3a0b, 0x0081, 0x42da, 0x00c0, 0x180c, 0x001f, 0x3a0b, 0x0091, 0x42db,
+ 0x00a0, 0x180c, 0x001f, 0x3a0b, 0x00a1, 0x42dc, 0x0080, 0x180c, 0x001f,
+ 0x3a0b, 0x00b1, 0x42dd, 0x0060, 0x180c, 0x001f, 0x3a0b, 0x00c1, 0x42de,
+ 0x0040, 0x180c, 0x001f, 0x3a0b, 0x00d1, 0x42df, 0x0020, 0x180c, 0x001f,
+ 0x867a, 0x0010, 0x388b, 0x00c1, 0x1c8c, 0x002f, 0x9209, 0x00ea, 0x0a00,
+ 0x000f, 0x867a, 0x0020, 0x388b, 0x00c1, 0x1c8c, 0x002f, 0x920a, 0x006a,
+ 0x0a00, 0x000f, 0x867a, 0x0030, 0x388b, 0x00c1, 0x1c8c, 0x002f, 0x920a,
+ 0x00ea, 0x0a00, 0x000f, 0x867a, 0x0040, 0x388b, 0x00c1, 0x1c8c, 0x002f,
+ 0x920b, 0x006a, 0x0a00, 0x000f, 0x867a, 0x0050, 0x388b, 0x00c1, 0x1c8c,
+ 0x002f, 0x920b, 0x00ea, 0x0a00, 0x000f, 0x867a, 0x0060, 0x388b, 0x00c1,
+ 0x1c8c, 0x002f, 0x920c, 0x006a, 0x0a00, 0x000f, 0x867a, 0x0080, 0x388b,
+ 0x00f1, 0x1c8c, 0x002f, 0x9209, 0x00fa, 0x0a00, 0x000f, 0x867a, 0x0090,
+ 0x388b, 0x00f1, 0x1c8c, 0x002f, 0x920a, 0x007a, 0x0a00, 0x000f, 0x867a,
+ 0x00a0, 0x388b, 0x00f1, 0x1c8c, 0x002f, 0x920a, 0x00fa, 0x0a00, 0x000f,
+ 0x867a, 0x00b0, 0x388b, 0x00f1, 0x1c8c, 0x002f, 0x920b, 0x007a, 0x0a00,
+ 0x000f, 0x867a, 0x00c0, 0x388b, 0x00f1, 0x1c8c, 0x002f, 0x920b, 0x00fa,
+ 0x0a00, 0x000f, 0x867a, 0x00d0, 0x388b, 0x00f1, 0x1c8c, 0x002f, 0x920c,
+ 0x007a, 0x0a00, 0x000f, 0x86e0, 0x00e2, 0xa077, 0x0009, 0x96e0, 0x00e2,
+ 0x4000, 0x0000, 0x92f8, 0x00d0, 0x3638, 0x00e0, 0x3606, 0x0081, 0x3400,
+ 0x00a4, 0x3c00, 0x0065, 0x1417, 0x00de, 0x6000, 0x0000, 0x6800, 0x0005,
+ 0x8238, 0x0000, 0x8238, 0x0015, 0x400f, 0x00f1, 0x2389, 0x000f, 0x820f,
+ 0x0084, 0x820f, 0x0091, 0x2e00, 0x005a, 0x2679, 0x0000, 0x1818, 0x00e0,
+ 0x26e0, 0x000f, 0x26e9, 0x0000, 0x1818, 0x00e0, 0x820f, 0x0014, 0x4080,
+ 0x0001, 0x23a1, 0x000f, 0x920f, 0x001a, 0x920f, 0x0080, 0x920f, 0x0095,
+ 0x8238, 0x0030, 0x400f, 0x00f4, 0x2380, 0x000f, 0x0f02, 0x00fc, 0x920f,
+ 0x00cf, 0x0f16, 0x0004, 0x0d00, 0x004f, 0x2220, 0x000f, 0x820f, 0x00d1,
+ 0x920f, 0x00da, 0x8238, 0x0018, 0x0f10, 0x0008, 0x920f, 0x004f, 0x4001,
+ 0x0004, 0x2321, 0x000f, 0x0d00, 0x009a, 0x4000, 0x0018, 0x0e00, 0x000f,
+ 0x4800, 0x0005, 0x232f, 0x000f, 0x0d00, 0x001a, 0x820f, 0x00da, 0x2322,
+ 0x000f, 0x0d00, 0x009a, 0x4000, 0x0018, 0x0e00, 0x000f, 0x232f, 0x000f,
+ 0x0d00, 0x000a, 0x820e, 0x0014, 0x2200, 0x000f, 0x181b, 0x0040, 0x2321,
+ 0x000f, 0x181b, 0x0040, 0x2320, 0x000f, 0x181b, 0x0045, 0x0d00, 0x0004,
+ 0x920e, 0x0010, 0x820e, 0x0000, 0x4666, 0x0064, 0x22e0, 0x000f, 0x2278,
+ 0x0001, 0x181b, 0x00b1, 0x920e, 0x0004, 0x8238, 0x0040, 0x920f, 0x00e0,
+ 0x823f, 0x00e0, 0x920f, 0x00f0, 0x8238, 0x002a, 0x405b, 0x0054, 0x407b,
+ 0x00c5, 0x2608, 0x000f, 0x4000, 0x0041, 0x141c, 0x0065, 0x22e2, 0x000f,
+ 0x2671, 0x000f, 0x2262, 0x000f, 0x2731, 0x000f, 0x4016, 0x00e4, 0x2630,
+ 0x000f, 0x22e2, 0x000f, 0x181d, 0x0014, 0x4016, 0x00d4, 0x141d, 0x0005,
+ 0x22e2, 0x000f, 0x2630, 0x000f, 0x2262, 0x000f, 0x4000, 0x0014, 0x2262,
+ 0x000f, 0x920f, 0x00aa, 0x2310, 0x000f, 0x920f, 0x00ba, 0x363c, 0x0010,
+ 0x365c, 0x0081, 0x3a06, 0x0001, 0x3c00, 0x0065, 0x141d, 0x00ee, 0x6000,
+ 0x0001, 0x7800, 0x0005, 0x6800, 0x0005, 0x0a00, 0x000f, 0x0000, 0x0000,
+ 0xcc01, 0x0000, 0xd801, 0x0000, 0x1400, 0x0000, 0xf001, 0x0000, 0x3c00,
+ 0x0000, 0x2800, 0x0000, 0xe401, 0x0000, 0xa001, 0x0000, 0x6c00, 0x0000,
+ 0x7800, 0x0000, 0xb401, 0x0000, 0x5000, 0x0000, 0x9c01, 0x0000, 0x8801,
+ 0x0000, 0x4400, 0x0000, 0x401e, 0x0000, 0x4fff, 0x00c9, 0x4000, 0x00f1,
+ 0x6000, 0x00f1, 0x141f, 0x00fe, 0x3c00, 0x0045, 0x141f, 0x00ee, 0x2fc7,
+ 0x008f, 0x2791, 0x000f, 0x2270, 0x000f, 0x0d08, 0x001a, 0x5200, 0x0056,
+ 0x0e02, 0x000f, 0x23cf, 0x000f, 0x1000, 0x004a, 0x6000, 0x00f1, 0x0a00,
+ 0x000f, 0x3630, 0x0000, 0x3c08, 0x0005, 0x4000, 0x0004, 0x1c1f, 0x000f,
+ 0x920f, 0x0034, 0x820f, 0x001a, 0x4dff, 0x00f5, 0x238a, 0x000f, 0x920f,
+ 0x001a, 0x2600, 0x000f, 0x1821, 0x0000, 0x4200, 0x0005, 0x23aa, 0x000f,
+ 0x920f, 0x001a, 0x0a00, 0x000f, 0x4000, 0x0004, 0x92e0, 0x0024, 0x3630,
+ 0x0000, 0x3638, 0x0001, 0x3c08, 0x0005, 0x1421, 0x007e, 0x6000, 0x0001,
+ 0x6800, 0x0005, 0x820f, 0x0080, 0x8230, 0x0004, 0x22e0, 0x000f, 0x0a00,
+ 0x0000, 0x1c17, 0x002f, 0x1871, 0x008f, 0x5800, 0x0069, 0x6000, 0x0021,
+ 0xe980, 0x0091, 0xe980, 0x0091, 0xe980, 0x0091, 0xe980, 0x0091, 0xe980,
+ 0x0091, 0x6060, 0x0091, 0x1822, 0x00cc, 0x1213, 0x0091, 0x0e3c, 0x000f,
+ 0x0d00, 0x00ce, 0x0d00, 0x00df, 0x2458, 0x000f, 0x0500, 0x0000, 0x0d00,
+ 0x00ac, 0x0a00, 0x000f, 0x3408, 0x0004, 0x8001, 0x00d8, 0x0f00, 0x00f7,
+ 0x4230, 0x0004, 0x2267, 0x000f, 0x0d04, 0x000a, 0x6000, 0x0002, 0x400f,
+ 0x00f1, 0x2e79, 0x0040, 0x4000, 0x0015, 0x0f16, 0x0001, 0x238f, 0x000f,
+ 0x4fff, 0x0089, 0x0e16, 0x0000, 0x2761, 0x0000, 0x2790, 0x000f, 0x23b6,
+ 0x000f, 0x6ee2, 0x00a0, 0x6000, 0x0042, 0x36e0, 0x0030, 0x1825, 0x0031,
+ 0x66e2, 0x00a2, 0x22ea, 0x0000, 0x6800, 0x00a2, 0x4dff, 0x00f5, 0x26ea,
+ 0x000f, 0x0a00, 0x0001, 0x82e0, 0x002a, 0x227a, 0x000f, 0x1824, 0x00e0,
+ 0x1820, 0x001f, 0x920f, 0x003a, 0x820f, 0x001a, 0x238a, 0x000f, 0x920f,
+ 0x001a, 0x0a00, 0x000f, 0x6ee2, 0x0052, 0x82e0, 0x002a, 0x22ea, 0x0000,
+ 0x26e0, 0x000f, 0x226a, 0x0000, 0x92e0, 0x002a, 0x0a00, 0x000f, 0x3c00,
+ 0x0035, 0x37ff, 0x00d4, 0x1426, 0x00ae, 0xe898, 0x00d5, 0xe9a0, 0x00d7,
+ 0x6920, 0x0025, 0x0d00, 0x00bc, 0x0d00, 0x00cd, 0xe800, 0x00d1, 0xed00,
+ 0x00d1, 0x5101, 0x006d, 0xe902, 0x00d1, 0xe9a0, 0x00d0, 0x6920, 0x0031,
+ 0x6858, 0x00b5, 0x0500, 0x0000, 0x6a7c, 0x00a1, 0x6800, 0x0021, 0x6800,
+ 0x00a1, 0x0a00, 0x000f, 0x2e60, 0x0031, 0x0d00, 0x0075, 0x2029, 0x000f,
+ 0x0500, 0x0000, 0x0e64, 0x000f, 0x1044, 0x0009, 0x2270, 0x000f, 0x0a00,
+ 0x000f, 0x2be1, 0x00e5, 0x1827, 0x00b6, 0x27e6, 0x000f, 0x22f2, 0x000f,
+ 0x1827, 0x00f4, 0x0d00, 0x0081, 0x0f30, 0x00ff, 0x2b00, 0x001e, 0x0d00,
+ 0x004a, 0x22e0, 0x000f, 0x4000, 0x0004, 0x2e79, 0x0015, 0x0611, 0x0000,
+ 0x3c00, 0x00f5, 0x1428, 0x005e, 0x0711, 0x0000, 0x2e7a, 0x0084, 0x0e60,
+ 0x000f, 0x1040, 0x0009, 0x2270, 0x000f, 0x0a00, 0x000f, 0x6000, 0x0003,
+ 0x7000, 0x0047, 0x6660, 0x0030, 0x7210, 0x0074, 0x2829, 0x001a, 0x0500,
+ 0x0000, 0x0e64, 0x000f, 0x1044, 0x0059, 0x6269, 0x0003, 0x0d00, 0x001a,
+ 0x7000, 0x0047, 0x142a, 0x008e, 0x6660, 0x0030, 0x72f1, 0x0074, 0x1829,
+ 0x00f2, 0x2829, 0x009a, 0x0500, 0x0000, 0x2a10, 0x005c, 0x1027, 0x001a,
+ 0x182a, 0x004f, 0x267a, 0x000f, 0x22b0, 0x000f, 0x2829, 0x009a, 0x0500,
+ 0x0000, 0x1024, 0x005f, 0x626f, 0x0003, 0x0e6a, 0x000f, 0x1042, 0x0059,
+ 0x7269, 0x0047, 0x0d00, 0x001a, 0x0a00, 0x000f, 0x37ff, 0x00f4, 0x3bff,
+ 0x0054, 0x3c00, 0x0065, 0x3651, 0x00f1, 0x4244, 0x0074, 0x142c, 0x002e,
+ 0x0d03, 0x0065, 0x4000, 0x0062, 0x20e0, 0x000f, 0x2263, 0x000f, 0x0d00,
+ 0x002a, 0x3c00, 0x0065, 0x142c, 0x001e, 0x0d04, 0x0002, 0x0d03, 0x0005,
+ 0x0d03, 0x0045, 0x2260, 0x000f, 0x424c, 0x00b4, 0x2262, 0x000f, 0x0d08,
+ 0x001a, 0x3c00, 0x0055, 0x1c28, 0x00bf, 0x6800, 0x00a7, 0x6800, 0x00f7,
+ 0x4244, 0x0074, 0x0a00, 0x000f, 0x37ff, 0x00f4, 0x3bff, 0x00f4, 0x364e,
+ 0x0031, 0x3c00, 0x0065, 0x142d, 0x003e, 0x0d03, 0x0065, 0x4000, 0x0062,
+ 0x20e0, 0x000f, 0x4248, 0x00f4, 0x2263, 0x000f, 0x0d08, 0x001a, 0x3645,
+ 0x0030, 0x3c00, 0x0055, 0x1c28, 0x00bf, 0x6800, 0x00a7, 0x6800, 0x00f7,
+ 0x0a00, 0x000f, 0x364d, 0x0080, 0x3a49, 0x0001, 0x182d, 0x009f, 0x3649,
+ 0x0000, 0x3c04, 0x0085, 0x142d, 0x00ce, 0x6000, 0x0001, 0x7800, 0x0005,
+ 0x0a00, 0x000f, 0x4000, 0x0000, 0x3644, 0x0080, 0x3c04, 0x0085, 0x142e,
+ 0x002e, 0x6800, 0x0001, 0x4400, 0x0000, 0x4000, 0x0011, 0x1c2f, 0x001f,
+ 0x2200, 0x000f, 0x0a00, 0x0003, 0x4000, 0x0070, 0x2320, 0x000f, 0x0a00,
+ 0x0002, 0x4001, 0x0050, 0x2260, 0x000f, 0x0d08, 0x001a, 0x5208, 0x0006,
+ 0x0d08, 0x0010, 0x0b00, 0x004f, 0x3a44, 0x0081, 0x3800, 0x00d4, 0x3c00,
+ 0x0065, 0x142f, 0x006e, 0x7800, 0x0005, 0x7800, 0x0014, 0x0a00, 0x000f,
+ 0x0e62, 0x000f, 0x1042, 0x0009, 0x0d00, 0x001f, 0x4418, 0x0095, 0x4000,
+ 0x0064, 0x1c26, 0x00ef, 0x0d00, 0x000a, 0x0d00, 0x001f, 0x2b3f, 0x002a,
+ 0x1830, 0x0067, 0x0d00, 0x0042, 0x2220, 0x000f, 0x0d00, 0x002a, 0x4400,
+ 0x000a, 0x0d00, 0x006a, 0x0a00, 0x000f, 0x1c26, 0x00ef, 0x0d00, 0x000a,
+ 0x0d00, 0x001f, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x1c27,
+ 0x006f, 0x0a00, 0x000f, 0x1c2f, 0x008f, 0x825b, 0x00a8, 0x0e60, 0x000f,
+ 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x00c8, 0x1c30, 0x008f, 0x9247,
+ 0x00cf, 0x9247, 0x00da, 0x0d00, 0x0016, 0x0d00, 0x0002, 0x825b, 0x0098,
+ 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x00d8, 0x1c30,
+ 0x008f, 0x9248, 0x006f, 0x9248, 0x007a, 0x0a00, 0x000f, 0x1c2f, 0x008f,
+ 0x825b, 0x0088, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b,
+ 0x00d8, 0x1c30, 0x008f, 0x9248, 0x004f, 0x9248, 0x005a, 0x0d00, 0x0016,
+ 0x0d00, 0x0002, 0x825b, 0x00a8, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00,
+ 0x005f, 0x825b, 0x00b8, 0x1c30, 0x008f, 0x9247, 0x000f, 0x9247, 0x001a,
+ 0x0a00, 0x000f, 0x1c2f, 0x008f, 0x825b, 0x0098, 0x0e60, 0x000f, 0x1040,
+ 0x0049, 0x0d00, 0x005f, 0x825b, 0x00b8, 0x1c30, 0x008f, 0x9246, 0x00ef,
+ 0x9246, 0x00fa, 0x0d00, 0x0016, 0x0d00, 0x0002, 0x825b, 0x0088, 0x0e60,
+ 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x00c8, 0x1c30, 0x008f,
+ 0x9247, 0x008f, 0x9247, 0x009a, 0x0a00, 0x000f, 0x0d00, 0x0046, 0x2aa0,
+ 0x0042, 0x1835, 0x0027, 0x2220, 0x000f, 0x0d00, 0x002a, 0x4400, 0x000a,
+ 0x0d00, 0x006a, 0x0a00, 0x000f, 0x0d00, 0x001a, 0x1c8a, 0x000f, 0x0e62,
+ 0x000f, 0x0e42, 0x000f, 0x9245, 0x006f, 0x9245, 0x0079, 0x9246, 0x004f,
+ 0x9246, 0x0059, 0x9248, 0x000f, 0x9248, 0x0019, 0x9248, 0x00ef, 0x9248,
+ 0x00f9, 0x0d00, 0x0051, 0x1c8a, 0x003f, 0x0e62, 0x000f, 0x0e42, 0x000f,
+ 0x0d00, 0x0029, 0x0d00, 0x006f, 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b,
+ 0x00a8, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x0098,
+ 0x1c30, 0x008f, 0x9245, 0x008f, 0x9245, 0x009a, 0x0d00, 0x0002, 0x0d00,
+ 0x0016, 0x825b, 0x00d8, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f,
+ 0x825b, 0x00c8, 0x1c30, 0x008f, 0x9248, 0x002f, 0x9248, 0x003a, 0x1c34,
+ 0x00cf, 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b, 0x0098, 0x0e60, 0x000f,
+ 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x00a8, 0x1c30, 0x008f, 0x9246,
+ 0x002f, 0x9246, 0x003a, 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b, 0x00c8,
+ 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x00d8, 0x1c30,
+ 0x008f, 0x9248, 0x00cf, 0x9248, 0x00da, 0x0a00, 0x000f, 0x0d00, 0x001a,
+ 0x1c8a, 0x000f, 0x0e62, 0x000f, 0x0e42, 0x000f, 0x9244, 0x008f, 0x9244,
+ 0x0099, 0x9246, 0x004f, 0x9246, 0x0059, 0x9247, 0x002f, 0x9247, 0x0039,
+ 0x9248, 0x00ef, 0x9248, 0x00f9, 0x0d00, 0x0051, 0x1c8a, 0x003f, 0x0e62,
+ 0x000f, 0x0e42, 0x000f, 0x0d00, 0x0029, 0x0d00, 0x006f, 0x0d00, 0x0002,
+ 0x0d00, 0x0016, 0x825b, 0x0088, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00,
+ 0x005f, 0x825b, 0x00a8, 0x1c30, 0x008f, 0x9246, 0x000f, 0x9246, 0x001a,
+ 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b, 0x00b8, 0x0e60, 0x000f, 0x1040,
+ 0x0049, 0x0d00, 0x005f, 0x825b, 0x00d8, 0x1c30, 0x008f, 0x9248, 0x00af,
+ 0x9248, 0x00ba, 0x1c34, 0x00cf, 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b,
+ 0x00a8, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x0088,
+ 0x1c30, 0x008f, 0x9244, 0x00cf, 0x9244, 0x00da, 0x0d00, 0x0002, 0x0d00,
+ 0x0016, 0x825b, 0x00d8, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f,
+ 0x825b, 0x00b8, 0x1c30, 0x008f, 0x9247, 0x006f, 0x9247, 0x007a, 0x0a00,
+ 0x000f, 0x0d00, 0x001a, 0x1c8a, 0x000f, 0x0e62, 0x000f, 0x0e42, 0x000f,
+ 0x9244, 0x008f, 0x9244, 0x0099, 0x9245, 0x006f, 0x9245, 0x0079, 0x9247,
+ 0x002f, 0x9247, 0x0039, 0x9248, 0x000f, 0x9248, 0x0019, 0x0d00, 0x0051,
+ 0x1c8a, 0x003f, 0x0e62, 0x000f, 0x0e42, 0x000f, 0x0d00, 0x0029, 0x0d00,
+ 0x006f, 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b, 0x0098, 0x0e60, 0x000f,
+ 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x0088, 0x1c30, 0x008f, 0x9244,
+ 0x00af, 0x9244, 0x00ba, 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b, 0x00c8,
+ 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x825b, 0x00b8, 0x1c30,
+ 0x008f, 0x9247, 0x004f, 0x9247, 0x005a, 0x1c34, 0x00cf, 0x0d00, 0x0002,
+ 0x0d00, 0x0016, 0x825b, 0x0088, 0x0e60, 0x000f, 0x1040, 0x0049, 0x0d00,
+ 0x005f, 0x825b, 0x0098, 0x1c30, 0x008f, 0x9245, 0x004f, 0x9245, 0x005a,
+ 0x0d00, 0x0002, 0x0d00, 0x0016, 0x825b, 0x00b8, 0x0e60, 0x000f, 0x1040,
+ 0x0049, 0x0d00, 0x005f, 0x825b, 0x00c8, 0x1c30, 0x008f, 0x9247, 0x00ef,
+ 0x9247, 0x00fa, 0x0a00, 0x000f, 0x4800, 0x0000, 0x4000, 0x0001, 0x1c2f,
+ 0x001f, 0x0a00, 0x000f, 0x364d, 0x0080, 0x365b, 0x0081, 0x3a07, 0x0001,
+ 0x3c00, 0x0065, 0x1442, 0x00ee, 0x6000, 0x0011, 0x6000, 0x0001, 0x3c00,
+ 0x0055, 0x6000, 0x0051, 0x1441, 0x008e, 0x6000, 0x0041, 0x1c45, 0x007f,
+ 0x6000, 0x0051, 0x0900, 0x0003, 0x6000, 0x0085, 0x0e60, 0x000f, 0x1040,
+ 0x0049, 0x0d00, 0x005f, 0x1c26, 0x00ef, 0x0d00, 0x000a, 0x0d00, 0x001f,
+ 0x1c46, 0x003f, 0x47ff, 0x00f5, 0x4000, 0x0004, 0x1c27, 0x006f, 0x0d00,
+ 0x009a, 0x227a, 0x000f, 0x1842, 0x00a3, 0x4000, 0x0009, 0x47ff, 0x00ff,
+ 0x0e27, 0x000f, 0x0d00, 0x004f, 0x2e7e, 0x00af, 0x2220, 0x0001, 0x7800,
+ 0x00a5, 0x3649, 0x0000, 0x365b, 0x0081, 0x3a07, 0x0081, 0x3400, 0x0064,
+ 0x3c00, 0x0025, 0x1445, 0x005e, 0x3c00, 0x0035, 0x1445, 0x004e, 0x6000,
+ 0x0011, 0x6000, 0x0001, 0x6000, 0x0051, 0x6000, 0x0041, 0x1c45, 0x007f,
+ 0x6000, 0x0051, 0x6000, 0x0041, 0x1c45, 0x007f, 0x6000, 0x0085, 0x0e60,
+ 0x000f, 0x1040, 0x0049, 0x0d00, 0x005f, 0x1c26, 0x00ef, 0x0d00, 0x000a,
+ 0x0d00, 0x001f, 0x1c46, 0x003f, 0x4001, 0x0004, 0x820f, 0x00da, 0x22e2,
+ 0x000f, 0x0d00, 0x004a, 0x47ff, 0x00f5, 0x1c27, 0x006f, 0x227a, 0x000f,
+ 0x0d00, 0x009a, 0x1845, 0x0023, 0x4000, 0x0009, 0x47ff, 0x00ff, 0x0e27,
+ 0x000f, 0x7800, 0x00f5, 0x0900, 0x0000, 0x0900, 0x0000, 0x0a00, 0x000f,
+ 0x26e0, 0x000f, 0x0a00, 0x0002, 0x1846, 0x0004, 0x2fe1, 0x00a5, 0x0a00,
+ 0x0006, 0x23e2, 0x000f, 0x1846, 0x0006, 0x22f2, 0x000f, 0x0a00, 0x0004,
+ 0x0d00, 0x0004, 0x0d00, 0x0015, 0x0a00, 0x000f, 0x23e1, 0x000f, 0x0d00,
+ 0x001a, 0x0a00, 0x0007, 0x4000, 0x0014, 0x2260, 0x000f, 0x0d00, 0x000a,
+ 0x4400, 0x0001, 0x0a00, 0x000f, 0x009d, 0x0000, 0x0055, 0x0000, 0x0061,
+ 0x0000, 0x006d, 0x0000, 0x0079, 0x0000, 0x0085, 0x0000, 0x0091, 0x0000,
+ 0x022f, 0x0000, 0x00c0, 0x0000, 0x00c0, 0x0000, 0x00c0, 0x0000, 0x00c0,
+ 0x0000, 0x00c0, 0x0000, 0x00c0, 0x0000, 0x00c0, 0x0000, 0x00c0, 0x0000,
+ 0x8000, 0x0000, 0x000f, 0x0000, 0x2e5f, 0x0000, 0x4000, 0x0000, 0x2000,
+ 0x0000, 0x1000, 0x0000, 0x0800, 0x0000, 0x0400, 0x0000, 0x0200, 0x0000,
+ 0x0100, 0x0000, 0x0080, 0x0000, 0x0040, 0x0000, 0x0020, 0x0000, 0x0010,
+ 0x0000, 0x0008, 0x0000, 0x0004, 0x0000, 0x0002, 0x0000, 0x0001, 0x0000,
+ 0x0001, 0x0000, 0x4320, 0x0000, 0x6f20, 0x0000, 0x7020, 0x0000, 0x7920,
+ 0x0000, 0x7220, 0x0000, 0x6920, 0x0000, 0x6720, 0x0000, 0x6820, 0x0000,
+ 0x7420, 0x0000, 0x2020, 0x0000, 0x4a20, 0x0000, 0x5220, 0x0000, 0x3320,
+ 0x0000, 0x2020, 0x0000, 0x3120, 0x0000, 0x3920, 0x0000, 0x3920, 0x0000,
+ 0x3320, 0x0000, 0x2d20, 0x0000, 0x3220, 0x0000, 0x3020, 0x0000, 0x3020,
+ 0x0000, 0x3020, 0x0000, 0x0000, 0x0000, 0x00ca, 0x0000, 0x00d0, 0x0000,
+ 0x00d6, 0x0000, 0x00dc, 0x0000, 0x00e2, 0x0000, 0x00e8, 0x0000, 0x082e,
+ 0x0000, 0x0136, 0x0000, 0x0154, 0x0000, 0x0883, 0x0000, 0x05c3, 0x0000,
+ 0x078f, 0x0000, 0x00ee, 0x0000, 0x00f1, 0x0000, 0x00f4, 0x0000, 0x00f7,
+ 0x0000, 0x00fa, 0x0000, 0x00fd, 0x0000, 0x085a, 0x0000, 0x013b, 0x0000,
+ 0x0159, 0x0000, 0x0145, 0x0000, 0x0163, 0x0000, 0x0112, 0x0000, 0x0115,
+ 0x0000, 0x0118, 0x0000, 0x011b, 0x0000, 0x011e, 0x0000, 0x0121, 0x0000,
+ 0x014a, 0x0000, 0x0168, 0x0000, 0x0862, 0x0000, 0x0124, 0x0000, 0x0127,
+ 0x0000, 0x012a, 0x0000, 0x012d, 0x0000, 0x0130, 0x0000, 0x0133, 0x0000,
+ 0x014f, 0x0000, 0x016d, 0x0000, 0x0866, 0x0000, 0x05fd, 0x0000, 0x0754,
+ 0x0000, 0x0757, 0x0000, 0x075d, 0x0000, 0x0762, 0x0000, 0x0712, 0x0000,
+ 0x0781, 0x0000, 0x079a, 0x0000, 0x0767, 0x0000, 0x08e0, 0x0000, 0x0729,
+ 0x0000, 0x0825, 0x0000, 0x081b, 0x0000, 0x0032, 0x0000, 0x4002, 0x0080,
+ 0x93ff, 0x00b0, 0x4fff, 0x00e0, 0x93ff, 0x00c0, 0x4fff, 0x00e0, 0x93ff,
+ 0x00d0, 0x3c00, 0x0074, 0x3c06, 0x0001, 0x4000, 0x0000, 0x93ff, 0x00e0,
+ 0x41c0, 0x0000, 0x93ff, 0x00f0, 0x0200, 0x008f, 0x4000, 0x0000, 0x93fe,
+ 0x00f0, 0x4000, 0x00f0, 0x93ff, 0x0000, 0x4000, 0x0000, 0x93ff, 0x0010,
+ 0x42a1, 0x00f0, 0x93ff, 0x0020, 0x4000, 0x0000, 0x93ff, 0x0030, 0x4000,
+ 0x0030, 0x93ff, 0x0040, 0x4000, 0x0000, 0x93ff, 0x0050, 0x42a0, 0x0030,
+ 0x93ff, 0x0060, 0x4000, 0x0000, 0x93ff, 0x0070, 0x4000, 0x0000, 0x93ff,
+ 0x0080, 0x4000, 0x0000, 0x93ff, 0x0090, 0x4000, 0x0000, 0x93ff, 0x00a0,
+ 0x3400, 0x0008, 0x3400, 0x0009, 0x3800, 0x0008, 0x3800, 0x0009, 0x3400,
+ 0x0015, 0x3400, 0x0006, 0x37ff, 0x00f7, 0x3800, 0x0015, 0x3800, 0x0006,
+ 0x3bff, 0x00f7, 0x3804, 0x0003, 0x3801, 0x005b, 0x3800, 0x006a, 0x36e1,
+ 0x0003, 0x3401, 0x000b, 0x3401, 0x000a, 0x0c00, 0x0030, 0x4000, 0x0000,
+ 0x4000, 0x0001, 0x4000, 0x0004, 0x4000, 0x0005, 0x4000, 0x0002, 0x4000,
+ 0x0003, 0x4000, 0x0006, 0x4000, 0x0007, 0x4000, 0x0008, 0x4000, 0x0009,
+ 0x4000, 0x000a, 0x4000, 0x000b, 0x4000, 0x000c, 0x4000, 0x000d, 0x4000,
+ 0x000e, 0x4000, 0x000f, 0x0c00, 0x0020, 0x1853, 0x000f, 0x4a5a, 0x0054,
+ 0x45a5, 0x00a5, 0x1452, 0x00ee, 0x6800, 0x0042, 0x6000, 0x0002, 0x6bc0,
+ 0x0052, 0x67b2, 0x0002, 0x23c8, 0x000f, 0x27b2, 0x000f, 0xa000, 0x0001,
+ 0x0a00, 0x000f, 0x2618, 0x000f, 0x3600, 0x0000, 0x3d00, 0x0005, 0x1c52,
+ 0x005f, 0x1853, 0x0070, 0x4040, 0x0000, 0x920f, 0x0010, 0x4800, 0x0000,
+ 0x92fd, 0x0000, 0x92fd, 0x0080, 0x92fe, 0x0000, 0x92fe, 0x0080, 0x92ff,
+ 0x0000, 0x92ff, 0x0080, 0x4fff, 0x0000, 0x92fd, 0x0060, 0x92fd, 0x00e0,
+ 0x92fe, 0x0060, 0x92fe, 0x00e0, 0x92ff, 0x0060, 0x92ff, 0x00e0, 0x4000,
+ 0x0000, 0x92fd, 0x0070, 0x92fd, 0x00f0, 0x92fe, 0x0070, 0x92fe, 0x00f0,
+ 0x92ff, 0x0070, 0x92ff, 0x00f0, 0x3600, 0x0020, 0x3846, 0x00b1, 0x3400,
+ 0x0044, 0x3c01, 0x0005, 0x1455, 0x002e, 0x5000, 0x0005, 0x6800, 0x0000,
+ 0x36e0, 0x0050, 0xa2e1, 0x0001, 0xa2e2, 0x0001, 0xa2e2, 0x0001, 0xa2e3,
+ 0x0001, 0xa2e3, 0x0001, 0xa2c0, 0x0001, 0xa2c0, 0x0001, 0xa2c1, 0x0001,
+ 0xa2c1, 0x0001, 0xa2c2, 0x0001, 0xa2c2, 0x0001, 0x4280, 0x0000, 0x42bf,
+ 0x00f4, 0x2720, 0x000f, 0x2230, 0x000f, 0x92e0, 0x0000, 0x92e0, 0x001a,
+ 0x4300, 0x0004, 0x820f, 0x001a, 0x23a2, 0x000f, 0x920f, 0x003a, 0x920f,
+ 0x001a, 0x3c01, 0x0035, 0x36e5, 0x00c0, 0x3847, 0x00b1, 0x1456, 0x00fe,
+ 0x5000, 0x0005, 0x6800, 0x0001, 0x82e5, 0x00e0, 0x9006, 0x0010, 0x4012,
+ 0x00ca, 0x920f, 0x005a, 0x4014, 0x007a, 0x920f, 0x006a, 0x407d, 0x001a,
+ 0x920f, 0x007a, 0x3c01, 0x0085, 0x3848, 0x00e1, 0x3604, 0x0000, 0x1457,
+ 0x00de, 0x5000, 0x0005, 0x6800, 0x0001, 0x4003, 0x00f0, 0x9208, 0x00f0,
+ 0x4000, 0x0000, 0x920e, 0x0030, 0x4209, 0x0000, 0x920e, 0x0020, 0x9207,
+ 0x00f0, 0x3c00, 0x00b5, 0x36e6, 0x00f0, 0x384a, 0x0061, 0xa000, 0x00b1,
+ 0x1458, 0x00be, 0x5000, 0x0005, 0x6800, 0x0001, 0x3c00, 0x00a5, 0x36e7,
+ 0x00f0, 0x384b, 0x0011, 0xa000, 0x00a1, 0x1459, 0x002e, 0x5000, 0x0005,
+ 0x6800, 0x0001, 0x3c00, 0x0095, 0x36c3, 0x0000, 0x3803, 0x0071, 0xa000,
+ 0x0091, 0x1459, 0x009e, 0x5000, 0x0005, 0x6800, 0x0001, 0x3c00, 0x00b5,
+ 0x36c4, 0x0000, 0x384b, 0x00b1, 0xa000, 0x00b1, 0x145a, 0x000e, 0x5000,
+ 0x0005, 0x6800, 0x0001, 0x3c00, 0x0095, 0x36c5, 0x0000, 0x384c, 0x0061,
+ 0xa000, 0x0091, 0x145a, 0x007e, 0x5000, 0x0005, 0x6800, 0x0001, 0x3c00,
+ 0x00e5, 0x36e4, 0x0000, 0x384c, 0x00f1, 0x145a, 0x00de, 0x5000, 0x0005,
+ 0x6800, 0x0001, 0x188b, 0x008f, 0x3a00, 0x0061, 0x3800, 0x0044, 0x3c00,
+ 0x0025, 0x145b, 0x009e, 0x3c00, 0x0065, 0x145b, 0x008e, 0x7000, 0x0004,
+ 0x0d08, 0x0020, 0x0b00, 0x009f, 0x3800, 0x0044, 0x3a00, 0x0061, 0x8208,
+ 0x00e4, 0x1c78, 0x001f, 0x820f, 0x0010, 0x4eff, 0x00f4, 0x2380, 0x000f,
+ 0x920f, 0x001a, 0x4000, 0x0004, 0x0180, 0x0004, 0x185f, 0x008f, 0x4210,
+ 0x000b, 0x8206, 0x00f2, 0x4000, 0x0086, 0x2160, 0x000f, 0x0d04, 0x000b,
+ 0x6000, 0x0041, 0x820f, 0x002a, 0x6382, 0x0001, 0x6678, 0x0051, 0x185d,
+ 0x0050, 0x0d0c, 0x0050, 0x145d, 0x004e, 0x6000, 0x0001, 0x6000, 0x0041,
+ 0x0d04, 0x0010, 0x6000, 0x0006, 0x66e0, 0x0041, 0x23a2, 0x0005, 0x2608,
+ 0x000f, 0x185d, 0x00f0, 0x0d0c, 0x0055, 0x145d, 0x00ee, 0x6000, 0x0001,
+ 0x6000, 0x0041, 0x0d04, 0x0010, 0x6000, 0x0006, 0x66e0, 0x0041, 0x23a2,
+ 0x0003, 0x920f, 0x002a, 0x2782, 0x001f, 0x0203, 0x0001, 0x0202, 0x0000,
+ 0x2782, 0x005f, 0x020c, 0x0001, 0x0208, 0x0000, 0x0a00, 0x000f, 0x86e0,
+ 0x0052, 0x6000, 0x000a, 0x2678, 0x000f, 0x1863, 0x0091, 0x820e, 0x0074,
+ 0x2200, 0x000f, 0x1860, 0x0003, 0x0f02, 0x00f8, 0x4000, 0x00d5, 0x22ef,
+ 0x000f, 0x36e4, 0x0000, 0x185f, 0x0052, 0x0d04, 0x004f, 0x0900, 0x0000,
+ 0x6000, 0x00a2, 0x0d08, 0x001a, 0x0b00, 0x005f, 0x82e0, 0x004a, 0x920e,
+ 0x007a, 0x4000, 0x000a, 0x92e0, 0x004a, 0x1860, 0x000f, 0x4801, 0x004a,
+ 0x92e0, 0x004a, 0x0a00, 0x000f, 0x36e0, 0x0070, 0x86e0, 0x0072, 0x6218,
+ 0x000a, 0x6e78, 0x00a9, 0x1863, 0x0041, 0x36e0, 0x0090, 0x86e0, 0x0092,
+ 0x6218, 0x000a, 0x6e78, 0x00a9, 0x1863, 0x0041, 0x36e0, 0x00b0, 0x86e0,
+ 0x00b2, 0x6218, 0x000a, 0x6e78, 0x00a9, 0x1863, 0x0041, 0x36e0, 0x00d0,
+ 0x86e0, 0x00d2, 0x6218, 0x000a, 0x6e78, 0x00a9, 0x1863, 0x0041, 0x36e0,
+ 0x00f0, 0x86e0, 0x00f2, 0x6218, 0x000a, 0x6e78, 0x00a9, 0x1863, 0x0041,
+ 0x820e, 0x00f4, 0x2220, 0x000f, 0x920e, 0x00fa, 0x4c00, 0x0005, 0x0100,
+ 0x0010, 0x9203, 0x0030, 0x2780, 0x00df, 0x1862, 0x00a1, 0x83ff, 0x00c4,
+ 0x8200, 0x0000, 0x2720, 0x000f, 0x403e, 0x0080, 0x2730, 0x000f, 0x4000,
+ 0x0005, 0x1862, 0x00a4, 0x93ff, 0x00c0, 0x4400, 0x0005, 0x820f, 0x0010,
+ 0x43ff, 0x00f4, 0x2380, 0x000f, 0x23aa, 0x000f, 0x920f, 0x001a, 0x2608,
+ 0x000f, 0x185e, 0x0070, 0x4000, 0x0001, 0x0d0c, 0x0091, 0x185e, 0x007f,
+ 0x0d08, 0x0010, 0x0d01, 0x0002, 0x6800, 0x0002, 0x0b00, 0x005f, 0x185e,
+ 0x007f, 0xa000, 0x0009, 0x96e0, 0x0052, 0x0d08, 0x0010, 0x0b00, 0x005f,
+ 0x185e, 0x007f, 0x3644, 0x0071, 0x3c02, 0x0045, 0x1465, 0x00fe, 0x0d03,
+ 0x0085, 0x0f00, 0x00ff, 0x267f, 0x000f, 0x2677, 0x000f, 0x2677, 0x000f,
+ 0x0d03, 0x00a5, 0x4000, 0x0065, 0x1464, 0x00a2, 0x22ea, 0x000f, 0x2630,
+ 0x000f, 0x4238, 0x0030, 0x2270, 0x000f, 0x0d04, 0x000a, 0x267e, 0x000f,
+ 0x1865, 0x0045, 0x6000, 0x00e1, 0x6000, 0x00e1, 0x6000, 0x00f1, 0x1865,
+ 0x008f, 0x6000, 0x0083, 0x0f00, 0x00f8, 0x6000, 0x0083, 0x0f18, 0x00f8,
+ 0x2b3e, 0x009f, 0x1865, 0x00e7, 0x0d00, 0x0049, 0x2220, 0x000f, 0x0d00,
+ 0x009a, 0x4400, 0x000a, 0x6800, 0x0097, 0x6800, 0x00a7, 0x3c00, 0x0065,
+ 0x3638, 0x00e0, 0x3608, 0x0001, 0x3a5b, 0x0081, 0x3400, 0x00a4, 0x1466,
+ 0x008e, 0x6000, 0x0000, 0x7800, 0x0005, 0x6800, 0x0005, 0x363c, 0x0010,
+ 0x365c, 0x0081, 0x3c00, 0x0065, 0x1466, 0x00ee, 0x6000, 0x0001, 0x6800,
+ 0x0005, 0x0a00, 0x000f, 0x8207, 0x0072, 0x4000, 0x0086, 0x4220, 0x000b,
+ 0x2160, 0x000f, 0x92f8, 0x00bb, 0x4000, 0x0004, 0x92f8, 0x00c4, 0x1c2d,
+ 0x00ef, 0x3644, 0x0080, 0x1c2d, 0x006f, 0x82f8, 0x00c4, 0x2220, 0x000f,
+ 0x92f8, 0x00ca, 0x86f8, 0x00b0, 0x6000, 0x0041, 0x6200, 0x0051, 0x96f8,
+ 0x00b0, 0x1868, 0x0080, 0x2608, 0x000f, 0x1867, 0x00a0, 0x1c2d, 0x00ef,
+ 0x1c2a, 0x00af, 0x1c2d, 0x005f, 0x1867, 0x00af, 0x3a52, 0x0001, 0x1c2d,
+ 0x008f, 0x3a44, 0x0081, 0x1c2d, 0x008f, 0x3640, 0x0000, 0x1c2d, 0x006f,
+ 0x1c2a, 0x00af, 0x3aff, 0x00f1, 0x3651, 0x00f0, 0x37ff, 0x00e4, 0x3bff,
+ 0x0074, 0x4001, 0x0005, 0x3c00, 0x0065, 0x146b, 0x006e, 0x6000, 0x00a0,
+ 0x3c00, 0x0055, 0x1469, 0x00be, 0x6000, 0x0040, 0x26e2, 0x000f, 0x2200,
+ 0x0004, 0x227a, 0x000f, 0x2218, 0x0004, 0x7aea, 0x00a7, 0x7a6a, 0x00a7,
+ 0x0d03, 0x00f5, 0x4000, 0x0076, 0x2887, 0x0046, 0x2b27, 0x000a, 0x0d00,
+ 0x00ca, 0x4000, 0x00c5, 0x3c00, 0x0065, 0x146b, 0x005e, 0x0d03, 0x0045,
+ 0x2263, 0x000f, 0x2262, 0x000f, 0x26e4, 0x000f, 0x22ea, 0x0004, 0x424c,
+ 0x0094, 0x2262, 0x000f, 0x0d04, 0x001a, 0x6000, 0x0047, 0x2320, 0x000f,
+ 0x0d00, 0x009a, 0x6000, 0x0087, 0x0e20, 0x000f, 0x7800, 0x00f7, 0x4001,
+ 0x0005, 0x1c40, 0x00cf, 0x4000, 0x0004, 0x1c2d, 0x00ef, 0x3644, 0x0080,
+ 0x1c2d, 0x006f, 0x86f8, 0x00b0, 0x37ff, 0x00d4, 0x0900, 0x0000, 0x96f8,
+ 0x00b0, 0x82f8, 0x00c4, 0x2300, 0x000f, 0x92f8, 0x00ca, 0x186d, 0x0000,
+ 0x86f8, 0x00b0, 0x6000, 0x0053, 0x62a8, 0x0043, 0x96f8, 0x00b0, 0x186c,
+ 0x0000, 0x186c, 0x00b7, 0x47ff, 0x00fa, 0x0d00, 0x005a, 0x1c2d, 0x00ef,
+ 0x1c2a, 0x00af, 0x1c2d, 0x005f, 0x186c, 0x000f, 0x3a56, 0x0081, 0x1c2d,
+ 0x008f, 0x0a00, 0x000f, 0x3640, 0x0000, 0x365b, 0x0081, 0x3a5b, 0x0001,
+ 0x3c00, 0x0065, 0x6000, 0x0086, 0x146e, 0x00ae, 0x0e60, 0x000f, 0x1040,
+ 0x0009, 0x7000, 0x0085, 0x6800, 0x0085, 0x1060, 0x001f, 0x1040, 0x0049,
+ 0x0d00, 0x005f, 0x1c27, 0x006f, 0x0d00, 0x004a, 0x0d00, 0x005f, 0x3c00,
+ 0x0065, 0x146e, 0x009e, 0x6000, 0x0011, 0x6000, 0x0003, 0x1c26, 0x00ef,
+ 0x6800, 0x00f1, 0x6800, 0x00a1, 0x6000, 0x0086, 0x365b, 0x0000, 0x3608,
+ 0x0001, 0x3c00, 0x0065, 0x146f, 0x000e, 0x6000, 0x0001, 0x6800, 0x0005,
+ 0x0a00, 0x000f, 0x3640, 0x0000, 0x365c, 0x0081, 0x3a06, 0x0001, 0x3c00,
+ 0x0065, 0x1471, 0x000e, 0x7000, 0x0085, 0x1060, 0x0028, 0x1040, 0x0049,
+ 0x667f, 0x0086, 0x1870, 0x00e0, 0x1060, 0x005f, 0x1040, 0x0009, 0x2e7f,
+ 0x001f, 0x1870, 0x00e0, 0x6800, 0x0026, 0x1c27, 0x006f, 0x0d00, 0x004a,
+ 0x0d00, 0x005f, 0x3400, 0x00b4, 0x3c00, 0x0065, 0x1470, 0x00be, 0x6000,
+ 0x0011, 0x6000, 0x0003, 0x1c26, 0x00ef, 0x6800, 0x00f1, 0x6800, 0x00a0,
+ 0x37fb, 0x0084, 0x0900, 0x0000, 0x0900, 0x0005, 0x0900, 0x0001, 0x0900,
+ 0x0001, 0x0a00, 0x000f, 0x4000, 0x00f0, 0x820e, 0x0074, 0x2380, 0x000f,
+ 0x9207, 0x007a, 0x1c94, 0x00cf, 0x1875, 0x000f, 0x1c94, 0x00cf, 0x825b,
+ 0x0000, 0x2278, 0x000f, 0x1874, 0x00e1, 0x365b, 0x00d1, 0x3a06, 0x00d1,
+ 0x7218, 0x0047, 0x3c00, 0x0065, 0x1472, 0x003e, 0x6000, 0x0007, 0x76e0,
+ 0x0047, 0x2210, 0x0001, 0x3a06, 0x0081, 0x627a, 0x0005, 0x1c97, 0x0081,
+ 0x1c63, 0x00ef, 0x1875, 0x000f, 0x1c94, 0x00cf, 0x825b, 0x0000, 0x3608,
+ 0x0000, 0x6278, 0x0002, 0x1873, 0x0011, 0x2278, 0x000f, 0x1875, 0x0000,
+ 0x1874, 0x005f, 0x3c00, 0x0065, 0x2278, 0x000f, 0x1873, 0x00c1, 0x365b,
+ 0x0001, 0x3a06, 0x0081, 0x3c00, 0x0065, 0x1473, 0x00ae, 0x7000, 0x0005,
+ 0x6800, 0x0001, 0x6800, 0x00a5, 0x1874, 0x00bf, 0x365b, 0x0051, 0x3a08,
+ 0x0051, 0x7218, 0x0047, 0x1474, 0x002e, 0x6000, 0x0007, 0x76e0, 0x0047,
+ 0x2210, 0x0001, 0x227a, 0x000f, 0x1875, 0x0000, 0x3608, 0x0000, 0x365b,
+ 0x0001, 0x3c00, 0x0065, 0x1474, 0x00ae, 0x6000, 0x0001, 0x6800, 0x0005,
+ 0x365b, 0x0081, 0x3a08, 0x0001, 0x1c97, 0x008f, 0x1c63, 0x00ef, 0x1c6d,
+ 0x003f, 0x1c6f, 0x002f, 0x1c67, 0x000f, 0x1c92, 0x007f, 0x0a00, 0x000f,
+ 0x860e, 0x0060, 0x6000, 0x0042, 0x1875, 0x00bf, 0x860e, 0x0060, 0x6000,
+ 0x0042, 0x820e, 0x005a, 0x6800, 0x00a2, 0x920e, 0x0054, 0x0a00, 0x000f,
+ 0x860e, 0x0060, 0x820e, 0x005a, 0x6000, 0x0042, 0x23a2, 0x000f, 0x1875,
+ 0x00af, 0x860e, 0x0060, 0x820e, 0x005a, 0x6362, 0x0042, 0x2382, 0x000f,
+ 0x1875, 0x00af, 0x3608, 0x0080, 0x360a, 0x0001, 0x3c00, 0x0065, 0x6000,
+ 0x0045, 0x1476, 0x00ee, 0x6000, 0x0002, 0x6260, 0x0045, 0x6800, 0x00a1,
+ 0x1879, 0x00af, 0x82f8, 0x00d0, 0x820e, 0x00d4, 0x2278, 0x000f, 0x1877,
+ 0x00b1, 0x4000, 0x0080, 0x2260, 0x000f, 0x92f8, 0x00da, 0x86e0, 0x00e2,
+ 0xa077, 0x0009, 0x96e0, 0x00e2, 0x0a00, 0x000f, 0x22e0, 0x000f, 0x1877,
+ 0x0072, 0x1c76, 0x007f, 0x4000, 0x0000, 0x92f8, 0x00d0, 0x0a00, 0x000f,
+ 0x4000, 0x00f0, 0x2380, 0x000f, 0x9208, 0x00ea, 0x1c7b, 0x000f, 0x36f8,
+ 0x00e0, 0x3608, 0x0081, 0x3c00, 0x0065, 0x0c0c, 0x0000, 0x1478, 0x00ce,
+ 0x6000, 0x00a1, 0x233a, 0x000f, 0x6800, 0x00a5, 0x0c08, 0x0000, 0x0a00,
+ 0x000f, 0x36f9, 0x0030, 0x3608, 0x00d1, 0x3c00, 0x0065, 0x2218, 0x000f,
+ 0x6000, 0x0047, 0x1479, 0x007e, 0x6000, 0x0003, 0x6660, 0x0047, 0x2210,
+ 0x0001, 0x227a, 0x000f, 0x0a00, 0x0000, 0x8208, 0x00e6, 0x4000, 0x00db,
+ 0x20e3, 0x000f, 0x4261, 0x0095, 0x226b, 0x000f, 0x0d04, 0x001a, 0x3608,
+ 0x00d0, 0x3c00, 0x0065, 0x0c0c, 0x0000, 0x147a, 0x00ae, 0x1c7c, 0x007f,
+ 0x6000, 0x00a2, 0x233a, 0x000f, 0x0e22, 0x000f, 0x6b3a, 0x00f7, 0x6800,
+ 0x00a3, 0x6800, 0x00e7, 0x0c08, 0x0000, 0x37ff, 0x0044, 0x0900, 0x0004,
+ 0xa000, 0x0017, 0xa000, 0x0006, 0x8208, 0x00e6, 0x4000, 0x00db, 0x20e3,
+ 0x000f, 0x4260, 0x00e5, 0x226b, 0x000f, 0x0d08, 0x001a, 0x36f9, 0x0040,
+ 0x3c00, 0x00c5, 0x147b, 0x00ae, 0x7000, 0x0055, 0x6800, 0x0051, 0x36f9,
+ 0x0030, 0x36f9, 0x00f1, 0x3c00, 0x0065, 0x147c, 0x005e, 0x1c7c, 0x007f,
+ 0x6000, 0x0087, 0x1240, 0x0087, 0x1258, 0x0052, 0x6eef, 0x00f3, 0x1c7d,
+ 0x000f, 0x0000, 0x0000, 0x0a00, 0x000f, 0x0d03, 0x0085, 0x0f10, 0x0003,
+ 0x42fc, 0x00f5, 0x226e, 0x000f, 0x0d08, 0x001a, 0x7000, 0x0056, 0x22a8,
+ 0x000f, 0x0d00, 0x009a, 0x0a00, 0x000f, 0x3a08, 0x00f1, 0x0d0b, 0x0045,
+ 0x4000, 0x0076, 0x0d03, 0x00b5, 0x70e3, 0x0064, 0x0d08, 0x004b, 0x7218,
+ 0x0016, 0x2a71, 0x001a, 0x3ae8, 0x0011, 0x0900, 0x0014, 0x1c7f, 0x002f,
+ 0x3aed, 0x0051, 0x0900, 0x0014, 0x1c7f, 0x002f, 0x3af2, 0x0091, 0x0900,
+ 0x0014, 0x1c7f, 0x002f, 0x3acf, 0x0061, 0x0900, 0x0014, 0x1c7f, 0x002f,
+ 0x3ad4, 0x00a1, 0x0900, 0x0014, 0x1c7f, 0x002f, 0x3ad9, 0x00e1, 0x0900,
+ 0x0014, 0x1c7f, 0x002f, 0x3a08, 0x00f1, 0x0d0b, 0x0045, 0x0900, 0x0014,
+ 0x3800, 0x0084, 0x3c00, 0x0075, 0x147f, 0x000e, 0x7800, 0x00a4, 0x0a00,
+ 0x000f, 0x3c00, 0x0085, 0x147f, 0x004e, 0x7800, 0x00a5, 0x3c00, 0x0065,
+ 0x147f, 0x007e, 0x7800, 0x0015, 0x0a00, 0x000f, 0x7fff, 0x0000, 0x8000,
+ 0x0000, 0x7fff, 0x0000, 0x8000, 0x0000, 0x7fff, 0x0000, 0x8000, 0x0000,
+ 0x7fff, 0x0000, 0x8000, 0x0000, 0x7fff, 0x0000, 0x8000, 0x0000, 0x7fff,
+ 0x0000, 0x8000, 0x0000, 0x7fff, 0x0000, 0x8000, 0x0000, 0x7fff, 0x0000,
+ 0x8000, 0x0000, 0x8607, 0x00f1, 0x387f, 0x0091, 0x3800, 0x0024, 0x3bff,
+ 0x00e7, 0x3c00, 0x0085, 0xc000, 0x0055, 0x52e0, 0x0055, 0x1481, 0x008e,
+ 0x1881, 0x0045, 0x5000, 0x0017, 0x5800, 0x0004, 0xc2e8, 0x0055, 0x1881,
+ 0x0083, 0x526a, 0x0017, 0x5800, 0x00a4, 0x52e0, 0x0055, 0x3bff, 0x00f7,
+ 0x0a00, 0x000f, 0x360d, 0x0000, 0x360d, 0x0081, 0x387f, 0x0091, 0x3c00,
+ 0x0085, 0x1482, 0x003e, 0x5000, 0x0005, 0x6800, 0x0001, 0x5000, 0x0005,
+ 0x6800, 0x0005, 0x0a00, 0x000f, 0x1c81, 0x00bf, 0x8607, 0x00f1, 0x387f,
+ 0x0091, 0x3c00, 0x0085, 0x1482, 0x00ce, 0x6000, 0x0005, 0x5800, 0x0005,
+ 0x5800, 0x0005, 0x0a00, 0x000f, 0x820e, 0x0094, 0x2220, 0x000f, 0x920e,
+ 0x009a, 0x4000, 0x0030, 0x2780, 0x000f, 0x0a00, 0x0001, 0x86e0, 0x0082,
+ 0x36e8, 0x0000, 0x8ee7, 0x00f5, 0x1483, 0x009e, 0x6000, 0x0001, 0x6800,
+ 0x0009, 0x96e0, 0x0082, 0x4000, 0x00f0, 0x2780, 0x000f, 0x0a00, 0x0001,
+ 0x86e0, 0x00a2, 0x36c3, 0x0010, 0x8ec3, 0x0005, 0x1484, 0x003e, 0x6000,
+ 0x0001, 0x6800, 0x0009, 0x96e0, 0x00a2, 0x4003, 0x00f0, 0x2780, 0x000f,
+ 0x0a00, 0x0001, 0x86e0, 0x00c2, 0x36c4, 0x0010, 0x8ec4, 0x0005, 0x1484,
+ 0x00de, 0x6000, 0x0001, 0x6800, 0x0009, 0x96e0, 0x00c2, 0x400f, 0x00f0,
+ 0x2780, 0x000f, 0x0a00, 0x0001, 0x86e0, 0x00e2, 0x36c5, 0x0010, 0x8ec5,
+ 0x0005, 0x1485, 0x007e, 0x6000, 0x0001, 0x6800, 0x0009, 0x96e0, 0x00e2,
+ 0x0a00, 0x000f, 0x820e, 0x00a4, 0x2220, 0x000f, 0x920e, 0x00aa, 0x0a00,
+ 0x000f, 0x820e, 0x00b4, 0x2220, 0x000f, 0x920e, 0x00ba, 0x0a00, 0x000f,
+ 0x820e, 0x00c4, 0x2220, 0x000f, 0x920e, 0x00ca, 0x0a00, 0x000f, 0x820e,
+ 0x00d4, 0x2220, 0x000f, 0x920e, 0x00da, 0x0a00, 0x000f, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x360e, 0x0040, 0x6000, 0x0043,
+ 0x6220, 0x0041, 0x6ee2, 0x00a2, 0x0a00, 0x0001, 0xa000, 0x0002, 0x860e,
+ 0x0020, 0x360c, 0x0081, 0x3886, 0x00a1, 0x0c0c, 0x0000, 0x3c00, 0x0085,
+ 0x1488, 0x000e, 0xc000, 0x0061, 0x5ae0, 0x0005, 0x6800, 0x00a5, 0x0c08,
+ 0x0000, 0x0a00, 0x000f, 0x3400, 0x0050, 0x3400, 0x0044, 0x360e, 0x0001,
+ 0x4ffc, 0x0004, 0x820f, 0x0001, 0x6381, 0x0000, 0x820f, 0x0011, 0x2b81,
+ 0x00ba, 0x0d00, 0x00ca, 0x3c00, 0x0065, 0x4000, 0x001f, 0x4000, 0x0019,
+ 0x1489, 0x00ce, 0x23e0, 0x000f, 0x6000, 0x0045, 0x2360, 0x0006, 0x26e2,
+ 0x000f, 0x6000, 0x0047, 0x1889, 0x00c4, 0x0d00, 0x005f, 0x2bab, 0x000a,
+ 0x2ae0, 0x00ba, 0x1889, 0x00c4, 0x23ac, 0x000f, 0x0d00, 0x00ca, 0x1207,
+ 0x0000, 0x920f, 0x000b, 0x920f, 0x001c, 0x0a00, 0x000f, 0x4400, 0x0004,
+ 0x2262, 0x000f, 0x0d00, 0x005a, 0x4400, 0x0000, 0x2f88, 0x00a5, 0x22a8,
+ 0x0001, 0x47ff, 0x00f4, 0x2382, 0x000f, 0x0d00, 0x007a, 0x3801, 0x00d1,
+ 0x542a, 0x0035, 0x5089, 0x0035, 0x3c00, 0x0035, 0x148a, 0x00fe, 0x2111,
+ 0x000f, 0x5432, 0x0035, 0x2111, 0x000f, 0x0f24, 0x0003, 0x0f1b, 0x0003,
+ 0x227f, 0x000f, 0x2200, 0x0004, 0x2608, 0x000f, 0x233a, 0x0004, 0x0a00,
+ 0x000f, 0x1c8e, 0x003f, 0x3c03, 0x00fc, 0x3c20, 0x0023, 0x185a, 0x00ff,
+ 0xc000, 0x0000, 0xc000, 0x0000, 0x8000, 0x0000, 0x8000, 0x0000, 0x8000,
+ 0x0000, 0x8000, 0x0000, 0xe800, 0x0051, 0xe820, 0x0051, 0x2820, 0x00ec,
+ 0xea7c, 0x0051, 0x2020, 0x000f, 0x3ae5, 0x00c1, 0x0d00, 0x006c, 0x2884,
+ 0x006a, 0x2902, 0x006e, 0x7106, 0x0045, 0x0500, 0x0000, 0x0e64, 0x000f,
+ 0x0e73, 0x000f, 0x2bc4, 0x0059, 0x2a28, 0x00ca, 0x0f22, 0x00ff, 0x7000,
+ 0x0045, 0x2267, 0x000f, 0x7000, 0x0045, 0x0a00, 0x0000, 0x0d0c, 0x005a,
+ 0x2327, 0x000f, 0x0d08, 0x001a, 0x7218, 0x0045, 0x148d, 0x00ee, 0x23a2,
+ 0x000f, 0x0d00, 0x006a, 0x75e2, 0x0045, 0x22e2, 0x000c, 0x0a00, 0x000f,
+ 0x400f, 0x00f0, 0x2380, 0x000f, 0x9208, 0x00fa, 0x8208, 0x00ff, 0x365b,
+ 0x0080, 0x365b, 0x00b1, 0x4209, 0x000b, 0x4209, 0x003c, 0x400c, 0x0004,
+ 0x2787, 0x000f, 0x188f, 0x0020, 0x4008, 0x0004, 0x2787, 0x000f, 0x188f,
+ 0x0001, 0x0d00, 0x00cb, 0x0d05, 0x0010, 0x0d00, 0x00bc, 0x0d05, 0x0001,
+ 0x3a5c, 0x0001, 0x4fff, 0x00f9, 0x1c91, 0x006f, 0x0d05, 0x0001, 0x1c91,
+ 0x006f, 0x367a, 0x0000, 0x4000, 0x0084, 0x0d00, 0x00ab, 0x3c00, 0x0075,
+ 0x148f, 0x00ce, 0x6a62, 0x00a1, 0x0d00, 0x00ac, 0x3c00, 0x0075, 0x1490,
+ 0x000e, 0x6a62, 0x00a1, 0x365c, 0x0000, 0x3608, 0x0061, 0x1c91, 0x00df,
+ 0x0d00, 0x000a, 0x1c91, 0x00df, 0x0d00, 0x001a, 0x365c, 0x0000, 0x388b,
+ 0x00c1, 0x3c00, 0x0025, 0x1491, 0x004e, 0x3c00, 0x0035, 0x1491, 0x003e,
+ 0x6218, 0x0051, 0x2ea8, 0x004a, 0x3c00, 0x00f5, 0x0610, 0x0000, 0x1491,
+ 0x002e, 0x0710, 0x0000, 0x5800, 0x0045, 0x0d00, 0x0001, 0x0a00, 0x000f,
+ 0x3c00, 0x0035, 0x1491, 0x00be, 0x1207, 0x00a1, 0x267e, 0x000f, 0x2218,
+ 0x0000, 0x7800, 0x00a5, 0x0a00, 0x000f, 0x4000, 0x000a, 0x3c00, 0x0035,
+ 0x1492, 0x003e, 0x6000, 0x0011, 0x27e1, 0x000f, 0x26f2, 0x000f, 0x23e1,
+ 0x0003, 0x6800, 0x00a5, 0x2238, 0x0000, 0x0a00, 0x000f, 0x3652, 0x0000,
+ 0x1c2d, 0x006f, 0x3660, 0x0000, 0x6000, 0x0001, 0x3c01, 0x0005, 0x1494,
+ 0x00ae, 0x6a78, 0x0001, 0x1894, 0x0080, 0x3644, 0x0081, 0x3c00, 0x00c5,
+ 0x1493, 0x003e, 0x6000, 0x0001, 0x6800, 0x0005, 0x0d01, 0x0080, 0x1c2c,
+ 0x004f, 0x0d04, 0x0008, 0x364d, 0x0081, 0x3c00, 0x0065, 0x1494, 0x006e,
+ 0x0d03, 0x0085, 0x0f10, 0x0003, 0x4300, 0x0065, 0x232e, 0x000f, 0x0d08,
+ 0x001a, 0x7000, 0x0055, 0x6000, 0x0085, 0x6000, 0x0005, 0x22e8, 0x000f,
+ 0x0d00, 0x009a, 0x0e30, 0x000f, 0x6800, 0x00e1, 0x6800, 0x00f1, 0x1894,
+ 0x00af, 0x3401, 0x0084, 0x0900, 0x0000, 0x6000, 0x0001, 0x0a00, 0x000f,
+ 0x3656, 0x0080, 0x1c2d, 0x006f, 0x3660, 0x0000, 0x3400, 0x00c4, 0x3c01,
+ 0x0005, 0x1497, 0x006e, 0x6000, 0x0001, 0x6278, 0x0013, 0x6800, 0x0011,
+ 0x6800, 0x0011, 0x0900, 0x0000, 0x1897, 0x0051, 0x2279, 0x000f, 0x1897,
+ 0x0050, 0x3644, 0x0081, 0x3c00, 0x0065, 0x1496, 0x00ae, 0x0d03, 0x0085,
+ 0x0f10, 0x0003, 0x4300, 0x0075, 0x232e, 0x000f, 0x0d08, 0x001a, 0x7000,
+ 0x0055, 0x6000, 0x00e1, 0x6000, 0x00c1, 0x0e64, 0x000f, 0x0e76, 0x000f,
+ 0x0e56, 0x000f, 0x104c, 0x00a9, 0x6a6a, 0x00f5, 0x6800, 0x00a5, 0x0d01,
+ 0x0080, 0x1c2c, 0x004f, 0x0d04, 0x0008, 0x364d, 0x0081, 0x37fe, 0x0084,
+ 0x0900, 0x0000, 0x3c00, 0x00c5, 0x1497, 0x004e, 0x6000, 0x0005, 0x6800,
+ 0x0001, 0x3400, 0x00c4, 0x0900, 0x0000, 0x0a00, 0x000f, 0x3660, 0x0020,
+ 0x3401, 0x0094, 0x3c00, 0x0065, 0x1499, 0x000e, 0x6000, 0x0085, 0x0e60,
+ 0x000f, 0x1040, 0x0009, 0x7000, 0x0085, 0x1060, 0x001f, 0x1040, 0x0049,
+ 0x0d00, 0x005f, 0x1c27, 0x006f, 0x0d00, 0x004a, 0x0d00, 0x005f, 0x0d01,
+ 0x0080, 0x3c01, 0x0005, 0x1498, 0x00de, 0x6000, 0x0011, 0x6000, 0x0003,
+ 0x1c26, 0x00ef, 0x6800, 0x00f1, 0x6800, 0x00a0, 0x0d04, 0x0008, 0x0900,
+ 0x0001, 0x0900, 0x0001, 0x0a00, 0x000f,
+ /* 2 words, starting at 0x0000 */
+ 0x0002, 0x0000,
+ 0x184d, 0x00df,
+ /*EOF*/
+ 0xffff
+};
diff -urbN orig/comedi/drivers/jr3_pci_intern.h new/comedi/drivers/jr3_pci_intern.h
--- orig/comedi/drivers/jr3_pci_intern.h 1970-01-01 01:00:00.000000000 +0100
+++ new/comedi/drivers/jr3_pci_intern.h 2007-06-15 18:33:10.000000000 +0200
_at__at_ -0,0 +1,618 _at__at_
+// Helper types to take care of the fact that the DSP card memory
+// is 16 bits, but aligned on a 32 bit PCI boundary
+typedef union {
+ u8 as_u8;
+ u16 as_u16;
+ u32 as_u32;
+} u_val_t;
+
+typedef union {
+ s8 as_s8;
+ s16 as_s16;
+ s32 as_s32;
+} s_val_t;
+
+static inline u16 get_u16(volatile u_val_t val)
+{
+ u_val_t tmp;
+ tmp.as_u32 = le32_to_cpu(val.as_u32);
+ return tmp.as_u16;
+}
+
+static inline void set_u16(volatile u_val_t *p, u16 val)
+{
+ u_val_t tmp;
+ tmp.as_u16 = val;
+ p->as_u32 = cpu_to_le32(tmp.as_u32);
+}
+
+static inline s16 get_s16(volatile s_val_t val)
+{
+ s_val_t tmp;
+ tmp.as_s32 = le32_to_cpu(val.as_s32);
+ return tmp.as_s16;
+}
+
+static inline void set_s16(volatile s_val_t *p, s16 val)
+{
+ s_val_t tmp;
+ tmp.as_s16 = val;
+ p->as_s32 = cpu_to_le32(tmp.as_s32);
+}
+
+// The raw data is stored in a format which facilitates rapid
+// processing by the JR3 DSP chip. The raw_channel structure shows the
+// format for a single channel of data. Each channel takes four,
+// two-byte words.
+//
+// Raw_time is an unsigned integer which shows the value of the JR3
+// DSP's internal clock at the time the sample was received. The clock
+// runs at 1/10 the JR3 DSP cycle time. JR3's slowest DSP runs at 10
+// Mhz. At 10 Mhz raw_time would therefore clock at 1 Mhz.
+//
+// Raw_data is the raw data received directly from the sensor. The
+// sensor data stream is capable of representing 16 different
+// channels. Channel 0 shows the excitation voltage at the sensor. It
+// is used to regulate the voltage over various cable lengths.
+// Channels 1-6 contain the coupled force data Fx through Mz. Channel
+// 7 contains the sensor's calibration data. The use of channels 8-15
+// varies with different sensors.
+typedef struct raw_channel
+{
+ u_val_t raw_time;
+ s_val_t raw_data;
+ s_val_t reserved[2];
+} raw_channel_t;
+
+// The force_array structure shows the layout for the decoupled and
+// filtered force data.
+typedef struct force_array
+{
+ s_val_t fx;
+ s_val_t fy;
+ s_val_t fz;
+ s_val_t mx;
+ s_val_t my;
+ s_val_t mz;
+ s_val_t v1;
+ s_val_t v2;
+} force_array_t;
+
+// The six_axis_array structure shows the layout for the offsets and
+// the full scales.
+typedef struct six_axis_array
+{
+ s_val_t fx;
+ s_val_t fy;
+ s_val_t fz;
+ s_val_t mx;
+ s_val_t my;
+ s_val_t mz;
+} six_axis_array_t;
+
+// VECT_BITS
+// Indicates which axis are to be used when computing the vectors. A vector
+// is composed by 3 components and its "magnitude" is placed in V1 and V2.
+// V1 defaults to a force vector and V2 defaults to a moment vector.
+// Setting changeV1 or changeV2 will change that vector to be the opposite of
+// its default.
+
+// *** Check this norby ***
+// This is badly defined at JR3 Manual. Correct definition follows:
+typedef struct vect_bits
+{
+ unsigned fx : 1;
+ unsigned fy : 1;
+ unsigned fz : 1;
+ unsigned mx : 1;
+ unsigned my : 1;
+ unsigned mz : 1;
+ unsigned changeV1 : 1;
+ unsigned changeV2 : 1;
+ unsigned reserved : 8;
+} vect_bits;
+
+// WARNINGS
+// Bit pattern for the warning word: xx_near_sat means that a near saturation
+// has been reached or exceeded.
+typedef struct warning_bits
+{
+ unsigned fx_near_sat : 1;
+ unsigned fy_near_sat : 1;
+ unsigned fz_near_sat : 1;
+ unsigned mx_near_sat : 1;
+ unsigned my_near_sat : 1;
+ unsigned mz_near_sat : 1;
+ unsigned reserved : 10;
+} warning_bits;
+
+// ERROR_BITS
+// Bit pattern for the error word:
+// 1. xx_sat means that a near saturation has been reached or exceeded.
+// 2. memory_error indicates RAM memory error during power up.
+// 3. sensor_change indicates that the sensor plugged in (different from the
+// original one) has passed CRC check. The user must reset this bit.
+// 4. system_busyindicates system busy: transf. change, new full scale or new
+// sennsor plugged in.
+// 5. cal_crc_bad means that it was a problem transmiting the calibration data
+// stored inside the sensor. If this bit does not come to zero 2s after the
+// sensor has been plugged in, there is a problem with the sensor's calibra-
+// tion data.
+// 6. watch_dog2 indicates that sensor data and clock are being received.
+// 7. watch_dog indicates that data line seems to be acting correctly.
+// If either watch dog barks, the sensor data is not beig receive correctly.
+#if 0
+typedef struct error_bits
+{
+ unsigned fx_sat : 1;
+ unsigned fy_sat : 1;
+ unsigned fz_sat : 1;
+ unsigned mx_sat : 1;
+ unsigned my_sat : 1;
+ unsigned mz_sat : 1;
+ unsigned reserved : 4;
+ unsigned memory_error : 1;
+ unsigned sensor_change : 1;
+ unsigned system_busy : 1;
+ unsigned cal_crc_bad : 1;
+ unsigned watch_dog2 : 1;
+ unsigned watch_dog : 1;
+} error_bits;
+#endif
+
+// THRESH_STRUCT
+// This structure shows the layout for a single threshold packet inside of a
+// load envelope. Each load envelope can contain several threshold structures.
+// 1. data_address contains the address of the data for that threshold. This
+// includes filtered, unfiltered, raw, rate, counters, error and warning data
+// 2. threshold is the is the value at which, if data is above or below, the
+// bits will be set ... (pag.24).
+// 3. bit_pattern contains the bits that will be set if the threshold value is
+// met or exceeded.
+typedef struct thresh_struct
+{
+ s32 data_address;
+ s32 threshold;
+ s32 bit_pattern;
+} thresh_struct;
+
+// LE_STRUCT
+// Layout of a load enveloped packet. Four thresholds are showed ... for more
+// see manual (pag.25)
+// 1. latch_bits is a bit pattern that show which bits the user wants to latch.
+// The latched bits will not be reset once the threshold which set them is
+// no longer true. In that case the user must reset them using the reset_bit
+// command.
+// 2. number_of_xx_thresholds specify how many GE/LE threshold there are.
+typedef struct {
+ s32 latch_bits;
+ s32 number_of_ge_thresholds;
+ s32 number_of_le_thresholds;
+ struct thresh_struct thresholds[4];
+ s32 reserved;
+} le_struct_t;
+
+// LINK_TYPES
+// Link types is an enumerated value showing the different possible transform
+// link types.
+// 0 - end transform packet
+// 1 - translate along X axis (TX)
+// 2 - translate along Y axis (TY)
+// 3 - translate along Z axis (TZ)
+// 4 - rotate about X axis (RX)
+// 5 - rotate about Y axis (RY)
+// 6 - rotate about Z axis (RZ)
+// 7 - negate all axes (NEG)
+typedef enum link_types
+{
+ end_x_form,
+ tx,
+ ty,
+ tz,
+ rx,
+ ry,
+ rz,
+ neg
+} link_types;
+
+// TRANSFORM
+// Structure used to describe a transform.
+typedef struct {
+ struct {
+ u_val_t link_type;
+ s_val_t link_amount;
+ } link[8];
+} intern_transform_t;
+
+// JR3 force/torque sensor data definition. For more information see sensor and
+// hardware manuals.
+
+typedef struct force_sensor_data
+{
+ // Raw_channels is the area used to store the raw data coming from
+ // the sensor.
+
+ raw_channel_t raw_channels[16]; /* offset 0x0000 */
+
+ // Copyright is a null terminated ASCII string containing the JR3
+ // copyright notice.
+
+ u_val_t copyright[0x0018]; /* offset 0x0040 */
+ s_val_t reserved1[0x0008]; /* offset 0x0058 */
+
+ // Shunts contains the sensor shunt readings. Some JR3 sensors have
+ // the ability to have their gains adjusted. This allows the
+ // hardware full scales to be adjusted to potentially allow
+ // better resolution or dynamic range. For sensors that have
+ // this ability, the gain of each sensor channel is measured at
+ // the time of calibration using a shunt resistor. The shunt
+ // resistor is placed across one arm of the resistor bridge, and
+ // the resulting change in the output of that channel is
+ // measured. This measurement is called the shunt reading, and
+ // is recorded here. If the user has changed the gain of the //
+ // sensor, and made new shunt measurements, those shunt
+ // measurements can be placed here. The JR3 DSP will then scale
+ // the calibration matrix such so that the gains are again
+ // proper for the indicated shunt readings. If shunts is 0, then
+ // the sensor cannot have its gain changed. For details on
+ // changing the sensor gain, and making shunts readings, please
+ // see the sensor manual. To make these values take effect the
+ // user must call either command (5) use transform # (pg. 33) or
+ // command (10) set new full scales (pg. 38).
+
+ six_axis_array_t shunts; /* offset 0x0060 */
+ s32 reserved2[2]; /* offset 0x0066 */
+
+ // Default_FS contains the full scale that is used if the user does
+ // not set a full scale.
+
+ six_axis_array_t default_FS; /* offset 0x0068 */
+ s_val_t reserved3; /* offset 0x006e */
+
+ // Load_envelope_num is the load envelope number that is currently
+ // in use. This value is set by the user after one of the load
+ // envelopes has been initialized.
+
+ s_val_t load_envelope_num; /* offset 0x006f */
+
+ // Min_full_scale is the recommend minimum full scale.
+ //
+ // These values in conjunction with max_full_scale (pg. 9) helps
+ // determine the appropriate value for setting the full scales. The
+ // software allows the user to set the sensor full scale to an
+ // arbitrary value. But setting the full scales has some hazards. If
+ // the full scale is set too low, the data will saturate
+ // prematurely, and dynamic range will be lost. If the full scale is
+ // set too high, then resolution is lost as the data is shifted to
+ // the right and the least significant bits are lost. Therefore the
+ // maximum full scale is the maximum value at which no resolution is
+ // lost, and the minimum full scale is the value at which the data
+ // will not saturate prematurely. These values are calculated
+ // whenever a new coordinate transformation is calculated. It is
+ // possible for the recommended maximum to be less than the
+ // recommended minimum. This comes about primarily when using
+ // coordinate translations. If this is the case, it means that any
+ // full scale selection will be a compromise between dynamic range
+ // and resolution. It is usually recommended to compromise in favor
+ // of resolution which means that the recommend maximum full scale
+ // should be chosen.
+ //
+ // WARNING: Be sure that the full scale is no less than 0.4% of the
+ // recommended minimum full scale. Full scales below this value will
+ // cause erroneous results.
+
+ six_axis_array_t min_full_scale; /* offset 0x0070 */
+ s_val_t reserved4; /* offset 0x0076 */
+
+ // Transform_num is the transform number that is currently in use.
+ // This value is set by the JR3 DSP after the user has used command
+ // (5) use transform # (pg. 33).
+
+ s_val_t transform_num; /* offset 0x0077 */
+
+ // Max_full_scale is the recommended maximum full scale. See
+ // min_full_scale (pg. 9) for more details.
+
+ six_axis_array_t max_full_scale; /* offset 0x0078 */
+ s_val_t reserved5; /* offset 0x007e */
+
+ // Peak_address is the address of the data which will be monitored
+ // by the peak routine. This value is set by the user. The peak
+ // routine will monitor any 8 contiguous addresses for peak values.
+ // (ex. to watch filter3 data for peaks, set this value to 0x00a8).
+
+ s_val_t peak_address; /* offset 0x007f */
+
+ // Full_scale is the sensor full scales which are currently in use.
+ // Decoupled and filtered data is scaled so that +/- 16384 is equal
+ // to the full scales. The engineering units used are indicated by
+ // the units value discussed on page 16. The full scales for Fx, Fy,
+ // Fz, Mx, My and Mz can be written by the user prior to calling
+ // command (10) set new full scales (pg. 38). The full scales for V1
+ // and V2 are set whenever the full scales are changed or when the
+ // axes used to calculate the vectors are changed. The full scale of
+ // V1 and V2 will always be equal to the largest full scale of the
+ // axes used for each vector respectively.
+
+ force_array_t full_scale; /* offset 0x0080 */
+
+ // Offsets contains the sensor offsets. These values are subtracted from
+ // the sensor data to obtain the decoupled data. The offsets are set a
+ // few seconds (< 10) after the calibration data has been received.
+ // They are set so that the output data will be zero. These values
+ // can be written as well as read. The JR3 DSP will use the values
+ // written here within 2 ms of being written. To set future
+ // decoupled data to zero, add these values to the current decoupled
+ // data values and place the sum here. The JR3 DSP will change these
+ // values when a new transform is applied. So if the offsets are
+ // such that FX is 5 and all other values are zero, after rotating
+ // about Z by 90 degrees, FY would be 5 and all others would be zero.
+
+ six_axis_array_t offsets; /* offset 0x0088 */
+
+ // Offset_num is the number of the offset currently in use. This
+ // value is set by the JR3 DSP after the user has executed the use
+ // offset # command (pg. 34). It can vary between 0 and 15.
+
+ s_val_t offset_num; /* offset 0x008e */
+
+ // Vect_axes is a bit map showing which of the axes are being used
+ // in the vector calculations. This value is set by the JR3 DSP
+ // after the user has executed the set vector axes command (pg. 37).
+
+ u_val_t vect_axes; /* offset 0x008f */
+
+ // Filter0 is the decoupled, unfiltered data from the JR3 sensor.
+ // This data has had the offsets removed.
+ //
+ // These force_arrays hold the filtered data. The decoupled data is
+ // passed through cascaded low pass filters. Each succeeding filter
+ // has a cutoff frequency of 1/4 of the preceding filter. The cutoff
+ // frequency of filter1 is 1/16 of the sample rate from the sensor.
+ // For a typical sensor with a sample rate of 8 kHz, the cutoff
+ // frequency of filter1 would be 500 Hz. The following filters would
+ // cutoff at 125 Hz, 31.25 Hz, 7.813 Hz, 1.953 Hz and 0.4883 Hz.
+
+ struct force_array filter[7]; /* offset 0x0090,
+ offset 0x0098,
+ offset 0x00a0,
+ offset 0x00a8,
+ offset 0x00b0,
+ offset 0x00b8 ,
+ offset 0x00c0 */
+
+ // Rate_data is the calculated rate data. It is a first derivative
+ // calculation. It is calculated at a frequency specified by the
+ // variable rate_divisor (pg. 12). The data on which the rate is
+ // calculated is specified by the variable rate_address (pg. 12).
+
+ force_array_t rate_data; /* offset 0x00c8 */
+
+ // Minimum_data & maximum_data are the minimum and maximum (peak)
+ // data values. The JR3 DSP can monitor any 8 contiguous data items
+ // for minimums and maximums at full sensor bandwidth. This area is
+ // only updated at user request. This is done so that the user does
+ // not miss any peaks. To read the data, use either the read peaks
+ // command (pg. 40), or the read and reset peaks command (pg. 39).
+ // The address of the data to watch for peaks is stored in the
+ // variable peak_address (pg. 10). Peak data is lost when executing
+ // a coordinate transformation or a full scale change. Peak data is
+ // also lost when plugging in a new sensor.
+
+ force_array_t minimum_data; /* offset 0x00d0 */
+ force_array_t maximum_data; /* offset 0x00d8 */
+
+ // Near_sat_value & sat_value contain the value used to determine if
+ // the raw sensor is saturated. Because of decoupling and offset
+ // removal, it is difficult to tell from the processed data if the
+ // sensor is saturated. These values, in conjunction with the error
+ // and warning words (pg. 14), provide this critical information.
+ // These two values may be set by the host processor. These values
+ // are positive signed values, since the saturation logic uses the
+ // absolute values of the raw data. The near_sat_value defaults to
+ // approximately 80% of the ADC's full scale, which is 26214, while
+ // sat_value defaults to the ADC's full scale:
+ //
+ // sat_value = 32768 - 2^(16 - ADC bits)
+
+
+ s_val_t near_sat_value; /* offset 0x00e0 */
+ s_val_t sat_value; /* offset 0x00e1 */
+
+ // Rate_address, rate_divisor & rate_count contain the data used to
+ // control the calculations of the rates. Rate_address is the
+ // address of the data used for the rate calculation. The JR3 DSP
+ // will calculate rates for any 8 contiguous values (ex. to
+ // calculate rates for filter3 data set rate_address to 0x00a8).
+ // Rate_divisor is how often the rate is calculated. If rate_divisor
+ // is 1, the rates are calculated at full sensor bandwidth. If
+ // rate_divisor is 200, rates are calculated every 200 samples.
+ // Rate_divisor can be any value between 1 and 65536. Set
+ // rate_divisor to 0 to calculate rates every 65536 samples.
+ // Rate_count starts at zero and counts until it equals
+ // rate_divisor, at which point the rates are calculated, and
+ // rate_count is reset to 0. When setting a new rate divisor, it is
+ // a good idea to set rate_count to one less than rate divisor. This
+ // will minimize the time necessary to start the rate calculations.
+
+ s_val_t rate_address; /* offset 0x00e2 */
+ u_val_t rate_divisor; /* offset 0x00e3 */
+ u_val_t rate_count; /* offset 0x00e4 */
+
+ // Command_word2 through command_word0 are the locations used to
+ // send commands to the JR3 DSP. Their usage varies with the command
+ // and is detailed later in the Command Definitions section (pg.
+ // 29). In general the user places values into various memory
+ // locations, and then places the command word into command_word0.
+ // The JR3 DSP will process the command and place a 0 into
+ // command_word0 to indicate successful completion. Alternatively
+ // the JR3 DSP will place a negative number into command_word0 to
+ // indicate an error condition. Please note the command locations
+ // are numbered backwards. (I.E. command_word2 comes before
+ // command_word1).
+
+ s_val_t command_word2; /* offset 0x00e5 */
+ s_val_t command_word1; /* offset 0x00e6 */
+ s_val_t command_word0; /* offset 0x00e7 */
+
+ // Count1 through count6 are unsigned counters which are incremented
+ // every time the matching filters are calculated. Filter1 is
+ // calculated at the sensor data bandwidth. So this counter would
+ // increment at 8 kHz for a typical sensor. The rest of the counters
+ // are incremented at 1/4 the interval of the counter immediately
+ // preceding it, so they would count at 2 kHz, 500 Hz, 125 Hz etc.
+ // These counters can be used to wait for data. Each time the
+ // counter changes, the corresponding data set can be sampled, and
+ // this will insure that the user gets each sample, once, and only
+ // once.
+
+ u_val_t count1; /* offset 0x00e8 */
+ u_val_t count2; /* offset 0x00e9 */
+ u_val_t count3; /* offset 0x00ea */
+ u_val_t count4; /* offset 0x00eb */
+ u_val_t count5; /* offset 0x00ec */
+ u_val_t count6; /* offset 0x00ed */
+
+ // Error_count is a running count of data reception errors. If this
+ // counter is changing rapidly, it probably indicates a bad sensor
+ // cable connection or other hardware problem. In most installations
+ // error_count should not change at all. But it is possible in an
+ // extremely noisy environment to experience occasional errors even
+ // without a hardware problem. If the sensor is well grounded, this
+ // is probably unavoidable in these environments. On the occasions
+ // where this counter counts a bad sample, that sample is ignored.
+
+ u_val_t error_count; /* offset 0x00ee */
+
+
+ // Count_x is a counter which is incremented every time the JR3 DSP
+ // searches its job queues and finds nothing to do. It indicates the
+ // amount of idle time the JR3 DSP has available. It can also be
+ // used to determine if the JR3 DSP is alive. See the Performance
+ // Issues section on pg. 49 for more details.
+
+ u_val_t count_x; /* offset 0x00ef */
+
+ // Warnings & errors contain the warning and error bits
+ // respectively. The format of these two words is discussed on page
+ // 21 under the headings warnings_bits and error_bits.
+
+ u_val_t warnings; /* offset 0x00f0 */
+ u_val_t errors; /* offset 0x00f1 */
+
+ // Threshold_bits is a word containing the bits that are set by the
+ // load envelopes. See load_envelopes (pg. 17) and thresh_struct
+ // (pg. 23) for more details.
+
+ s_val_t threshold_bits; /* offset 0x00f2 */
+
+ // Last_crc is the value that shows the actual calculated CRC. CRC
+ // is short for cyclic redundancy code. It should be zero. See the
+ // description for cal_crc_bad (pg. 21) for more information.
+
+ s_val_t last_CRC; /* offset 0x00f3 */
+
+ // EEProm_ver_no contains the version number of the sensor EEProm.
+ // EEProm version numbers can vary between 0 and 255.
+ // Software_ver_no contains the software version number. Version
+ // 3.02 would be stored as 302.
+
+ s_val_t eeprom_ver_no; /* offset 0x00f4 */
+ s_val_t software_ver_no; /* offset 0x00f5 */
+
+ // Software_day & software_year are the release date of the software
+ // the JR3 DSP is currently running. Day is the day of the year,
+ // with January 1 being 1, and December 31, being 365 for non leap
+ // years.
+
+ s_val_t software_day; /* offset 0x00f6 */
+ s_val_t software_year; /* offset 0x00f7 */
+
+ // Serial_no & model_no are the two values which uniquely identify a
+ // sensor. This model number does not directly correspond to the JR3
+ // model number, but it will provide a unique identifier for
+ // different sensor configurations.
+
+ u_val_t serial_no; /* offset 0x00f8 */
+ u_val_t model_no; /* offset 0x00f9 */
+
+ // Cal_day & cal_year are the sensor calibration date. Day is the
+ // day of the year, with January 1 being 1, and December 31, being
+ // 366 for leap years.
+
+ s_val_t cal_day; /* offset 0x00fa */
+ s_val_t cal_year; /* offset 0x00fb */
+
+ // Units is an enumerated read only value defining the engineering
+ // units used in the sensor full scale. The meanings of particular
+ // values are discussed in the section detailing the force_units
+ // structure on page 22. The engineering units are setto customer
+ // specifications during sensor manufacture and cannot be changed by
+ // writing to Units.
+ //
+ // Bits contains the number of bits of resolution of the ADC
+ // currently in use.
+ //
+ // Channels is a bit field showing which channels the current sensor
+ // is capable of sending. If bit 0 is active, this sensor can send
+ // channel 0, if bit 13 is active, this sensor can send channel 13,
+ // etc. This bit can be active, even if the sensor is not currently
+ // sending this channel. Some sensors are configurable as to which
+ // channels to send, and this field only contains information on the
+ // channels available to send, not on the current configuration. To
+ // find which channels are currently being sent, monitor the
+ // Raw_time fields (pg. 19) in the raw_channels array (pg. 7). If
+ // the time is changing periodically, then that channel is being
+ // received.
+
+ u_val_t units; /* offset 0x00fc */
+ s_val_t bits; /* offset 0x00fd */
+ s_val_t channels; /* offset 0x00fe */
+
+ // Thickness specifies the overall thickness of the sensor from
+ // flange to flange. The engineering units for this value are
+ // contained in units (pg. 16). The sensor calibration is relative
+ // to the center of the sensor. This value allows easy coordinate
+ // transformation from the center of the sensor to either flange.
+
+ s_val_t thickness; /* offset 0x00ff */
+
+ // Load_envelopes is a table containing the load envelope
+ // descriptions. There are 16 possible load envelope slots in the
+ // table. The slots are on 16 word boundaries and are numbered 0-15.
+ // Each load envelope needs to start at the beginning of a slot but
+ // need not be fully contained in that slot. That is to say that a
+ // single load envelope can be larger than a single slot. The
+ // software has been tested and ran satisfactorily with 50
+ // thresholds active. A single load envelope this large would take
+ // up 5 of the 16 slots. The load envelope data is laid out in an
+ // order that is most efficient for the JR3 DSP. The structure is
+ // detailed later in the section showing the definition of the
+ // le_struct structure (pg. 23).
+
+ le_struct_t load_envelopes[0x10]; /* offset 0x0100 */
+
+ // Transforms is a table containing the transform descriptions.
+ // There are 16 possible transform slots in the table. The slots are
+ // on 16 word boundaries and are numbered 0-15. Each transform needs
+ // to start at the beginning of a slot but need not be fully
+ // contained in that slot. That is to say that a single transform
+ // can be larger than a single slot. A transform is 2 * no of links
+ // + 1 words in length. So a single slot can contain a transform
+ // with 7 links. Two slots can contain a transform that is 15 links.
+ // The layout is detailed later in the section showing the
+ // definition of the transform structure (pg. 26).
+
+ intern_transform_t transforms[0x10]; /* offset 0x0200 */
+} jr3_channel_t;
+
+typedef struct {
+ char pad1[0x10000];
+ struct {
+ jr3_channel_t data;
+ char pad2[0x50000 - 0x00c00];
+ u32 reset;
+ char pad3[0x30000 - 0x00004];
+ } channel[4];
+} jr3_t;
+
diff -urbN orig/comedi/drivers/Kbuild new/comedi/drivers/Kbuild
--- orig/comedi/drivers/Kbuild 2006-12-08 17:53:38.000000000 +0100
+++ new/comedi/drivers/Kbuild 2007-06-08 09:47:47.000000000 +0200
_at__at_ -64,6 +64,7 _at__at_
obj-m += gsc_hpdi.o
obj-m += ii_pci20kc.o
obj-m += icp_multi.o
+obj-m += jr3_pci.o
obj-m += ke_counter.o
obj-m += me_daq.o
obj-m += me4000.o
diff -urbN orig/comedi/drivers/Makefile.am new/comedi/drivers/Makefile.am
--- orig/comedi/drivers/Makefile.am 2007-01-31 04:13:55.000000000 +0100
+++ new/comedi/drivers/Makefile.am 2007-06-08 09:41:30.000000000 +0200
_at__at_ -133,6 +133,7 _at__at_
gsc_hpdi.ko \
ii_pci20kc.ko \
icp_multi.ko \
+ jr3_pci.ko \
ke_counter.ko \
me_daq.ko \
me4000.ko \
_at__at_ -227,6 +228,7 _at__at_
gsc_hpdi_ko_SOURCES = gsc_hpdi.c
ii_pci20kc_ko_SOURCES = ii_pci20kc.c
icp_multi_ko_SOURCES = icp_multi.c
+jr3_pci_ko_SOURCES = jr3_pci.c
ke_counter_ko_SOURCES = ke_counter.c
me4000_ko_SOURCES = me4000.c
me_daq_ko_SOURCES = me_daq.c
Received on 2007-06-15Z15:54:14