sis3801.c File Reference

Go to the source code of this file.

Functions

DWORD sis3801_module_ID (MVME_INTERFACE *mvme, DWORD base)
DWORD sis3801_IRQ_REG_read (MVME_INTERFACE *mvme, DWORD base)
DWORD sis3801_IRQ_REG_write (MVME_INTERFACE *mvme, DWORD base, DWORD vector)
DWORD sis3801_input_mode (MVME_INTERFACE *mvme, DWORD base, DWORD mode)
DWORD sis3801_dwell_time (MVME_INTERFACE *mvme, DWORD base, DWORD dwell)
int sis3801_ref1 (MVME_INTERFACE *mvme, DWORD base, DWORD endis)
void sis3801_channel_enable (MVME_INTERFACE *mvme, DWORD base, DWORD nch)
DWORD sis3801_CSR_read (MVME_INTERFACE *mvme, DWORD base, const DWORD what)
DWORD sis3801_CSR_write (MVME_INTERFACE *mvme, DWORD base, const DWORD what)
void sis3801_FIFO_clear (MVME_INTERFACE *mvme, DWORD base)
int sis3801_HFIFO_read (MVME_INTERFACE *mvme, DWORD base, DWORD *pfifo)
int sis3801_FIFO_flush (MVME_INTERFACE *mvme, DWORD base, DWORD *pfifo)
void sis3801_int_source_enable (MVME_INTERFACE *mvme, DWORD base, const int intnum)
void sis3801_int_source_disable (MVME_INTERFACE *mvme, DWORD base, const int intnum)
void sis3801_int_source (MVME_INTERFACE *mvme, DWORD base, DWORD int_source)
void sis3801_int_attach (MVME_INTERFACE *mvme, DWORD base, DWORD base_vect, int level, void(*isr)(void))
void sis3801_int_detach (MVME_INTERFACE *mvme, DWORD base, DWORD base_vect, int level)
void sis3801_int_clear (MVME_INTERFACE *mvme, DWORD base, const int intnum)
int sis3801_Setup (MVME_INTERFACE *mvme, DWORD base, int mode)


Function Documentation

static void myisr ( int  sig,
siginfo_t *  siginfo,
void *  extra 
) [static]

Definition at line 612 of file sis3801.c.

void sis3801_channel_enable ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  nch 
)

Purpose: Enable nch channel for acquistion. blind command! 1..24 or 32

Definition at line 205 of file sis3801.c.

DWORD sis3801_CSR_read ( MVME_INTERFACE mvme,
DWORD  base,
const DWORD  what 
)

Purpose: Read the CSR and return 1/0 based on what. except for what == CSR_FULL where it returns current CSR

Definition at line 224 of file sis3801.c.

Referenced by sis3801_CSR_write(), sis3801_FIFO_flush(), sis3801_HFIFO_read(), and sis3801_Status().

DWORD sis3801_CSR_write ( MVME_INTERFACE mvme,
DWORD  base,
const DWORD  what 
)

Purpose: Write to the CSR and return CSR_FULL.

Definition at line 250 of file sis3801.c.

DWORD sis3801_dwell_time ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  dwell 
)

Purpose: Set dwell time in us DWORD dwell : dwell time in microseconds

Definition at line 128 of file sis3801.c.

void sis3801_FIFO_clear ( MVME_INTERFACE mvme,
DWORD  base 
)

Purpose: Clear FIFO and logic

Definition at line 270 of file sis3801.c.

int sis3801_FIFO_flush ( MVME_INTERFACE mvme,
DWORD  base,
DWORD pfifo 
)

Purpose: Test and read FIFO until empty This is done using while, if the dwelling time is short relative to the readout time, the pfifo can be overrun. No test on the max read yet! Function value: int : -1 FULL number of words read

Definition at line 323 of file sis3801.c.

int sis3801_HFIFO_read ( MVME_INTERFACE mvme,
DWORD  base,
DWORD pfifo 
)

Purpose: Reads 32KB (8K DWORD) of the FIFO Function value: int : -1 FULL 0 NOT 1/2 Full number of words read

Definition at line 291 of file sis3801.c.

DWORD sis3801_input_mode ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  mode 
)

Purpose: Set input configuration mode DWORD mode : Mode 0-4

Definition at line 106 of file sis3801.c.

Referenced by sis3801_Status().

void sis3801_int_attach ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  base_vect,
int  level,
void(*)(void)  isr 
)

Purpose: Book an ISR for a bitwise set of interrupt input (0xff). The interrupt vector is then the VECTOR_BASE+intnum Input: DWORD * base_addr : base address of the sis3801 DWORD base_vect : base vector of the module int level : IRQ level (1..7) DWORD isr_routine : interrupt routine pointer

Definition at line 448 of file sis3801.c.

void sis3801_int_clear ( MVME_INTERFACE mvme,
DWORD  base,
const int  intnum 
)

Purpose: Disable the interrupt for the bitwise input intnum (0xff). The interrupt vector is then the VECTOR_BASE+intnum Input: DWORD * base_addr : base address of the sis3801 int * intnum : interrupt number (input 0..3)

Definition at line 494 of file sis3801.c.

void sis3801_int_detach ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  base_vect,
int  level 
)

Purpose: Unbook an ISR for a bitwise set of interrupt input (0xff). The interrupt vector is then the VECTOR_BASE+intnum Input: DWORD * base_addr : base address of the sis3801 DWORD base_vect : base vector of the module int level : IRQ level (1..7)

Definition at line 475 of file sis3801.c.

void sis3801_int_source ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  int_source 
)

Purpose: Enable the one of the 4 interrupt using the predefined parameters (see sis3801.h) DWORD * intnum : interrupt number (input 0..3)

Definition at line 422 of file sis3801.c.

Referenced by sis3801_int_attach(), and sis3801_int_detach().

void sis3801_int_source_disable ( MVME_INTERFACE mvme,
DWORD  base,
const int  intnum 
)

Purpose: Enable the interrupt for the bitwise input intnum (0xff). The interrupt vector is then the VECTOR_BASE

Definition at line 385 of file sis3801.c.

void sis3801_int_source_enable ( MVME_INTERFACE mvme,
DWORD  base,
const int  intnum 
)

Purpose: Enable the interrupt for the bitwise input intnum (0xff). The interrupt vector is then the VECTOR_BASE

Definition at line 349 of file sis3801.c.

DWORD sis3801_IRQ_REG_read ( MVME_INTERFACE mvme,
DWORD  base 
)

DWORD : 0xE(1)L(3)V(8)

Definition at line 68 of file sis3801.c.

DWORD sis3801_IRQ_REG_write ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  vector 
)

Purpose: write irq (ELV) to the register and read back DWORD : 0xE(1)L(3)V(8)

Definition at line 86 of file sis3801.c.

DWORD sis3801_module_ID ( MVME_INTERFACE mvme,
DWORD  base 
)

Module ID Purpose: return the Module ID number (I) version (V) IRQ level (L) IRQ vector# (BB) 0xIIIIVLBB

Definition at line 37 of file sis3801.c.

Referenced by sis3801_Status().

void sis3801_module_reset ( MVME_INTERFACE mvme,
DWORD  base 
)

Definition at line 52 of file sis3801.c.

int sis3801_next_logic ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  endis 
)

Definition at line 178 of file sis3801.c.

int sis3801_ref1 ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  endis 
)

Purpose: Enable/Disable Reference on Channel 1 DWORD endis : action either ENABLE_REF_CH1 DISABLE_REF_CH1

Definition at line 152 of file sis3801.c.

int sis3801_Setup ( MVME_INTERFACE mvme,
DWORD  base,
int  mode 
)

Sets all the necessary parameters for a given configuration. The configuration is provided by the mode argument. Add your own configuration in the case statement. Let me know your setting if you want to include it in the distribution.

Parameters:
*mvme VME structure
base Module base address
mode Configuration mode number
*nentry number of entries requested and returned.
Returns:
MVME_SUCCESS

Definition at line 544 of file sis3801.c.

void sis3801_Status ( MVME_INTERFACE mvme,
DWORD  base 
)

Definition at line 572 of file sis3801.c.


Variable Documentation

int intflag = 0

Definition at line 610 of file sis3801.c.


Midas DOC Version 2.0.2 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk