mbox.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  * DSP TALKER DPRAM Definition - higher level communication via DPRAM
00029  */
00030 
00031 /*
00032  * Mailbox after Start of Monitor:
00033  * 1FC0: 1f 00 00 00 ff ff ff ff 00 00 00 00 00 00 00 00   ................
00034  */
00035 
00036 #define PCDSP_TALK_MAILBOX (4*PCDSP_MBOX)      /* DSP Talker's Mailbox Offset in DPRAM (1FC0) */
00037 
00038 static unsigned long mbox_location=PCDSP_TALK_MAILBOX;
00039 
00040 #define PCDSP_TALK_RCV     (mbox_location + 0) /* DSP Talker's XMT - transmit */
00041 #define PCDSP_TALK_ACK     (mbox_location + 4) /* DSP Talker's REQ - request */
00042 #define PCDSP_TALK_XMT     (mbox_location + 8) /* DSP Talker's RCV - receive */
00043 #define PCDSP_TALK_REQ     (mbox_location +12) /* DSP Talker's REQ - acknowledge */
00044 
00045 /*
00046  * Write to Box:
00047  * REQD_DSP ?  ->  XMT_DSP(value), REQ_DSP  ->  [ REQD_DSP ? ]
00048  */
00049 
00050 #define XMT_DSP(X)  writel((X), pcdsp_dprambaseptr+PCDSP_TALK_XMT)  /* transmit data from driver to DSP */
00051 #define REQD_DSP    readl(pcdsp_dprambaseptr+PCDSP_TALK_REQ)        /* Data receiced by DSP ?           */
00052 #define REQ_DSP     writel(-1, pcdsp_dprambaseptr+PCDSP_TALK_REQ)   /* request DSP to read data         */
00053 
00054 /*
00055  * Read from Box:
00056  * ACKD_DSP ?  ->  value = RCV_DSP, ACK_DSP  ->  [ ACKD_DSP ? ]
00057  */
00058 
00059 /*
00060  * DSP Talker Communication
00061  */
00062 #define RCV_DSP     readl(pcdsp_dprambaseptr+PCDSP_TALK_RCV)        /* recieve Data from DSP               */
00063 #define ACK_DSP     writel(  0, pcdsp_dprambaseptr+PCDSP_TALK_ACK)  /* acknowledged data recieved from DSP */
00064 #define ACKD_DSP    readl(pcdsp_dprambaseptr+PCDSP_TALK_ACK)        /* data acknowledged by DSP            */
00065 

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