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 at 00010 * 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 the 00014 * License for the specific language governing rights and limitations 00015 * 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 #include <sys/vis.h> 00027 00028 #ifdef CONF_VIS 00029 00030 #include <conio.h> 00031 #include <sys/irq.h> 00032 #include <dsensor.h> 00033 #include <dmotor.h> 00034 #include <sys/program.h> 00035 #include <sys/tm.h> 00036 00038 // 00039 // Variables 00040 // 00042 00043 unsigned char vis_refresh_counter = 0; 00044 unsigned char vis_refresh_period = 50; 00045 00047 // 00048 // Functions 00049 // 00051 00052 #ifdef CONF_RCX_COMPILER 00053 void vis_handler(void) { 00054 #else 00055 HANDLER_WRAPPER("vis_handler","vis_core"); 00056 void vis_core(void) { 00057 #endif 00058 #ifdef CONF_DSENSOR 00059 bit_iload(AD_C_H,0x7); 00060 dlcd_store(LCD_S1_ACTIVE); 00061 00062 bit_iload(AD_B_H,0x7); 00063 dlcd_store(LCD_S2_ACTIVE); 00064 00065 bit_iload(AD_A_H,0x7); 00066 dlcd_store(LCD_S3_ACTIVE); 00067 #endif 00068 00069 #ifdef CONF_PROGRAM 00070 if(nb_tasks <= nb_system_tasks) { // show only while program not running. 00071 if(program_valid(cprog)) 00072 cputc_hex_0(cprog+1); 00073 else 00074 cputc_0('-'); 00075 } 00076 #endif 00077 } 00078 00079 #endif // CONF_VIS
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |