Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

/projects/cubeos/src_current/net/rdio.h

Go to the documentation of this file.
00001 /*  src_experimental/net/rdio.h
00002     CubeOS Version 0.4.90 experimental
00003     Copyright (C) 1999,2000 Holger Kenn
00004 
00005     CubeOS is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or any later version.
00009 
00010     CubeOS is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015 */  
00016 /* This is the low-level interface to the radio hardware. An application
00017 program is not supposed to see this. */
00018 
00019 #ifndef _RDIO_H
00020 #define _RDIO_H
00021 
00026 #include <cubeos.h>
00027 #include <mc68681.h>
00028 
00029 
00030 extern struct iobuf rdioin, rdioout;
00031 
00032 char TTY_rdioget(void);
00033 int TTY_rdioput(char byte);
00034 void RSM_rdio_enable_rx();
00035 void RSM_rdio_disable_rx();
00036 
00041 static inline void setRTXSEL() 
00042 {
00043 #ifdef DUART_BASE
00044 if (DUART_BASE) {
00045 #ifdef CUBE1
00046         writebyte(DUART_OPRSET,0x2); /*TXSEL = OP1 */
00047 #else
00048         writebyte(DUART_OPRSET,0x4); /*TXSEL = OP2 */
00049 #endif
00050         }
00051 #endif
00052 }
00053 
00058 static inline void setRRXSEL()
00059 {
00060 #ifdef DUART_BASE
00061 if (DUART_BASE) {
00062         writebyte(DUART_OPRSET,0x1); /*RXSEL = OP0 */
00063         }
00064 #endif
00065 }
00066 
00071 static inline void clearRTXSEL()
00072 {
00073 #ifdef DUART_BASE
00074 if (DUART_BASE) {
00075 #ifdef CUBE1
00076         writebyte(DUART_OPRRST,0x2);
00077 #else
00078         writebyte(DUART_OPRRST,0x4); /*TXSEL = OP2 */
00079 #endif
00080         }
00081 #endif
00082 }
00083 
00088 static inline void clearRRXSEL()
00089 { 
00090 #ifdef DUART_BASE
00091 if (DUART_BASE) {
00092         writebyte(DUART_OPRRST,0x1); 
00093         }
00094 #endif
00095 }
00096 
00101 static inline char getRCD()
00102 {
00103 #ifdef DUART_BASE
00104 if (DUART_BASE) {
00105 return  readshortpos(DUART_IP,0x1,0x0); /* IP0 = CD */
00106         } else {return 0;}
00107 #else
00108 return 0;
00109 #endif
00110 
00111 }
00112 
00113 #endif
00114 

Generated on Thu Feb 20 15:38:45 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002