staging: comedi: ni_stc.h: tidy up Configuration_Memory_Low register and bits
Rename the CamelCase. Use the BIT() macro to define the bits. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
363f570ef0
commit
76efac7f52
2 changed files with 13 additions and 12 deletions
|
@ -1902,13 +1902,14 @@ static void ni_load_channelgain_list(struct comedi_device *dev,
|
|||
ni_writew(dev, hi, Configuration_Memory_High);
|
||||
|
||||
if (!devpriv->is_6143) {
|
||||
lo = range;
|
||||
if (i == n_chan - 1)
|
||||
lo |= AI_LAST_CHANNEL;
|
||||
if (dither)
|
||||
lo |= AI_DITHER;
|
||||
lo = NI_E_AI_CFG_LO_GAIN(range);
|
||||
|
||||
ni_writew(dev, lo, Configuration_Memory_Low);
|
||||
if (i == n_chan - 1)
|
||||
lo |= NI_E_AI_CFG_LO_LAST_CHAN;
|
||||
if (dither)
|
||||
lo |= NI_E_AI_CFG_LO_DITHER;
|
||||
|
||||
ni_writew(dev, lo, NI_E_AI_CFG_LO_REG);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -616,13 +616,13 @@ static inline unsigned GPCT_DMA_Select_Mask(unsigned gpct_index)
|
|||
return 0xf << (4 * gpct_index);
|
||||
}
|
||||
|
||||
/* 16 bit registers */
|
||||
#define NI_E_AI_CFG_LO_REG 0x10 /* w16 */
|
||||
#define NI_E_AI_CFG_LO_LAST_CHAN BIT(15)
|
||||
#define NI_E_AI_CFG_LO_GEN_TRIG BIT(12)
|
||||
#define NI_E_AI_CFG_LO_DITHER BIT(9)
|
||||
#define NI_E_AI_CFG_LO_UNI BIT(8)
|
||||
#define NI_E_AI_CFG_LO_GAIN(x) ((x) << 0)
|
||||
|
||||
#define Configuration_Memory_Low 0x10
|
||||
enum Configuration_Memory_Low_Bits {
|
||||
AI_DITHER = 0x200,
|
||||
AI_LAST_CHANNEL = 0x8000,
|
||||
};
|
||||
#define Configuration_Memory_High 0x12
|
||||
enum Configuration_Memory_High_Bits {
|
||||
AI_AC_COUPLE = 0x800,
|
||||
|
|
Loading…
Add table
Reference in a new issue