staging: comedi: ni_stc.h: tidy up Misc_Command 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:
Родитель
2ed183fff4
Коммит
68885d9e00
|
@ -1620,7 +1620,7 @@ static int ni_ai_reset(struct comedi_device *dev, struct comedi_subdevice *s)
|
|||
ni_clear_ai_fifo(dev);
|
||||
|
||||
if (!devpriv->is_6143)
|
||||
ni_writeb(dev, 0, Misc_Command);
|
||||
ni_writeb(dev, NI_E_MISC_CMD_EXT_ATRIG, NI_E_MISC_CMD_REG);
|
||||
|
||||
ni_stc_writew(dev, NISTC_AI_CMD1_DISARM, NISTC_AI_CMD1_REG);
|
||||
ni_stc_writew(dev, NISTC_AI_MODE1_START_STOP |
|
||||
|
|
|
@ -577,7 +577,11 @@
|
|||
#define NI_E_SERIAL_CMD_SDATA BIT(1)
|
||||
#define NI_E_SERIAL_CMD_SCLK BIT(0)
|
||||
|
||||
#define Misc_Command 0x0f
|
||||
#define NI_E_MISC_CMD_REG 0x0f /* w8 */
|
||||
#define NI_E_MISC_CMD_INTEXT_ATRIG(x) (((x) & 0x1) << 7)
|
||||
#define NI_E_MISC_CMD_EXT_ATRIG NI_E_MISC_CMD_INTEXT_ATRIG(0)
|
||||
#define NI_E_MISC_CMD_INT_ATRIG NI_E_MISC_CMD_INTEXT_ATRIG(1)
|
||||
|
||||
#define Port_A 0x19
|
||||
#define Port_B 0x1b
|
||||
#define Port_C 0x1d
|
||||
|
|
Загрузка…
Ссылка в новой задаче