dsp.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 /* dsp.h 
00028  * genneric iocontrol commands for DSP-Cards
00029  * e.g. PC31, PCI32
00030  */
00031 
00032 #define PCDSP_MAJOR       240
00033 #define PCDSP_DEVFS_DIR   "pcdsps"
00034 #define PCDSP_DEVICE_NAME "tms320"
00035 
00036 /* MODID's zur Moduletyp Identifizierung */
00037 #define PCDSP_MODID_SIM   0x1001
00038 #define PCDSP_MODID_PC31  0x1031
00039 #define PCDSP_MODID_PCI32 0x1032    
00040 
00041 /* DPRAM [in 32bit-Words, e.g. total 8kBytes] */
00042 #define PCDSP_DPRAM_WIDTH       0x0032 /* bits per cell */
00043 #define PCDSP_DPRAM_CELLSIZE    4
00044 #define PCDSP_DPRAM_ADRSHR      2
00045 #define PCDSP_DPRAM_WLEN        0x0800 /* in Words...  8kB */
00046 #define PCDSP_DPRAM_SIZE        0x2000 /* in Bytes...  8kB */
00047 
00048 #define BYTSIZE(X) ((X)<<PCDSP_DPRAM_ADRSHR)
00049 
00050 /*
00051  * IOCTL cmds
00052  */
00053 
00054 #define PCDSP_MBOX_FULL         0x0001
00055 #define PCDSP_MBOX_READ_WAIT    0x0002
00056 #define PCDSP_MBOX_READ_NOWAIT  0x0003
00057 #define PCDSP_MBOX_EMPTY        0x0004
00058 #define PCDSP_MBOX_WRITE_WAIT   0x0005
00059 #define PCDSP_MBOX_WRITE_NOWAIT 0x0006
00060 #define PCDSP_SET_MBOX_LOCATION 0x0007
00061 
00062 #define PCDSP_PUT_SPEED    0x0009
00063 
00064 #define PCDSP_PUTMEM32     0x0010
00065 #define PCDSP_PUTMEM32INC  0x0011
00066 #define PCDSP_GETTMEM32    0x0012
00067 #define PCDSP_GETMEM32INC  0x0013
00068 #define PCDSP_ADDRESS      0x0014
00069 
00070 #define PCDSP_RESET        0x0020
00071 #define PCDSP_RUN          0x0021
00072 #define PCDSP_HALT         0x0022
00073 
00074 #define PCDSP_SEM0START    0x0100
00075 #define PCDSP_SEM0LEN      0x0101
00076 #define PCDSP_SEM1START    0x0102
00077 #define PCDSP_SEM1LEN      0x0103
00078 #define PCDSP_SEM2START    0x0104
00079 #define PCDSP_SEM2LEN      0x0105
00080 #define PCDSP_SEM3START    0x0106
00081 #define PCDSP_SEM3LEN      0x0107
00082 
00083 /* nur PC31 */
00084 #define PCDSP_PC31SRQ      0x0500
00085 #define PCDSP_PC31SRQED    0x0501
00086 #define PCDSP_PC31ACKED    0x0502
00087 #define PCDSP_PC31ACK      0x0503
00088 #define PCDSP_PC31ADDR     0x0504
00089 #define PCDSP_PC31STORE    0x0505
00090 #define PCDSP_PC31FETCH    0x0506
00091 #define PCDSP_PC31DPENABLE 0x0507
00092 #define PCDSP_PC31CONTROL  0x0508
00093 
00094 /* identify module type */
00095 #define PCDSP_GETMODID     0x0900
00096 
00097 /*
00098  * Talker cmds
00099  */
00100 
00101 #define PCDSP_TALK_REVISION 0
00102 #define PCDSP_TALK_STOREMEM 1
00103 #define PCDSP_TALK_FETCHMEM 2
00104 #define PCDSP_TALK_LAUNCH   3
00105 #define PCDSP_TALK_SECTION  6
00106 #define PCDSP_TALK_XMOVE    7
00107 #define PCDSP_TALK_DSPSPEED 8
00108 
00109 /*
00110  * DPRAM Sem Bereiche
00111  */
00112 
00113 #define PCDSP_MBOX       0x07f0  /* Controlled by SEM0 */
00114 #define PCDSP_MBOX_SIZE  0x0004  /* MBOX Size */
00115 
00116 /* DATAN <=> SEM(N) */
00117 #define PCDSP_DATA1      0x0000  /* Controlled by SEM1 */
00118 #define PCDSP_DATA1_SIZE 0x0030  /* Data0 Size */
00119 
00120 #define PCDSP_DATA2      0x0030  /* Controlled by SEM2 */
00121 #define PCDSP_DATA2_SIZE 0x0500  /* Data1 Size */
00122 
00123 #define PCDSP_DATA3      0x0700  /* Controlled by SEM3 */
00124 #define PCDSP_DATA3_SIZE 0x00c0  /* Data1 Size */
00125 

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