#include <linux/kernel.h>
#include <math.h>
#include "/home/czubanowski/Gxsm/pci32/dspC32/spa/spacmd.h"
Go to the source code of this file.
Classes | |
struct | BB_GATEGEN |
struct | SCANP |
struct | SPALEED |
Defines | |
#define | BB_TEST_CNT |
#define | BB_POLLING_MODE |
#define | BB_MEM_BASE 0xcd000 |
#define | BB_MEM_AUTOPROBE 0 |
#define | BB_MEM_BASE_START 0xc0000 |
#define | BB_MEM_BASE_END 0xe0000 |
#define | BB_MEM_SIZE 0x400 |
#define | BB_IRQLINE 5 |
#define | BB_XY_DEFLECTON_BOARD 3 |
#define | BB_ENERGY_BOARD 1 |
#define | BB_PCI20001C1 (0x1+0x2+0x8+0x10) |
#define | BB_PCI20001C2 (0x1+0x4+0x8+0x10) |
#define | BB_IDMSK 0x1f |
#define | BB_PCI20006M2 0xe2 |
#define | BB_PCI20006M3 0xe3 |
#define | BB_PCI20007M 0xea |
#define | BB_BASE_MODULE(N) ( spa[BB_CARD_NO].BB_membase + (((N)&3)<<8) ) |
#define | BB_MODULE_PRESENT(M) (readb( BB_BASE_MODULE(0) ) & (1<<(8-(M)))) |
#define | BB_IRQ_STATUS readb( BB_BASE_MODULE(0) + 0x40 ) |
#define | BB_DAC_X(X, N) writew( (X), BB_BASE_MODULE(N) + 0x0d) |
#define | BB_DAC_Y(X, N) writew( (X), BB_BASE_MODULE(N) + 0x15) |
#define | BB_DAC_OUT(N) writeb(0xff, BB_BASE_MODULE(N) + 0x1b) |
#define | BB_TMR_MODULE_ID 2 |
#define | BB_TMR_BASE ( BB_BASE_MODULE(BB_TMR_MODULE_ID) ) |
#define | BB_TMR_RTGREG ( BB_TMR_BASE + 0x04 ) |
#define | BB_TMR_RTGREG_LO ( BB_TMR_RTGREG ) |
#define | BB_TMR_RTGREG_HI ( BB_TMR_RTGREG + 1) |
#define | BB_TMR_CNT0REG ( BB_TMR_BASE + 0x08 ) |
#define | BB_TMR_CNT1REG ( BB_TMR_BASE + 0x09 ) |
#define | BB_TMR_CNT2REG ( BB_TMR_BASE + 0x0A ) |
#define | BB_TMR_CNT3REG ( BB_TMR_BASE + 0x06 ) |
#define | BB_TMR_RTGCNT3CTRL ( BB_TMR_BASE + 0x07 ) |
#define | BB_TMR_CNT012CTRL ( BB_TMR_BASE + 0x0B ) |
#define | BB_TMR_CNTGATECTRL ( BB_TMR_BASE + 0x0C ) |
#define | BB_CRTL_MSK 0x40 |
#define | AD_MAX_VOLT 10. |
#define | DA_MAX_VOLT 10. |
#define | DA_MAX_VAL 0x7ffe |
#define | UDA_MAX_VAL 0xffff |
#define | U2FLT(X) ((X)*(float)(DA_MAX_VAL)/AD_MAX_VOLT) |
#define | U2INT(X) (int)((X)*(float)(DA_MAX_VAL)/AD_MAX_VOLT) |
#define | INT2U(X) ((float)(X)/DA_MAX_VAL*AD_MAX_VOLT) |
#define | UNI_U2FLT(X) ((X)*(float)(UDA_MAX_VAL)/AD_MAX_VOLT) |
#define | UNI_U2INT(X) (int)((X)*(float)(UDA_MAX_VAL)/AD_MAX_VOLT) |
#define | UNI_INT2U(X) ((float)(X)/UDA_MAX_VAL*AD_MAX_VOLT) |
#define | DPRAMBASE (volatile int*) (spa[BB_CARD_NO].dsp->virtual_dpram) |
#define | CMD_BUFFER (volatile int*) (DPRAMBASE+0x00) |
#define | CMD_PARM (volatile int*) (DPRAMBASE+0x01) |
#define | BUFFER (volatile int*) (DPRAMBASE+DSP_BUFFER_START) |
#define | BUFFERL (volatile unsigned long*) (DPRAMBASE+DSP_BUFFER_START) |
#define | DPRAML (volatile unsigned long*) (DPRAMBASE) |
#define | LCDBUFFER (volatile unsigned long*) (DPRAMBASE+DSP_LCDBUFFER) |
#define | MAXSCANPOINTS (DSP_DATA_REG_LEN) |
#define | DSPack spa[BB_CARD_NO].dsp->SrvReqAck=TRUE |
#define | MD_CMD 0x08 |
#define | MD_SCAN 0x10 |
#define | MD_BLK 0x80 |
#define | LEDPORT(X) *((unsigned long*)(DPRAMBASE+DSP_USR_DIO))=X |
#define | MAX_BB_CARDS 1 |
#define | BB_CARD_NO 0 |
Functions | |
void | LCDclear (void) |
int | LCDprintf (const char *format,...) |
void | scan2d (void) |
void | linescan (int n, float y) |
unsigned long | ChanneltronCounts (float x, float y) |
int | GetParamI (unsigned int N) |
float | GetParamF (unsigned int N) |
void | BB_SetVolt (double x, double y) |
void | BB_SetEnergy (double En) |
unsigned long | BB_CntRead (void) |
double | BB_InitCnt (double gate) |
void | BB_SetCnt (void) |
int | BB_ReadyCnt (void) |
static void | bb_gate_interrupt (int irq, void *dev_id, struct pt_regs *regs) |
void | bb_test_counting (double E, double ms) |
int | InitEmu (struct dspsim_thread_data *dsp) |
void | ExitEmu (void) |
void | ServiceRequest (struct dspsim_thread_data *dsp) |
Variables | |
static int | irq_count = 0 |
static int | timeout_count = 0 |
static SPALEED | spa [MAX_BB_CARDS] |
|
Definition at line 108 of file spaleed_bb.c. Referenced by ServiceRequest(). |
|
Definition at line 61 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 164 of file spaleed_bb.c. Referenced by bb_gate_interrupt(), BB_InitCnt(), BB_SetCnt(), BB_SetVolt(), bb_test_counting(), ChanneltronCounts(), InitEmu(), linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 91 of file spaleed_bb.c. Referenced by BB_CntRead(). |
|
Definition at line 72 of file spaleed_bb.c. Referenced by BB_SetEnergy(), and BB_SetVolt(). |
|
Definition at line 70 of file spaleed_bb.c. Referenced by BB_SetEnergy(), and BB_SetVolt(). |
|
Definition at line 71 of file spaleed_bb.c. Referenced by BB_SetEnergy(), and BB_SetVolt(). |
|
Definition at line 49 of file spaleed_bb.c. Referenced by BB_SetEnergy(). |
|
Definition at line 55 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 64 of file spaleed_bb.c. |
|
Definition at line 46 of file spaleed_bb.c. Referenced by ExitEmu(). |
|
Definition at line 42 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 40 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 44 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 43 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 45 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 63 of file spaleed_bb.c. |
|
Definition at line 53 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 54 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 57 of file spaleed_bb.c. |
|
Definition at line 58 of file spaleed_bb.c. |
|
Definition at line 59 of file spaleed_bb.c. |
|
Definition at line 36 of file spaleed_bb.c. |
|
Definition at line 35 of file spaleed_bb.c. |
|
Definition at line 77 of file spaleed_bb.c. |
|
Definition at line 88 of file spaleed_bb.c. Referenced by BB_CntRead(), and BB_SetCnt(). |
|
Definition at line 82 of file spaleed_bb.c. Referenced by BB_CntRead(), and BB_SetCnt(). |
|
Definition at line 83 of file spaleed_bb.c. Referenced by BB_CntRead(), and BB_SetCnt(). |
|
Definition at line 84 of file spaleed_bb.c. |
|
Definition at line 85 of file spaleed_bb.c. |
|
Definition at line 89 of file spaleed_bb.c. Referenced by BB_SetCnt(). |
|
Definition at line 75 of file spaleed_bb.c. |
|
Definition at line 87 of file spaleed_bb.c. Referenced by BB_ReadyCnt(), and BB_SetCnt(). |
|
Definition at line 78 of file spaleed_bb.c. |
|
Definition at line 80 of file spaleed_bb.c. Referenced by BB_ReadyCnt(), and BB_SetCnt(). |
|
Definition at line 79 of file spaleed_bb.c. Referenced by BB_SetCnt(). |
|
Definition at line 48 of file spaleed_bb.c. Referenced by BB_SetVolt(). |
|
Definition at line 129 of file spaleed_bb.c. |
|
Definition at line 130 of file spaleed_bb.c. Referenced by linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 127 of file spaleed_bb.c. Referenced by InitEmu(), and ServiceRequest(). |
|
Definition at line 128 of file spaleed_bb.c. Referenced by GetParamF(), and GetParamI(). |
|
Definition at line 110 of file spaleed_bb.c. |
|
Definition at line 109 of file spaleed_bb.c. |
|
Definition at line 125 of file spaleed_bb.c. |
|
Definition at line 131 of file spaleed_bb.c. |
|
Definition at line 135 of file spaleed_bb.c. Referenced by ServiceRequest(). |
|
Definition at line 117 of file spaleed_bb.c. |
|
Definition at line 132 of file spaleed_bb.c. Referenced by LCDclear(), and LCDprintf(). |
|
Definition at line 141 of file spaleed_bb.c. Referenced by InitEmu(). |
|
Definition at line 163 of file spaleed_bb.c. |
|
Definition at line 133 of file spaleed_bb.c. Referenced by linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 139 of file spaleed_bb.c. |
|
Definition at line 137 of file spaleed_bb.c. Referenced by InitEmu(), and ServiceRequest(). |
|
Definition at line 138 of file spaleed_bb.c. Referenced by ServiceRequest(). |
|
Definition at line 115 of file spaleed_bb.c. |
|
Definition at line 116 of file spaleed_bb.c. Referenced by BB_SetEnergy(), and ServiceRequest(). |
|
Definition at line 111 of file spaleed_bb.c. |
|
Definition at line 122 of file spaleed_bb.c. |
|
Definition at line 120 of file spaleed_bb.c. |
|
Definition at line 121 of file spaleed_bb.c. |
|
Definition at line 603 of file spaleed_bb.c. References BB_CRTL_MSK, BB_TMR_CNT012CTRL, BB_TMR_CNT0REG, and BB_TMR_CNT1REG. Referenced by ChanneltronCounts(). |
|
Definition at line 688 of file spaleed_bb.c. References BB_CARD_NO, irq_count, spa, and SPALEED::waitq. |
|
Definition at line 625 of file spaleed_bb.c. References BB_CARD_NO, SPALEED::bb_gate_reg, factor(), BB_GATEGEN::hb0, BB_GATEGEN::hb1, BB_GATEGEN::lb0, BB_GATEGEN::lb1, and spa. Referenced by bb_test_counting(), linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 682 of file spaleed_bb.c. References BB_TMR_RTGCNT3CTRL, and BB_TMR_RTGREG_HI. Referenced by ChanneltronCounts(). |
|
Definition at line 660 of file spaleed_bb.c. References BB_CARD_NO, BB_TMR_CNT012CTRL, BB_TMR_CNT0REG, BB_TMR_CNT1REG, BB_TMR_CNTGATECTRL, BB_TMR_RTGCNT3CTRL, BB_TMR_RTGREG_HI, BB_TMR_RTGREG_LO, and spa. Referenced by ChanneltronCounts(). |
|
Definition at line 597 of file spaleed_bb.c. References BB_DAC_OUT, BB_DAC_X, BB_DAC_Y, BB_ENERGY_BOARD, and U2INT. Referenced by bb_test_counting(), linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 584 of file spaleed_bb.c. References BB_CARD_NO, BB_DAC_OUT, BB_DAC_X, BB_DAC_Y, BB_XY_DEFLECTON_BOARD, SCANP::rotmxx, SCANP::rotmxy, SCANP::rotmyx, SCANP::rotmyy, SCANP::rotoffx, SCANP::rotoffy, SPALEED::scanp, and spa. Referenced by ChanneltronCounts(), linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 214 of file spaleed_bb.c. References BB_CARD_NO, BB_InitCnt(), BB_SetEnergy(), ChanneltronCounts(), irq_count, KDEBUG, SCANP::ms, SPALEED::scanp, spa, and timeout_count. |
|
Definition at line 526 of file spaleed_bb.c. References BB_CARD_NO, BB_CntRead(), BB_ReadyCnt(), BB_SetCnt(), BB_SetVolt(), SPALEED::bb_timeout_flg, SCANP::ms, mysleep(), scanp, spa, timeout(), SPALEED::timeout_tmr, waitq, and wakeups. Referenced by bb_test_counting(), linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 340 of file spaleed_bb.c. References BB_IRQLINE, irq_count, KDEBUG, and timeout_count. |
|
Definition at line 354 of file spaleed_bb.c. References CMD_PARM. Referenced by ServiceRequest(). |
|
Definition at line 348 of file spaleed_bb.c. References CMD_PARM. Referenced by ServiceRequest(). |
|
Definition at line 227 of file spaleed_bb.c. References BB_BASE_MODULE, BB_CARD_NO, BB_IDMSK, BB_MEM_AUTOPROBE, BB_MEM_BASE, BB_MEM_BASE_END, BB_MEM_BASE_START, BB_MEM_SIZE, SPALEED::BB_membase, BB_PCI20001C1, BB_PCI20001C2, SPALEED::dsp, KDEBUG, SPALEED::major, SPALEED::minor, pcdsp_major, and spa. |
|
Definition at line 359 of file spaleed_bb.c. References DSP_LCDBUFFERLEN, and LCDBUFFER. Referenced by InitEmu(), and ServiceRequest(). |
|
Definition at line 365 of file spaleed_bb.c. References LCDBUFFER. Referenced by InitEmu(), and ServiceRequest(). |
|
Definition at line 497 of file spaleed_bb.c. References BB_CARD_NO, BB_InitCnt(), BB_SetEnergy(), BB_SetVolt(), BUFFERL, ChanneltronCounts(), SCANP::E, SCANP::len, MAXSCANPOINTS, SCANP::ms, mysleep(), SCANP::N, scanp, SPALEED::scanp, and spa. Referenced by ServiceRequest(). |
|
Definition at line 468 of file spaleed_bb.c. References BB_CARD_NO, BB_InitCnt(), BB_SetEnergy(), BB_SetVolt(), BUFFERL, ChanneltronCounts(), SCANP::E, SCANP::lenxy, MAXSCANPOINTS, SCANP::ms, mysleep(), SCANP::Nx, SCANP::Ny, SPALEED::scanp, scanp, and spa. Referenced by ServiceRequest(). |
|
|
Definition at line 101 of file spaleed_bb.c. Referenced by bb_gate_interrupt(), bb_test_counting(), and ExitEmu(). |
|
Definition at line 210 of file spaleed_bb.c. Referenced by bb_gate_interrupt(), BB_InitCnt(), BB_SetCnt(), BB_SetVolt(), bb_test_counting(), calc_spaparam(), ChanneltronCounts(), InitEmu(), linescan(), scan2d(), and ServiceRequest(). |
|
Definition at line 102 of file spaleed_bb.c. Referenced by bb_test_counting(), and ExitEmu(). |