nidas  v1.2-1520
Classes | Macros | Enumerations
dmd_mmat.h File Reference
#include <nidas/linux/util.h>
#include <nidas/linux/a2d.h>
#include <sys/ioctl.h>
#include <sys/types.h>

Go to the source code of this file.

Classes

struct  DMMAT_A2D_Status
 
struct  DMMAT_CNTR_Config
 
struct  DMMAT_CNTR_Status
 
struct  DMMAT_D2A_Conversion
 Structure describing the linear relation of counts and D2A voltage. More...
 
struct  DMMAT_D2A_Outputs
 
struct  D2A_Config
 Structures used by D2A device to set up sending a repeated waveform. More...
 
struct  D2A_Waveform
 

Macros

#define MAX_DMMAT_BOARDS   4
 
#define MAX_DMMAT_A2D_CHANNELS   32
 
#define DMMAT_D2A_OUTPUTS_PER_BRD   4
 
#define MAX_DMMAT_D2A_OUTPUTS   (MAX_DMMAT_BOARDS * DMMAT_D2A_OUTPUTS_PER_BRD)
 
#define DMM16AT_BOARD   0
 
#define DMM32AT_BOARD   1
 
#define DMM32XAT_BOARD   2
 
#define DMM32DXAT_BOARD   3
 
#define DMMAT_IOC_MAGIC   'd'
 
#define DMMAT_A2D_GET_STATUS   _IOR(DMMAT_IOC_MAGIC,0,struct DMMAT_A2D_Status)
 A2D Ioctls in addition to those in nidas/linux/a2d.h. More...
 
#define DMMAT_START   _IO(DMMAT_IOC_MAGIC,1)
 
#define DMMAT_STOP   _IO(DMMAT_IOC_MAGIC,2)
 
#define DMMAT_A2D_DO_AUTOCAL   _IO(DMMAT_IOC_MAGIC,3)
 
#define DMMAT_CNTR_START   _IOW(DMMAT_IOC_MAGIC,4,struct DMMAT_CNTR_Config)
 Counter Ioctls. More...
 
#define DMMAT_CNTR_STOP   _IO(DMMAT_IOC_MAGIC,5)
 
#define DMMAT_CNTR_GET_STATUS   _IOR(DMMAT_IOC_MAGIC,6,struct DMMAT_CNTR_Status)
 
#define DMMAT_D2A_GET_NOUTPUTS   _IO(DMMAT_IOC_MAGIC,7)
 D2A Ioctls This D2A driver does not enforce any exclusive use policy: multiple threads can each have the same device open and set any of the output voltages. More...
 
#define DMMAT_D2A_GET_CONVERSION   _IOR(DMMAT_IOC_MAGIC,8,struct DMMAT_D2A_Conversion)
 
#define DMMAT_D2A_SET   _IOW(DMMAT_IOC_MAGIC,9,struct DMMAT_D2A_Outputs)
 
#define DMMAT_D2A_GET   _IOR(DMMAT_IOC_MAGIC,10,struct DMMAT_D2A_Outputs)
 
#define DMMAT_ADD_WAVEFORM   _IOW(DMMAT_IOC_MAGIC, 11, struct D2A_Waveform)
 
#define DMMAT_D2A_SET_CONFIG   _IOW(DMMAT_IOC_MAGIC, 12, struct D2A_Config)
 
#define DMMAT_IOC_MAXNR   12
 
#define DMMAT_STATUS_A2D_BUSY   0x80
 Definitions of bits in board status byte. More...
 
#define DMMAT_STATUS_TIMER_INT   0x40
 
#define DMMAT_STATUS_SINGLE_ENDED   0x20
 
#define DMMAT_STATUS_A2D_INT   0x10
 
#define DMMAT_STATUS_CHAN_MASK   0x0f
 

Enumerations

enum  dmmat_d2a_jumpers {
  DMMAT_D2A_UNI_5, DMMAT_D2A_UNI_10, DMMAT_D2A_BI_5, DMMAT_D2A_BI_10,
  DMMAT_D2A_BI_2P5
}
 Enumeration of supported jumper configurations for the D2A. More...
 

Macro Definition Documentation

#define DMM16AT_BOARD   0
#define DMM32AT_BOARD   1
#define DMM32DXAT_BOARD   3
#define DMM32XAT_BOARD   2
#define DMMAT_A2D_DO_AUTOCAL   _IO(DMMAT_IOC_MAGIC,3)
#define DMMAT_A2D_GET_STATUS   _IOR(DMMAT_IOC_MAGIC,0,struct DMMAT_A2D_Status)
#define DMMAT_ADD_WAVEFORM   _IOW(DMMAT_IOC_MAGIC, 11, struct D2A_Waveform)
#define DMMAT_CNTR_GET_STATUS   _IOR(DMMAT_IOC_MAGIC,6,struct DMMAT_CNTR_Status)
#define DMMAT_CNTR_START   _IOW(DMMAT_IOC_MAGIC,4,struct DMMAT_CNTR_Config)

Counter Ioctls.

Referenced by dmmat_ioctl_cntr(), and nidas::dynld::DSC_PulseCounter::open().

#define DMMAT_CNTR_STOP   _IO(DMMAT_IOC_MAGIC,5)
#define DMMAT_D2A_GET   _IOR(DMMAT_IOC_MAGIC,10,struct DMMAT_D2A_Outputs)
#define DMMAT_D2A_GET_CONVERSION   _IOR(DMMAT_IOC_MAGIC,8,struct DMMAT_D2A_Conversion)
#define DMMAT_D2A_GET_NOUTPUTS   _IO(DMMAT_IOC_MAGIC,7)

D2A Ioctls This D2A driver does not enforce any exclusive use policy: multiple threads can each have the same device open and set any of the output voltages.

Referenced by dmmat_ioctl_d2a(), nidas::dynld::DSC_AnalogOut::open(), and DMD_MMAT_test::run().

#define DMMAT_D2A_OUTPUTS_PER_BRD   4
#define DMMAT_D2A_SET   _IOW(DMMAT_IOC_MAGIC,9,struct DMMAT_D2A_Outputs)
#define DMMAT_D2A_SET_CONFIG   _IOW(DMMAT_IOC_MAGIC, 12, struct D2A_Config)
#define DMMAT_IOC_MAGIC   'd'
#define DMMAT_IOC_MAXNR   12
#define DMMAT_START   _IO(DMMAT_IOC_MAGIC,1)
#define DMMAT_STATUS_A2D_BUSY   0x80

Definitions of bits in board status byte.

#define DMMAT_STATUS_A2D_INT   0x10
#define DMMAT_STATUS_CHAN_MASK   0x0f
#define DMMAT_STATUS_SINGLE_ENDED   0x20
#define DMMAT_STATUS_TIMER_INT   0x40
#define DMMAT_STOP   _IO(DMMAT_IOC_MAGIC,2)
#define MAX_DMMAT_A2D_CHANNELS   32
#define MAX_DMMAT_BOARDS   4

Referenced by dmd_mmat_init().

#define MAX_DMMAT_D2A_OUTPUTS   (MAX_DMMAT_BOARDS * DMMAT_D2A_OUTPUTS_PER_BRD)

Enumeration Type Documentation

Enumeration of supported jumper configurations for the D2A.

Currently don't support the programmable mode.

Enumerator
DMMAT_D2A_UNI_5 
DMMAT_D2A_UNI_10 
DMMAT_D2A_BI_5 
DMMAT_D2A_BI_10 
DMMAT_D2A_BI_2P5