sis3820drv.h File Reference

Go to the source code of this file.

Functions

uint32_t sis3820_RegisterRead (MVME_INTERFACE *mvme, DWORD base, int offset)
void sis3820_RegisterWrite (MVME_INTERFACE *mvme, DWORD base, int offset, uint32_t value)
int sis3820_FifoRead (MVME_INTERFACE *mvme, DWORD base, void *pdest, int wcount)
int sis3820_DataReady (MVME_INTERFACE *mvme, DWORD base)
uint32_t sis3820_ScalerRead (MVME_INTERFACE *mvme, DWORD base, int ch)
void sis3820_Reset (MVME_INTERFACE *mvme, DWORD base)
void sis3820_Status (MVME_INTERFACE *mvme, DWORD base)


Function Documentation

int sis3820_DataReady ( MVME_INTERFACE mvme,
DWORD  base 
)

Definition at line 93 of file sis3820.c.

00094 {
00095   return regRead(mvme,base,SIS3820_FIFO_WORDCOUNTER);
00096 }

int sis3820_FifoRead ( MVME_INTERFACE mvme,
DWORD  base,
void *  pdest,
int  wcount 
)

Definition at line 69 of file sis3820.c.

00070 {
00071   int rd;
00072   int save_am;
00073 
00074     mvme_get_am(mvme,&save_am);
00075     mvme_set_blt(  mvme, MVME_BLT_MBLT64);
00076     mvme_set_am(   mvme, MVME_AM_A32_D64);
00077 
00078   rd = mvme_read(mvme, pdest, base + SIS3820_FIFO_BASE, wcount*4);
00079   //  printf("fifo read wcount: %d, rd: %d\n", wcount, rd);
00080   mvme_set_am(mvme, save_am);
00081 
00082 
00083   return wcount;
00084 }

uint32_t sis3820_RegisterRead ( MVME_INTERFACE mvme,
DWORD  base,
int  offset 
)

Definition at line 44 of file sis3820.c.

00045 {
00046   return regRead(mvme, base, offset);
00047 }

void sis3820_RegisterWrite ( MVME_INTERFACE mvme,
DWORD  base,
int  offset,
uint32_t  value 
)

Definition at line 50 of file sis3820.c.

00051 {
00052   regWrite(mvme,base,offset,value);
00053 }

void sis3820_Reset ( MVME_INTERFACE mvme,
DWORD  base 
)

Definition at line 87 of file sis3820.c.

00088 {
00089   regWrite(mvme,base,SIS3820_KEY_RESET,0);
00090 }

uint32_t sis3820_ScalerRead ( MVME_INTERFACE mvme,
DWORD  base,
int  ch 
)

Definition at line 56 of file sis3820.c.

00057 {
00058   if (ch == 0)
00059     return regRead(mvme, base, SIS3820_COUNTER_CH1+ch*4);
00060   else
00061     return regRead(mvme, base, SIS3820_COUNTER_SHADOW_CH1+ch*4);
00062 }

void sis3820_Status ( MVME_INTERFACE mvme,
DWORD  base 
)

Definition at line 99 of file sis3820.c.

00100 {
00101   printf("SIS3820 at A32 0x%x\n", (int)base);
00102   printf("ModuleID and Firmware: 0x%x\n", regRead(mvme,base,SIS3820_MODID));
00103   printf("CSR: 0x%x\n", regRead(mvme,base,SIS3820_CONTROL_STATUS));
00104   printf("Operation mode: 0x%x\n", regRead(mvme,base,SIS3820_OPERATION_MODE));
00105   printf("Inhibit/Count disable: 0x%x\n", regRead(mvme, base, SIS3820_COUNTER_INHIBIT));
00106   printf("Counter Overflow: 0x%x\n", regRead(mvme, base, SIS3820_COUNTER_OVERFLOW));
00107 }


Midas DOC Version 3.0.0 ---- 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