Commit cd644206 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: quatech_daqp_cs: tidy up status register bits

For aesthetics, move the bit defines for this register and use the
BIT macro to define the bits.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b0f9b0ad
......@@ -78,6 +78,19 @@
#define DAQP_CTRL_TRIG_EDGE BIT(0) /* 0=rising; 1=falling */
#define DAQP_STATUS_REG 0x02
#define DAQP_STATUS_IDLE BIT(7)
#define DAQP_STATUS_RUNNING BIT(6)
#define DAQP_STATUS_DATA_LOST BIT(5)
#define DAQP_STATUS_END_OF_SCAN BIT(4)
#define DAQP_STATUS_FIFO_THRESHOLD BIT(3)
#define DAQP_STATUS_FIFO_FULL BIT(2)
#define DAQP_STATUS_FIFO_NEARFULL BIT(1)
#define DAQP_STATUS_FIFO_EMPTY BIT(0)
/* these bits clear when the status register is read */
#define DAQP_STATUS_EVENTS (DAQP_STATUS_DATA_LOST | \
DAQP_STATUS_END_OF_SCAN | \
DAQP_STATUS_FIFO_THRESHOLD)
#define DAQP_DI_REG 0x03
#define DAQP_DO_REG 0x03
#define DAQP_PACER_LOW_REG 0x04
......@@ -88,16 +101,6 @@
#define DAQP_TIMER_REG 0x0a
#define DAQP_AUX_REG 0x0f
#define DAQP_STATUS_IDLE 0x80
#define DAQP_STATUS_RUNNING 0x40
#define DAQP_STATUS_EVENTS 0x38
#define DAQP_STATUS_DATA_LOST 0x20
#define DAQP_STATUS_END_OF_SCAN 0x10
#define DAQP_STATUS_FIFO_THRESHOLD 0x08
#define DAQP_STATUS_FIFO_FULL 0x04
#define DAQP_STATUS_FIFO_NEARFULL 0x02
#define DAQP_STATUS_FIFO_EMPTY 0x01
#define DAQP_COMMAND_ARM 0x80
#define DAQP_COMMAND_RSTF 0x40
#define DAQP_COMMAND_RSTQ 0x20
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment