vis.c
Go to the documentation of this file.
1 
6 /*
7  * The contents of this file are subject to the Mozilla Public License
8  * Version 1.0 (the "License"); you may not use this file except in
9  * compliance with the License. You may obtain a copy of the License at
10  * http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS IS"
13  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
14  * License for the specific language governing rights and limitations
15  * under the License.
16  *
17  * The Original Code is legOS code, released October 17, 1999.
18  *
19  * The Initial Developer of the Original Code is Markus L. Noga.
20  * Portions created by Markus L. Noga are Copyright (C) 1999
21  * Markus L. Noga. All Rights Reserved.
22  *
23  * Contributor(s): Markus L. Noga <markus@noga.de>
24  */
25 
26 #include <sys/vis.h>
27 
28 #ifdef CONF_VIS
29 
30 #include <conio.h>
31 #include <sys/irq.h>
32 #include <dsensor.h>
33 #include <dmotor.h>
34 #include <sys/program.h>
35 #include <sys/tm.h>
36 
38 //
39 // Variables
40 //
42 
43 unsigned char vis_refresh_counter = 0;
44 unsigned char vis_refresh_period = 50;
45 
47 //
48 // Functions
49 //
51 
52 #ifdef CONF_RCX_COMPILER
53 void vis_handler(void) {
54 #else
55 HANDLER_WRAPPER("vis_handler","vis_core");
56 void vis_core(void) {
57 #endif
58 #ifdef CONF_DSENSOR
59  bit_iload(AD_C_H,0x7);
61 
62  bit_iload(AD_B_H,0x7);
64 
65  bit_iload(AD_A_H,0x7);
67 #endif
68 
69 #ifdef CONF_PROGRAM
70  if(nb_tasks <= nb_system_tasks) { // show only while program not running.
71  if(program_valid(cprog))
72  cputc_hex_0(cprog+1);
73  else
74  cputc_0('-');
75  }
76 #endif
77 }
78 
79 #endif // CONF_VIS

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

Generated on Sat Mar 15 2014 11:28:21 for brickOS Kernel Developer by doxygen 1.8.1.2