Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

include/lnp/lnp-logical.h

Go to the documentation of this file.
00001 
00006 /*
00007  *  The contents of this file are subject to the Mozilla Public License
00008  *  Version 1.0 (the "License"); you may not use this file except in
00009  *  compliance with the License. You may obtain a copy of the License
00010  *  at http://www.mozilla.org/MPL/
00011  *
00012  *  Software distributed under the License is distributed on an "AS IS"
00013  *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00014  *  the License for the specific language governing rights and
00015  *  limitations under the License.
00016  *
00017  *  The Original Code is legOS code, released October 17, 1999.
00018  *
00019  *  The Initial Developer of the Original Code is Markus L. Noga.
00020  *  Portions created by Markus L. Noga are Copyright (C) 1999
00021  *  Markus L. Noga. All Rights Reserved.
00022  *
00023  *  Contributor(s): Markus L. Noga <markus@noga.de>
00024  */
00025 
00026 #ifndef __lnp_logical_h__
00027 #define __lnp_logical_h__
00028 
00029 #ifdef  __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 #include <config.h>
00034 
00035 #ifdef CONF_LNP
00036 
00037 #ifdef CONF_HOST
00038 #include <stddef.h>
00039 #else
00040 #include <mem.h>
00041 #include <sys/h8.h>
00042 #endif
00043 
00045 //
00046 // Functions
00047 //
00049 
00050 #ifndef CONF_HOST
00051 
00052 
00062 extern inline void lnp_logical_range(int far) {
00063   if(far)
00064     *((char*)&PORT4) &=~1;
00065   else
00066     *((char*)&PORT4) |=1;
00067 }
00068 
00070 
00073 extern inline int lnp_logical_range_is_far(void) {
00074   return !(*((char*)&PORT4)&1);
00075 }
00076 #endif
00077 
00079 
00087 extern int lnp_logical_write(const void *buf,size_t len);
00088 
00090 
00092 extern void lnp_logical_fflush(void);
00093 
00094 #endif  // CONF_LNP
00095 
00096 #ifdef  __cplusplus
00097 }
00098 #endif
00099 
00100 #endif  // __lnp_logical_h__
00101 

brickOS is released under the Mozilla Public License.
Original code copyright 1998-2002 by the authors.

Generated on Mon Feb 16 21:01:52 2004 for brickOS C by doxygen 1.3.5