dspemu.c File Reference

#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/pci.h>
#include <linux/types.h>
#include <linux/major.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/devpts_fs.h>
#include <linux/file.h>
#include <linux/console.h>
#include <linux/timer.h>
#include <linux/ctype.h>
#include <linux/kd.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/malloc.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <linux/unistd.h>
#include "dbgstuff.h"
#include "pcsim.h"

Go to the source code of this file.

Classes

struct  dspsim_thread_data

Defines

#define PCDSP_VERSION   "V0.1 (C) P.Zahl 2000"
#define __KERNEL_SYSCALLS__
#define ACKD_DSP   dspsim_td.SrvReqAck
#define REQD_DSP   dspsim_td.ReqDAck
#define TIMEOUT_TICKS   19
#define JIFFIES_SEM   2
#define MAXWAKEUPS_SEM   10
#define MAXWAKEUPS_WMBOX   10
#define MAXWAKEUPS_RMBOX   10
#define SEEK_SET   0
#define SEEK_CUR   1
#define SEEK_END   2

Functions

static void timeout (unsigned long ignore)
void mysleep (unsigned long myjiffies)
int InitEmu (struct dspsim_thread_data *dsp)
void ExitEmu (void)
void ServiceRequest (struct dspsim_thread_data *dsp)
int BoxFull (int wait)
int BoxEmpty (int wait)
int ChkBoxEmpty (int wait)
int WriteBox (unsigned long data, int wait)
int ChkBoxFull (int wait)
int ReadBox (unsigned long *data, int wait)
static loff_t pcdsp_seek (struct file *, loff_t, int)
static ssize_t pcdsp_read (struct file *, char *, size_t, loff_t *)
static ssize_t pcdsp_write (struct file *, const char *, size_t, loff_t *)
static int pcdsp_release (struct inode *, struct file *)
static int pcdsp_ioctl (struct inode *, struct file *, unsigned int, unsigned long)
int pcdsp_initialize (void)
void pcdsp_quit (void)
int init_module (void)
void cleanup_module (void)
static int dspsim_thread (void *data)
void start_dsp (struct dspsim_thread_data *dsp)
void stop_dsp (struct dspsim_thread_data *dsp)
static int pcdsp_open (struct inode *inode, struct file *f)

Variables

static int pcdsp_major
static int opened
static char * pcdsp_dprambaseptr
static int wakeups = -1
static struct wait_queue * waitq = NULL
dspsim_thread_data dspsim_td
file_operations pcdsp_fops


Define Documentation

#define __KERNEL_SYSCALLS__
 

Definition at line 90 of file dspemu.c.

#define ACKD_DSP   dspsim_td.SrvReqAck
 

Definition at line 126 of file dspemu.c.

#define JIFFIES_SEM   2
 

Definition at line 135 of file dspemu.c.

#define MAXWAKEUPS_RMBOX   10
 

Definition at line 138 of file dspemu.c.

#define MAXWAKEUPS_SEM   10
 

Definition at line 136 of file dspemu.c.

#define MAXWAKEUPS_WMBOX   10
 

Definition at line 137 of file dspemu.c.

#define PCDSP_VERSION   "V0.1 (C) P.Zahl 2000"
 

Definition at line 41 of file dspemu.c.

#define REQD_DSP   dspsim_td.ReqDAck
 

Definition at line 127 of file dspemu.c.

#define SEEK_CUR   1
 

Definition at line 395 of file dspemu.c.

#define SEEK_END   2
 

Definition at line 396 of file dspemu.c.

#define SEEK_SET   0
 

Definition at line 394 of file dspemu.c.

#define TIMEOUT_TICKS   19
 

Definition at line 134 of file dspemu.c.


Function Documentation

int BoxEmpty int  wait  ) 
 

int BoxFull int  wait  ) 
 

int ChkBoxEmpty int  wait  ) 
 

int ChkBoxFull int  wait  ) 
 

void cleanup_module void   ) 
 

static int dspsim_thread void *  data  )  [static]
 

Definition at line 209 of file dspemu.c.

References dspsim_thread_data::active, KDEBUG, KDEBUG_L3, dspsim_thread_data::rmmod, ServiceRequest(), dspsim_thread_data::thread, and dspsim_thread_data::wq.

void ExitEmu void   ) 
 

Definition at line 340 of file spaleed_bb.c.

int init_module void   ) 
 

int InitEmu struct dspsim_thread_data dsp  ) 
 

Definition at line 227 of file spaleed_bb.c.

References CMD_BUFFER, SPM::dsp, SPM::LastSPMMode, LCDclear(), LCDprintf(), LEDPORT, MD_CMD, SCANP::MV_XPos, SCANP::MV_YPos, SCANP::rotmxx, SCANP::rotmxy, SCANP::rotmyx, SCANP::rotmyy, SCANP::rotoffx, SCANP::rotoffy, SPM::scanp, spm, SPM::SPMMode, SURFCORR, SURFSIZE, and surftab.

void mysleep unsigned long  myjiffies  ) 
 

int pcdsp_initialize void   ) 
 

static int pcdsp_ioctl struct inode *  ,
struct file *  ,
unsigned  int,
unsigned  long
[static]
 

Definition at line 451 of file dspemu.c.

References ChkBoxEmpty(), ChkBoxFull(), FALSE, KDEBUG, MODID, PCDSP_GETMODID, PCDSP_HALT, PCDSP_MBOX_EMPTY, PCDSP_MBOX_FULL, PCDSP_MBOX_READ_NOWAIT, PCDSP_MBOX_READ_WAIT, PCDSP_MBOX_WRITE_NOWAIT, PCDSP_MBOX_WRITE_WAIT, PCDSP_PUT_SPEED, PCDSP_RESET, PCDSP_RUN, ReadBox(), TRUE, and WriteBox().

static int pcdsp_open struct inode *  inode,
struct file *  f
[static]
 

Definition at line 436 of file dspemu.c.

References KDEBUG, and opened.

void pcdsp_quit void   )  [inline]
 

static ssize_t pcdsp_read struct file *  ,
char *  ,
size_t  ,
loff_t * 
[static]
 

Definition at line 415 of file dspemu.c.

References KDEBUG_L2, PCDSP_DPRAM_SIZE, and pcdsp_dprambaseptr.

static int pcdsp_release struct inode *  ,
struct file * 
[static]
 

Definition at line 444 of file dspemu.c.

References KDEBUG, and opened.

static loff_t pcdsp_seek struct file *  ,
loff_t  ,
int 
[static]
 

Definition at line 399 of file dspemu.c.

References KDEBUG, PCDSP_DPRAM_SIZE, SEEK_CUR, SEEK_END, and SEEK_SET.

static ssize_t pcdsp_write struct file *  ,
const char *  ,
size_t  ,
loff_t * 
[static]
 

Definition at line 426 of file dspemu.c.

References KDEBUG_L2, PCDSP_DPRAM_SIZE, and pcdsp_dprambaseptr.

int ReadBox unsigned long *  data,
int  wait
 

void ServiceRequest struct dspsim_thread_data dsp  ) 
 

Definition at line 374 of file spaleed_bb.c.

References AD_MAX_VOLT, AFM_MOV_QM, AFM_MOV_QP, AFM_MOV_XM, AFM_MOV_XP, AFM_MOV_YM, AFM_MOV_YP, SCANP::afm_mover_app, SCANP::afm_mover_mode, SCANP::AFM_MV_count, SCANP::AFM_MV_Scount, SCANP::afm_piezo_amp, SCANP::afm_piezo_speed, SCANP::afm_piezo_steps, afm_piezo_steps, SCANP::afm_u_piezomax, BUFFERL, CHECK_AUX, CHECK_PID, CHECK_PRBSRCA, CHECK_SRCA, CHECK_SRCB, CMD_BUFFER, SCANP::Const_I, SCANP::Const_P, SCANP::Const_S, SCANP::dacbufferU, SCANP::dacbufferZ, DACoutU(), DACoutX(), DACoutY(), DACoutZ(), DSP_AFM_SLIDER_AMP, DSP_AFM_SLIDER_SPEED, DSP_AFM_SLIDER_STEPS, DSP_CD, DSP_CI, DSP_CMD_AFM_MOV_XM, DSP_CMD_AFM_MOV_XP, DSP_CMD_AFM_MOV_YM, DSP_CMD_AFM_MOV_YP, DSP_CMD_AFM_SLIDER_PARAM, DSP_CMD_ALL_PA, DSP_CMD_APPROCH, DSP_CMD_APPROCH_MOV_XP, DSP_CMD_APPROCH_PARAM, DSP_CMD_CLR_PA, DSP_CMD_GETINFO, DSP_CMD_HALT, DSP_CMD_LINESCAN, DSP_CMD_MOVETO_PARAM, DSP_CMD_MOVETO_X, DSP_CMD_MOVETO_Y, DSP_CMD_PROBESCAN, DSP_CMD_ROTPARAM, DSP_CMD_SET_LOG_WERTE, DSP_CMD_SET_WERTE, DSP_CMD_START, DSP_CMD_SWAPDPRAM, DSP_CP, DSP_CS, DSP_ITUNNEL, DSP_LSDNX, DSP_LSINTAVE, DSP_LSNAVE, DSP_LSNREGEL, DSP_LSNX, DSP_LSNXPRE, DSP_LSSRCS, DSP_LSSTEPSZ, DSP_MOVETOX, DSP_MOVETOY, DSP_MVNREGEL, DSP_MVSTEPSZ, DSP_PRBACAMP, DSP_PRBACFRQ, DSP_PRBACPHASE, DSP_PRBCIVAL, DSP_PRBDELAY, DSP_PRBGAPADJ, DSP_PRBNAVE, DSP_PRBNX, DSP_PRBOUTP, DSP_PRBSRCS, DSP_PRBXE, DSP_PRBXS, DSP_ROTOFFX, DSP_ROTOFFY, DSP_ROTXX, DSP_ROTXY, DSP_ROTYX, DSP_ROTYY, DSP_TIPDUZ, DSP_TIPDUZREV, DSP_TIPNSTEPS, DSP_TIPNWARTE, DSP_UTUNNEL, DSPack, GetParamF(), GetParamI(), SCANP::I_ist_alt, SPM::LastSPMMode, LCDclear(), LCDprintf(), SCANP::LS_AveCount, SCANP::LS_ChAkt, SCANP::LS_ChAnz, SCANP::LS_ChPID, SCANP::LS_dnx, SCANP::LS_IntAve, SCANP::LS_nAve, SCANP::LS_nRegel, SCANP::LS_nx2scan, SCANP::LS_nx_pre, SCANP::LS_SmpFlg, SCANP::LS_srcs, SCANP::LS_stepsize, SCANP::LS_xE, SCANP::LS_Xinc, SCANP::LS_Xindex, SCANP::LS_xnext, MAXSCANPOINTS, maxval, MD__AFMADJ, MD_CMD, MD_ITU, MD_MOVE, MD_MOVEOFF, MD_PID, MD_PROBE, MD_SCAN, MD_TIPDN, minval, SCANP::MV_nRegel, SCANP::MV_stepsize, SCANP::MV_Xnew, SCANP::MV_XPos, SCANP::MV_Ynew, SCANP::MV_YPos, SCANP::PRB_ACAmp, SCANP::PRB_ACFrq, SCANP::PRB_ACPhase, SCANP::PRB_AveCount, SCANP::PRB_ChAkt, SCANP::PRB_ChAnz, SCANP::PRB_ChSum, SCANP::PRB_CIval, SCANP::PRB_CPIS, SCANP::PRB_delay, SCANP::PRB_dnx, SCANP::PRB_GapAdj, SCANP::PRB_nAve, SCANP::PRB_nx, SCANP::PRB_oldU, SCANP::PRB_oldZ, SCANP::PRB_outp, SCANP::PRB_srcs, SCANP::PRB_xE, SCANP::PRB_Xindex, SCANP::PRB_XPos, SCANP::PRB_xS, REGEL_DT, SCANP::rotmxx, SCANP::rotmxy, SCANP::rotmyx, SCANP::rotmyy, SCANP::rotoffx, SCANP::rotoffy, run_testprbscan(), run_testscan(), SPM::scanp, SCANP::SetPoint, SL_OFF, SLIDERPORT, SLIDERTRIGGER_OFF, SCANP::Spg, spm, SPM::SPMMode, SCANP::TIP_DUz, SCANP::TIP_DUzRev, SCANP::TIP_Mode, SCANP::TIP_nSteps, SCANP::TIP_nWarte, SCANP::TIP_Zdn, TIP_ZPiezoMax, TITLE, U2INT, SCANP::U_tunnel, SCANP::U_z, ZSIGNUM, ZSLIDER_OFF, and ZSLIDER_ON.

void start_dsp struct dspsim_thread_data dsp  ) 
 

void stop_dsp struct dspsim_thread_data dsp  ) 
 

static void timeout unsigned long  ignore  )  [static]
 

Definition at line 284 of file dspemu.c.

References KDEBUG_L3, waitq, and wakeups.

int WriteBox unsigned long  data,
int  wait
 


Variable Documentation

struct dspsim_thread_data dspsim_td
 

Definition at line 124 of file dspemu.c.

int opened [static]
 

Definition at line 103 of file dspemu.c.

char* pcdsp_dprambaseptr [static]
 

Definition at line 106 of file dspemu.c.

struct file_operations pcdsp_fops
 

Initial value:

 {
  pcdsp_seek,   
  pcdsp_read,   
  pcdsp_write,  
  NULL,         
  NULL,         
  pcdsp_ioctl,  
  NULL,         
  pcdsp_open,   
  NULL,         
  pcdsp_release,
  NULL,         
  NULL,         
  NULL,         
  NULL,         
  NULL          
}

Definition at line 558 of file dspemu.c.

int pcdsp_major [static]
 

Definition at line 101 of file dspemu.c.

Referenced by InitEmu().

struct wait_queue* waitq = NULL [static]
 

Definition at line 110 of file dspemu.c.

int wakeups = -1 [static]
 

Definition at line 109 of file dspemu.c.


Generated on Sat Apr 1 09:04:45 2006 for GXSM by  doxygen 1.4.6