esone.c File Reference

Go to the source code of this file.

Functions

INLINE void ccinit (void)
INLINE int fccinit (void)
INLINE void cdreg (int *ext, const int b, const int c, const int n, const int a)
INLINE void cssa (const int f, int ext, unsigned short *d, int *q)
INLINE void cfsa (const int f, const int ext, unsigned long *d, int *q)
INLINE void cccc (const int ext)
INLINE void cccz (const int ext)
INLINE void ccci (const int ext, int l)
INLINE void ctci (const int ext, int *l)
INLINE void cccd (const int ext, int l)
INLINE void ctcd (const int ext, int *l)
INLINE void cdlam (int *lam, const int b, const int c, const int n, const int a, const int inta[2])
INLINE void ctgl (const int ext, int *l)
INLINE void cclm (const int lam, int l)
INLINE void cclnk (const int lam, void(*isr)(void))
INLINE void cculk (const int lam)
INLINE void ccrgl (const int lam)
INLINE void cclc (const int lam)
INLINE void ctlm (const int lam, int *l)
INLINE void cfga (int f[], int exta[], int intc[], int qa[], int cb[])
INLINE void csga (int f[], int exta[], int intc[], int qa[], int cb[])
INLINE void cfmad (int f, int extb[], int intc[], int cb[])
INLINE void csmad (int f, int extb[], int intc[], int cb[])
INLINE void cfubc (const int f, int ext, int intc[], int cb[])
INLINE void csubc (const int f, int ext, int intc[], int cb[])
INLINE void cfubr (const int f, int ext, int intc[], int cb[])
INLINE void csubr (const int f, int ext, int intc[], int cb[])


Define Documentation

#define INLINE
 

Definition at line 34 of file esone.c.

Referenced by came_cn(), came_ext(), cccc(), cccd(), ccci(), cccz(), ccinit(), cclc(), cclm(), cclnk(), ccrgl(), cculk(), cdlam(), cdreg(), cfga(), cfmad(), cfsa(), cfubc(), cfubr(), csga(), csmad(), cssa(), csubc(), csubr(), ctcd(), ctci(), ctgl(), ctlm(), and fccinit().


Function Documentation

INLINE void came_cn int *  ext,
const int  b,
const int  c,
const int  n,
const int  a
 

Definition at line 40 of file esone.c.

Referenced by cdreg(), cfmad(), and csmad().

INLINE void came_ext const int  ext,
int *  b,
int *  c,
int *  n,
int *  a
 

Definition at line 46 of file esone.c.

Referenced by cccc(), cccd(), ccci(), cccz(), cclc(), cclm(), cclnk(), ccrgl(), cculk(), cfmad(), cfsa(), csmad(), cssa(), ctcd(), ctci(), ctgl(), and ctlm().

INLINE void cccc const int  ext  ) 
 

cccc Control Crate Clear.

Generate Crate Clear function. Execute cam_crate_clear()

Crate Clear.

Parameters:
ext external address
Returns:
void

Definition at line 204 of file esone.c.

INLINE void cccd const int  ext,
int  l
 

cccd Control Crate D.

Enable or Disable Crate Demand.

Crate D.

Parameters:
ext external address
l action l=0 -> Clear D, l=1 -> Set D
Returns:
void

Definition at line 282 of file esone.c.

INLINE void ccci const int  ext,
int  l
 

ccci Control Crate I.

Set or Clear Dataway Inhibit, Execute cam_inhinit_set() /clear()

Crate I.

Parameters:
ext external address
l action l=0 -> Clear I, l=1 -> Set I
Returns:
void

Definition at line 241 of file esone.c.

INLINE void cccz const int  ext  ) 
 

cccz Control Crate Z.

Generate Dataway Initialize. Execute cam_crate_zinit()

Crate Z.

Parameters:
ext external address
Returns:
void

Definition at line 222 of file esone.c.

INLINE void ccinit void   ) 
 

ccinit CAMAC initialization

CAMAC initialization must be called before any other ESONE subroutine call

CAMAC initialization.

Returns:
void

Definition at line 68 of file esone.c.

INLINE void cclc const int  lam  ) 
 

cclc Control Clear LAM. Clear the LAM of the station pointer by the lam address.

Clear LAM.

Parameters:
lam external address
Returns:
void

Definition at line 450 of file esone.c.

INLINE void cclm const int  lam,
int  l
 

cclm Control Crate LAM.

Enable or Disable LAM. Execute F24 for disable, F26 for enable.

dis/enable LAM.

Parameters:
lam external address
l action l=0 -> disable LAM , l=1 -> enable LAM
Returns:
void

Definition at line 367 of file esone.c.

INLINE void cclnk const int  lam,
void(*  isr)(void)
 

cclnk Link LAM to service procedure

Link a specific service routine to a LAM. Since this routine is executed asynchronously, care must be taken on re-entrancy.

Link LAM to service procedure

Parameters:
lam external address
isr name of service procedure
Returns:
void

Definition at line 391 of file esone.c.

INLINE void ccrgl const int  lam  ) 
 

ccrgl Relink LAM

Re-enable LAM in the controller

Re-enable LAM

Parameters:
lam external address
Returns:
void

Definition at line 430 of file esone.c.

INLINE void cculk const int  lam  ) 
 

cculk Unlink LAM from service procedure

Performs complementary operation to cclnk.

Detach LAM from service procedure

Parameters:
lam external address
Returns:
void

Definition at line 412 of file esone.c.

INLINE void cdlam int *  lam,
const int  b,
const int  c,
const int  n,
const int  a,
const int  inta[2]
 

cdlam Control Declare LAM.

Declare LAM, Identical to cdreg.

Declare LAM.

Parameters:
lam external LAM address
b branch number (0..7)
c crate number (0..)
n station number (0..30)
a sub-address (0..15)
inta[2] implementation dependent
Returns:
void

Definition at line 328 of file esone.c.

INLINE void cdreg int *  ext,
const int  b,
const int  c,
const int  n,
const int  a
 

cdreg Control Declaration REGister.

Compose an external address from BCNA for later use. Accessing CAMAC through ext could be faster if the external address is memory mapped to the processor (hardware dependent). Some CAMAC controller do not have this option see {appendix D: Supported hardware}. In this case External Address register.

Parameters:
ext external address
b branch number (0..7)
c crate number (0..)
n station number (0..30)
a sub-address (0..15)
Returns:
void

Definition at line 107 of file esone.c.

Referenced by cdlam().

INLINE void cfga int  f[],
int  exta[],
int  intc[],
int  qa[],
int  cb[]
 

cfga Control Full (24bit) word General Action.

General external address scan function.

Parameters:
f function code
exta[] external address array
intc[] data array
qa[] Q response array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 491 of file esone.c.

INLINE void cfmad int  f,
int  extb[],
int  intc[],
int  cb[]
 

cfmad Control Full (24bit) Address Q scan.

Scan all sub-address while Q=1 from a0..a15 max from address extb[0] and store corresponding data in intc[]. If Q=0 while A<15 or A=15 then cross station boundary is applied (n-> n+1) and sub-address is reset (a=0). Perform action until either cb[0] action are performed or current external address exceeds extb[1].

{ implementation of cb[2] for LAM recognition is not implemented.}

Address scan function.

Parameters:
f function code
extb[] external address array \ extb[0] : first valid external address \ extb[1] : last valid external address
intc[] data array
qa[] Q response array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 548 of file esone.c.

INLINE void cfsa const int  f,
const int  ext,
unsigned long *  d,
int *  q
 

cfsa Control Full Operation.

24 bit operation on a given external CAMAC address.

The range of the f is hardware dependent. The number indicated below are for standard ANSI/IEEE Std (758-1979) \ Execute cam24i for f<8, cam24o for f>15, camc_q for (f>7 or f>23)

24 bit function.

Parameters:
f function code (0..31)
ext external address
d data long word
q Q response
Returns:
void

Definition at line 170 of file esone.c.

Referenced by cfga(), cfubc(), and cfubr().

INLINE void cfubc const int  f,
int  ext,
int  intc[],
int  cb[]
 

cfubc Control Full (24bit) Block Repeat with Q-stop.

Execute function f on address ext with data intc[] while Q.

Repeat function Q-stop.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 656 of file esone.c.

INLINE void cfubr const int  f,
int  ext,
int  intc[],
int  cb[]
 

cfubr Repeat Mode Block Transfer (24bit).

Execute function f on address ext with data intc[] if Q. If noQ keep current intc[] data. Repeat cb[0] times.

Repeat function.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 725 of file esone.c.

INLINE void csga int  f[],
int  exta[],
int  intc[],
int  qa[],
int  cb[]
 

csga Control (16bit) word General Action.

General external address scan function.

Parameters:
f function code
exta[] external address array
intc[] data array
qa[] Q response array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 515 of file esone.c.

INLINE void csmad int  f,
int  extb[],
int  intc[],
int  cb[]
 

csmad Control (16bit) Address Q scan.

Scan all sub-address while Q=1 from a0..a15 max from address extb[0] and store corresponding data in intc[]. If Q=0 while A<15 or A=15 then cross station boundary is applied (n-> n+1) and sub-address is reset (a=0). Perform action until either cb[0] action are performed or current external address exceeds extb[1].

{ implementation of cb[2] for LAM recognition is not implemented.}

Address scan function.

Parameters:
f function code
extb[] external address array \ extb[0] : first valid external address \ extb[1] : last valid external address
intc[] data array
qa[] Q response array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 606 of file esone.c.

INLINE void cssa const int  f,
int  ext,
unsigned short *  d,
int *  q
 

cssa Control Short Operation.

16 bit operation on a given external CAMAC address.

The range of the f is hardware dependent. The number indicated below are for standard ANSI/IEEE Std (758-1979) \ Execute cam16i for f<8, cam16o for f>15, camc_q for (f>7 or f>23)

16 bit function.

Parameters:
f function code (0..31)
ext external address
d data word
q Q response
Returns:
void

Definition at line 129 of file esone.c.

Referenced by csga(), csubc(), and csubr().

INLINE void csubc const int  f,
int  ext,
int  intc[],
int  cb[]
 

csubc Control (16bit) Block Repeat with Q-stop.

Execute function f on address ext with data intc[] while Q.

Repeat function Q-stop.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 690 of file esone.c.

INLINE void csubr const int  f,
int  ext,
int  intc[],
int  cb[]
 

csubr Repeat Mode Block Transfer (16bit).

Execute function f on address ext with data intc[] if Q. If noQ keep current intc[] data. Repeat cb[0] times.

Repeat function.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array \ cb[0] : number of function to perform \ cb[1] : returned number of function performed
Returns:
void

Definition at line 759 of file esone.c.

INLINE void ctcd const int  ext,
int *  l
 

ctcd Control Test Crate D.

Test Crate Demand.

Test Crate D.

Parameters:
ext external address
l D cleared -> l=0, D set -> l=1
Returns:
void

Definition at line 305 of file esone.c.

INLINE void ctci const int  ext,
int *  l
 

ctci Test Crate I.

Test Crate Inhibit, Execute cam_inhibit_test()

Crate I.

Parameters:
ext external address
l action l=0 -> Clear I, l=1 -> Set I
Returns:
void

Definition at line 263 of file esone.c.

INLINE void ctgl const int  ext,
int *  l
 

ctgl Control Test Demand Present.

Test the LAM register.

Test GL.

Parameters:
lam external LAM register address
l l !=0 if any LAM is set.
Returns:
void

Definition at line 346 of file esone.c.

INLINE void ctlm const int  lam,
int *  l
 

ctlm Test LAM.

Test the LAM of the station pointed by lam. Performs an F8

Test LAM.

Parameters:
lam external address
l No LAM-> l=0, LAM present-> l=1
Returns:
void

Definition at line 469 of file esone.c.

INLINE int fccinit void   ) 
 

fccinit CAMAC initialization with return status

fccinit can be called instead of ccinit to determine if the initialization was successful

CAMAC initialization.

Returns:
1 for success, 0 for failure

Definition at line 83 of file esone.c.


Midas DOC Version 1.9.3 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Suzannah Daviel - Doxygen - Peter Green - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn Moloney - Dave Morris - Konstantin Olchanski - Renee Poutissou - Andreas Suter - Piotr Adam Zolnierczuk