#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include "midas.h"
#include "crate.h"
#include "vme.h"
#include "dl40x.h"
#include "diag.h"
#include "odb_wrapper.h"
Go to the source code of this file.
INT dl401_bor1 |
( |
struct dl401 * |
d) | |
|
Definition at line 168 of file dl40x.cpp.
References dl401::a16_base, dl401::a16_handle, dl401::a32_base, dl401::a32_handle, crate_number, diag_print(), DL401_AM_EXT_MODE, DL401_BASE, dl401_clear(), DL401_DEFMODE, DL401_LWIOENA, DL401_MASK, DL401_MODE, DL401_NCHAN, dl401_reset(), dl401_setPedestals(), odb_get_dword(), odb_get_word(), dl401::odb_name, ped, SUCCESS, vme_open(), vme_write_d16(), VMEMAP_ASPACE_A16, VMEMAP_ASPACE_A32, VMEMAP_DWIDTH_32, VMEMAP_PRGDATAAM_DATA, VMEMAP_SUPUSERAM_SUPER, and VMEMAP_SUPUSERAM_USER.
Referenced by dl40x_bor().
210 ped[k] =
odb_get_word (
"/Equipment/Crate %d/Settings/%s/Pedestal",
219 diag_print(2,
"dl401_bor1 a32_base=0x%08lx a16_base=0x%08lx\n",
INLINE void dl401_clear |
( |
struct dl401 * |
d) | |
|
INLINE void dl401_convert |
( |
struct dl401 * |
d) | |
|
INLINE int dl401_finished |
( |
struct dl401 * |
d) | |
|
INLINE u_short dl401_getCounts |
( |
struct dl401 * |
d) | |
|
INLINE u_short dl401_getMode |
( |
struct dl401 * |
d) | |
|
int dl401_read |
( |
struct dl401 * |
d, |
|
|
u_int * |
data |
|
) |
| |
Definition at line 300 of file dl40x.cpp.
Referenced by dl40x_read().
302 register u_int
i = 0;
303 register u_int *addr;
307 diag_print (2,
"dl401_read: [%d] base=%p counts=%d\n", d, addr, counts);
INLINE void dl401_reset |
( |
struct dl401 * |
d) | |
|
INLINE int dl401_setPedestals |
( |
struct dl401 * |
d, |
|
|
u_short |
p[], |
|
|
int |
np |
|
) |
| |
Definition at line 226 of file dl40x.cpp.
Referenced by dl401_bor1().
233 for (
int i = 0;
i < np;
i++) {
237 diag_print (2,
"dl401_setPedestal: [%d] 0%08lo (", d, parPed);
247 ((parPed << i) & DL401_PEDBITMASK) >> (DL401_PEDBITS - 1);
INLINE void dl403_asyncMode |
( |
struct dl403 * |
d) | |
|
INLINE void dl403_contMode |
( |
struct dl403 * |
d) | |
|
INLINE short dl403_getMode |
( |
struct dl403 * |
d) | |
|
INT dl403_init |
( |
struct dl403 * |
d) | |
|
Definition at line 352 of file dl40x.cpp.
Referenced by dl40x_bor().
364 odb_get_word (
"/Equipment/Crate %d/Settings/FADC CLOCK/a16 base address",
379 switch (fadc_frequency)
393 "FADC clock frequency must be 25, 50, or 100 MHz (currently %d)\n",
INLINE void dl403_reset |
( |
struct dl403 * |
d) | |
|
INLINE short dl403_runBit |
( |
struct dl403 * |
d) | |
|
INLINE short dl403_running |
( |
struct dl403 * |
d) | |
|
void dl403_setClockCycle |
( |
struct dl403 * |
d, |
|
|
u_short |
c1, |
|
|
u_short |
c2, |
|
|
u_short |
c3 |
|
) |
| |
Definition at line 417 of file dl40x.cpp.
Referenced by dl403_init().
424 "dl403_setClockCycles: [%d] cyc1=0x%04hx cyc2=0x%04hx cyc3=0x%04hx\n",
void dl403_setClockRate |
( |
struct dl403 * |
d, |
|
|
u_short |
clk1, |
|
|
u_short |
clk2, |
|
|
u_short |
clk3 |
|
) |
| |
Definition at line 407 of file dl40x.cpp.
Referenced by dl403_init().
409 diag_print (2,
"dl403_setClockRate: [%d] rate=0x%02hx\n", d,
410 (clk1 | (clk2 << 2) | (clk3 << 4)));
413 clk1 | (clk2 << 2) | (clk3 << 4));
INLINE void dl403_start |
( |
struct dl403 * |
d) | |
|
INLINE void dl403_steadyMode |
( |
struct dl403 * |
d) | |
|
INLINE void dl403_stop |
( |
struct dl403 * |
d) | |
|
Definition at line 59 of file dl40x.cpp.
References clk, crate_number, diag_print(), DL401, dl401_bor1(), DL401_MAXMODULES, dl403_init(), enabled, dl401::enabled, FALSE, odb_find_key(), odb_get_bool(), sprintf(), and SUCCESS.
78 diag_print (1,
"ODB says FADC #%d is present in crate 3, ", j);
80 odb_get_bool (
"/Equipment/Crate %d/Settings/FADC %d/enabled status",
84 diag_print (1,
"and is enabled. Initializing...\n");
INT dl40x_read |
( |
char * |
pevent) | |
|
Definition at line 117 of file dl40x.cpp.
References clk, DL401, dl401_clear(), DL401_CNTMAX, dl401_finished(), DL401_MAXMODULES, dl401_read(), dl401_reset(), dl403_running(), dl403_start(), enabled, dl403::enabled, size, sprintf(), and SUCCESS.
145 bk_create (pevent, bk_name, TID_DWORD, &pdata);
148 bk_close (pevent, pdata);
Initial value:= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
Definition at line 25 of file dl40x.cpp.