pcsim.h

Go to the documentation of this file.
00001 /* Gxsm - Gnome X Scanning Microscopy
00002  * universal STM/AFM/SARLS/SPALEED/... controlling and
00003  * data analysis software
00004  * 
00005  * Copyright (C) 1999,2000,2001 Percy Zahl
00006  *
00007  * Authors: Percy Zahl <zahl@users.sf.net>
00008  * additional features: Andreas Klust <klust@users.sf.net>
00009  * WWW Home: http://gxsm.sf.net
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00024  */
00025 
00026 /* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
00027 
00028 /* pcsim.h 
00029  * Driver
00030  */
00031 
00032 #define PCDSP_MAJOR       240
00033 #define PCDSP_DEVFS_DIR   "pcdsps"
00034 #define PCDSP_DEVICE_NAME "emu"
00035 
00036 /* MODID's zur Moduletyp Identifizierung */
00037 #define PCDSP_MODID_SIM   0x1001
00038 
00039 #define MODNAME "pcsim: "
00040 #define MODID   PCDSP_MODID_SIM
00041 
00042 /* DPRAM [in 32bit-Words, e.g. total 8kBytes] */
00043 #define PCDSP_DPRAM_WIDTH       0x0032 /* bits per cell */
00044 #define PCDSP_DPRAM_CELLSIZE    4
00045 #define PCDSP_DPRAM_ADRSHR      2
00046 #define PCDSP_DPRAM_WLEN        0x0800 /* in Words...  8kB */
00047 #define PCDSP_DPRAM_SIZE        0x2000 /* in Bytes...  8kB */
00048 
00049 #define BYTSIZE(X) ((X)<<PCDSP_DPRAM_ADRSHR)
00050 
00051 /*
00052  * IOCTL cmds
00053  */
00054 
00055 #define PCDSP_MBOX_FULL         0x0001
00056 #define PCDSP_MBOX_READ_WAIT    0x0002
00057 #define PCDSP_MBOX_READ_NOWAIT  0x0003
00058 #define PCDSP_MBOX_EMPTY        0x0004
00059 #define PCDSP_MBOX_WRITE_WAIT   0x0005
00060 #define PCDSP_MBOX_WRITE_NOWAIT 0x0006
00061 #define PCDSP_SET_MBOX_LOCATION 0x0007
00062 
00063 #define PCDSP_PUT_SPEED    0x0009
00064 
00065 #define PCDSP_PUTMEM32     0x0010
00066 #define PCDSP_PUTMEM32INC  0x0011
00067 #define PCDSP_GETTMEM32    0x0012
00068 #define PCDSP_GETMEM32INC  0x0013
00069 #define PCDSP_ADDRESS      0x0014
00070 
00071 #define PCDSP_RESET        0x0020
00072 #define PCDSP_RUN          0x0021
00073 #define PCDSP_HALT         0x0022
00074 
00075 #define PCDSP_SEM0START    0x0100
00076 #define PCDSP_SEM0LEN      0x0101
00077 #define PCDSP_SEM1START    0x0102
00078 #define PCDSP_SEM1LEN      0x0103
00079 #define PCDSP_SEM2START    0x0104
00080 #define PCDSP_SEM2LEN      0x0105
00081 #define PCDSP_SEM3START    0x0106
00082 #define PCDSP_SEM3LEN      0x0107
00083 
00084 /* identify module type */
00085 #define PCDSP_GETMODID     0x0900
00086 
00087 /*
00088  * DPRAM Sem Bereiche
00089  */
00090 
00091 #define PCDSP_MBOX       0x07f0  /* Controlled by SEM0 */
00092 #define PCDSP_MBOX_SIZE  0x0004  /* MBOX Size */
00093 
00094 /* DATAN <=> SEM(N) */
00095 #define PCDSP_DATA1      0x0000  /* Controlled by SEM1 */
00096 #define PCDSP_DATA1_SIZE 0x0030  /* Data0 Size */
00097 
00098 #define PCDSP_DATA2      0x0030  /* Controlled by SEM2 */
00099 #define PCDSP_DATA2_SIZE 0x0500  /* Data1 Size */
00100 
00101 #define PCDSP_DATA3      0x0700  /* Controlled by SEM3 */
00102 #define PCDSP_DATA3_SIZE 0x00c0  /* Data1 Size */
00103 

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