/* packs and unpacks a channel/range number */
-#define CR_PACK(chan,rng,aref) ( (((aref)&0x3)<<24) | \
- (((rng)&0xff)<<16) | (chan) )
+#define CR_PACK(chan,rng,aref) ( (((aref)&0x3)<<24) | (((rng)&0xff)<<16) | (chan) )
#define CR_PACK_FLAGS(chan, range, aref, flags) (CR_PACK(chan, range, aref) | ((flags) & CR_FLAGS_MASK))
#define CR_CHAN(a) ((a)&0xffff)
#define CR_DITHER CR_ALT_FILTER
#define CR_DEGLITCH CR_ALT_FILTER
#define CR_ALT_SOURCE (1<<27)
+#define CR_EDGE (1<<30)
#define CR_INVERT (1<<31)
#define AREF_GROUND 0x00 /* analog ref = analog ground */
#define SDF_CMD 0x1000 /* can do commands */
#define SDF_READABLE 0x00010000 /* subdevice can be read (e.g. analog input) */
-#define SDF_WRITEABLE 0x00020000 /* subdevice can be written (e.g. analog output) */
+#define SDF_WRITABLE 0x00020000 /* subdevice can be written (e.g. analog output) */
+#define SDF_WRITEABLE SDF_WRITABLE /* spelling error in API */
#define SDF_INTERNAL 0x00040000 /* subdevice does not have externally visible lines */
#define SDF_RT 0x00080000 /* subdevice is RT capable */
#define SDF_GROUND 0x00100000 /* can do aref=ground */
//#define INSN_CONFIG_COUNTER 0x13
#define INSN_CONFIG_ALT_SOURCE 0x14
#define INSN_CONFIG_DIGITAL_TRIG 0x15
-// flags for INSN_CONFIG_DIGITAL_TRIG
-#define DIGITAL_TRIG_RISING 0x1
+#define INSN_CONFIG_BLOCK_SIZE 0x16
/* ioctls */