00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
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