From: Frank Mori Hess Date: Mon, 20 Nov 2006 20:15:56 +0000 (+0000) Subject: Mite byte-swapping bits seem to be associated with device/memory X-Git-Tag: r0_7_74~149 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=292ab0376cf3fa438b67f2cae90bdc7347e22d88;p=comedi.git Mite byte-swapping bits seem to be associated with device/memory ports as opposed to being always 16 or 32 bit swaps. --- diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index 3a2cdc1f..57d47d68 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -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; diff --git a/comedi/drivers/mite.h b/comedi/drivers/mite.h index c8a7c1f7..b024b708 100644 --- a/comedi/drivers/mite.h +++ b/comedi/drivers/mite.h @@ -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,