Mite byte-swapping bits seem to be associated with device/memory
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 20 Nov 2006 20:15:56 +0000 (20:15 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 20 Nov 2006 20:15:56 +0000 (20:15 +0000)
ports as opposed to being always 16 or 32 bit swaps.

comedi/drivers/mite.c
comedi/drivers/mite.h

index 3a2cdc1fa4a224e5d59fb1a82531623dd4749f3f..57d47d685e9bea9c0d138d9f31dcf651048ee774 100644 (file)
@@ -318,7 +318,7 @@ void mite_prep_dma( struct mite_struct *mite, unsigned int channel,
                /* Doing a combined 32 and 16 bit byteswap gets the 16 bit samples into the fifo in the right order.
                 Tested doing 32 bit memory to 16 bit device transfers to the analog out of a pxi-6281,
                 which has mite version = 1, type = 4*/
-               chcr |= CHCR_BYTE_SWAP16 | CHCR_BYTE_SWAP32;
+               chcr |= CHCR_BYTE_SWAP_DEVICE | CHCR_BYTE_SWAP_MEMORY;
        }
        if(mite_chan->dir == COMEDI_INPUT){
                chcr |= CHCR_DEV_TO_MEM;
index c8a7c1f7b0012eae54692d2edb01441cfb572a94..b024b708c3519f967c198535c1814f72659ae51a 100644 (file)
@@ -286,8 +286,8 @@ enum MITE_CHCR_bits
        CHCR_FIFO_ON                    = 0,
        CHCR_BURSTEN                    = (1<<14),
        CHCR_NO_BURSTEN                 = 0,
-       CHCR_BYTE_SWAP16        = (1 << 6),
-       CHCR_BYTE_SWAP32        = (1 << 4),
+       CHCR_BYTE_SWAP_DEVICE   = (1 << 6),
+       CHCR_BYTE_SWAP_MEMORY   = (1 << 4),
        CHCR_DIR                        = (1<<3),
        CHCR_DEV_TO_MEM         = CHCR_DIR,
        CHCR_MEM_TO_DEV         = 0,