Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

include/lnp/sys/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 __sys_lnp_logical_h__
00027 #define __sys_lnp_logical_h__
00028 
00029 #ifdef  __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 #include "../lnp-logical.h"
00034 
00035 #ifdef CONF_LNP
00036 
00037 #ifndef CONF_HOST
00038 #include <time.h>
00039 #else
00040 #define MSECS_TO_TICKS(a)   (a)
00041 #endif
00042 
00044 //
00045 // Definitions
00046 //
00048 
00049 #ifdef  CONF_LNP_FAST
00050 #define LNP_LOGICAL_BAUD_RATE   B4800             
00051 #define LNP_LOGICAL_PARITY  SMR_P_NONE        
00052 #define LNP_BYTE_TIME           MSECS_TO_TICKS(3) 
00053 #else
00054 #define LNP_LOGICAL_BAUD_RATE   B2400             
00055 #define LNP_LOGICAL_PARITY  SMR_P_ODD         
00056 #define LNP_BYTE_TIME           MSECS_TO_TICKS(5) 
00057 #endif
00058 
00059 #define LNP_BYTE_TIMEOUT        (3*LNP_BYTE_TIME/2) 
00060 #define LNP_BYTE_SAFE       (4*LNP_BYTE_TIME) 
00061 
00062 #define LNP_WAIT_TXOK       (2*LNP_BYTE_TIMEOUT) 
00063 #define LNP_WAIT_COLL           (4*LNP_BYTE_TIMEOUT) 
00064 
00065 
00066 #define TX_COLL   (-1)    
00067 #define TX_IDLE   ( 0)    
00068 #define TX_ACTIVE ( 1)    
00069 
00070 
00072 //
00073 // Variables
00074 //
00076 
00077 extern volatile signed char tx_state;   
00078 
00079 
00081 //
00082 // Functions
00083 //
00085 
00087 //
00088 extern void lnp_logical_init(void);
00089 
00090 
00092 //
00093 extern void lnp_logical_shutdown(void);
00094 
00096 //
00097 void txend_handler(void)
00098 #ifdef RCX_COMPILER
00099  __attribute__ ((rcx_interrupt))
00100 #endif
00101 ;
00102 
00103 #endif  // CONF_LNP
00104 
00105 #ifdef  __cplusplus
00106 }
00107 #endif
00108 
00109 #endif  // __sys_lnp_logical_h__
00110 

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

Generated on Mon Feb 16 21:02:10 2004 for brickOS Kernel Developer by doxygen 1.3.5