00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
00040
00042
00043 unsigned char vis_refresh_counter = 0;
00044 unsigned char vis_refresh_period = 50;
00045
00047
00048
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) {
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