00001 00011 /* 00012 * The contents of this file are subject to the Mozilla Public License 00013 * Version 1.0 (the "License"); you may not use this file except in 00014 * compliance with the License. You may obtain a copy of the License 00015 * at http://www.mozilla.org/MPL/ 00016 * 00017 * Software distributed under the License is distributed on an "AS IS" 00018 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00019 * the License for the specific language governing rights and 00020 * limitations under the License. 00021 * 00022 * The Original Code is legOS code, released October 17, 1999. 00023 * 00024 * The Initial Developer of the Original Code is Markus L. Noga. 00025 * Portions created by Markus L. Noga are Copyright (C) 1999 00026 * Markus L. Noga. All Rights Reserved. 00027 * 00028 * Contributor(s): Markus L. Noga <markus@noga.de> 00029 */ 00030 00031 #ifndef __dlcd_h__ 00032 #define __dlcd_h__ 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 #include <sys/bitops.h> 00039 00041 // 00042 // Definitions 00043 // 00045 00046 // LCD segment control byte and bit locations 00047 // 0xNNNN,0xM => Mth bit (value 1<<M) of byte 0xNNNN 00048 // overall memory range: 0xef43-0xef4b (9 bytes) 00049 // 00050 00051 // the man 00052 // 00053 #define LCD_ARMS 0xef43,0x0 00054 #define LCD_BODY 0xef43,0x1 00055 #define LCD_1LEG 0xef43,0x2 00056 #define LCD_2LEGS 0xef43,0x3 00057 00058 // the digits 00059 // numbered right to left 00060 // dots are associated with the digit to their left 00061 // only digit 2,3,4 have dots 00062 // digit 5 can only be used as a minus sign 00063 // 00064 #define LCD_0_TOP 0xef44,0x4 00065 #define LCD_0_MID 0xef44,0x5 00066 #define LCD_0_BOT 0xef44,0x7 00067 #define LCD_0_TOPR 0xef45,0x5 00068 #define LCD_0_BOTR 0xef45,0x7 00069 #define LCD_0_TOPL 0xef47,0x5 00070 #define LCD_0_BOTL 0xef47,0x7 00071 00072 #define LCD_1_TOP 0xef43,0x4 00073 #define LCD_1_MID 0xef43,0x5 00074 #define LCD_1_BOT 0xef43,0x7 00075 #define LCD_1_TOPR 0xef47,0x1 00076 #define LCD_1_BOTR 0xef47,0x3 00077 #define LCD_1_TOPL 0xef48,0x5 00078 #define LCD_1_BOTL 0xef48,0x7 00079 00080 #define LCD_2_TOP 0xef44,0x0 00081 #define LCD_2_MID 0xef44,0x1 00082 #define LCD_2_BOT 0xef44,0x3 00083 #define LCD_2_TOPR 0xef48,0x1 00084 #define LCD_2_BOTR 0xef48,0x3 00085 #define LCD_2_TOPL 0xef49,0x5 00086 #define LCD_2_BOTL 0xef49,0x7 00087 #define LCD_2_DOT 0xef48,0x6 00088 00089 #define LCD_3_TOP 0xef46,0x0 00090 #define LCD_3_MID 0xef46,0x1 00091 #define LCD_3_BOT 0xef46,0x3 00092 #define LCD_3_TOPR 0xef4b,0x1 00093 #define LCD_3_BOTR 0xef4b,0x3 00094 #define LCD_3_TOPL 0xef4b,0x5 00095 #define LCD_3_BOTL 0xef4b,0x7 00096 #define LCD_3_DOT 0xef49,0x6 00097 00098 #define LCD_4_TOP 0xef46,0x4 00099 #define LCD_4_MID 0xef46,0x5 00100 #define LCD_4_BOT 0xef46,0x7 00101 #define LCD_4_TOPR 0xef4a,0x1 00102 #define LCD_4_BOTR 0xef4a,0x3 00103 #define LCD_4_TOPL 0xef4a,0x5 00104 #define LCD_4_BOTL 0xef4a,0x7 00105 #define LCD_4_DOT 0xef4b,0x6 00106 00107 #define LCD_5_MID 0xef4a,0x6 00108 00109 // the motor displays 00110 // 00111 #define LCD_A_SELECT 0xef4a,0x2 00112 #define LCD_A_LEFT 0xef46,0x6 00113 #define LCD_A_RIGHT 0xef46,0x2 00114 00115 #define LCD_B_SELECT 0xef43,0x6 00116 #define LCD_B_LEFT 0xef44,0x2 00117 #define LCD_B_RIGHT 0xef47,0x2 00118 00119 #define LCD_C_SELECT 0xef44,0x6 00120 #define LCD_C_LEFT 0xef47,0x6 00121 #define LCD_C_RIGHT 0xef45,0x6 00122 00123 // the sensor displays 00124 // 00125 #define LCD_S1_SELECT 0xef49,0x0 00126 #define LCD_S1_ACTIVE 0xef49,0x1 00127 00128 #define LCD_S2_SELECT 0xef48,0x4 00129 #define LCD_S2_ACTIVE 0xef48,0x0 00130 00131 #define LCD_S3_SELECT 0xef47,0x4 00132 #define LCD_S3_ACTIVE 0xef45,0x4 00133 00134 // the quartered circle 00135 // quarter nubering is counterclockwise 00136 // starts at top right 00137 // 00138 #define LCD_CIRCLE_0 0xef45,0x0 00139 #define LCD_CIRCLE_1 0xef45,0x1 00140 #define LCD_CIRCLE_2 0xef45,0x3 00141 #define LCD_CIRCLE_3 0xef45,0x2 00142 00143 // the dotted line 00144 // dots numbered right to left 00145 // 00146 #define LCD_DOT_0 0xef49,0x4 00147 #define LCD_DOT_1 0xef4b,0x0 00148 #define LCD_DOT_2 0xef4b,0x4 00149 #define LCD_DOT_3 0xef4a,0x0 00150 #define LCD_DOT_4 0xef4a,0x4 00151 00152 // the IR display 00153 // 00154 #define LCD_IR_LOWER 0xef49,0x2 00155 #define LCD_IR_UPPER 0xef49,0x3 00156 00157 // the crossed out battery 00158 // 00159 #define LCD_BATTERY_X 0xef47,0x0 00160 00161 // two empty bits 00162 // 00163 #define LCD_EMPTY_1 0xef48,0x2 00164 #define LCD_EMPTY_2 0xef4b,0x2 00165 00167 // 00168 // Functions 00169 // 00171 00173 00175 #define dlcd_show(a) bit_set(BYTE_OF(a),BIT_OF(a)) 00176 00178 00180 #define dlcd_hide(a) bit_clear(BYTE_OF(a),BIT_OF(a)) 00181 00183 00187 #define dlcd_store(a) bit_store(BYTE_OF(a),BIT_OF(a)) 00188 00190 // 00191 #define BYTE_OF(a,b) a 00192 #define BIT_OF(a,b) b 00193 00194 #ifdef __cplusplus 00195 } 00196 #endif 00197 00198 #endif // __dlcd_h__
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |