microb 2010
[aversive.git] / projects / microb2010 / sensorboard / commands.c
1 /*
2  *  Copyright Droids Corporation (2009)
3  * 
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  *
18  *  Revision : $Id: commands.c,v 1.2 2009-05-27 20:04:07 zer0 Exp $
19  *
20  *  Olivier MATZ <zer0@droids-corp.org> 
21  */
22
23 #include <stdlib.h>
24 #include <aversive/pgmspace.h>
25 #include <parse.h>
26
27 /* commands_gen.c */
28 extern parse_pgm_inst_t cmd_reset;
29 extern parse_pgm_inst_t cmd_bootloader;
30 extern parse_pgm_inst_t cmd_encoders;
31 extern parse_pgm_inst_t cmd_pwm;
32 extern parse_pgm_inst_t cmd_adc;
33 extern parse_pgm_inst_t cmd_sensor;
34 extern parse_pgm_inst_t cmd_log;
35 extern parse_pgm_inst_t cmd_log_show;
36 extern parse_pgm_inst_t cmd_log_type;
37 extern parse_pgm_inst_t cmd_stack_space;
38 extern parse_pgm_inst_t cmd_scheduler;
39
40 /* commands_ax12.c */
41 extern parse_pgm_inst_t cmd_baudrate;
42 extern parse_pgm_inst_t cmd_uint16_read;
43 extern parse_pgm_inst_t cmd_uint16_write;
44 extern parse_pgm_inst_t cmd_uint8_read;
45 extern parse_pgm_inst_t cmd_uint8_write;
46
47 /* commands_cs.c */
48 extern parse_pgm_inst_t cmd_gain;
49 extern parse_pgm_inst_t cmd_gain_show;
50 extern parse_pgm_inst_t cmd_speed;
51 extern parse_pgm_inst_t cmd_speed_show;
52 extern parse_pgm_inst_t cmd_derivate_filter;
53 extern parse_pgm_inst_t cmd_derivate_filter_show;
54 extern parse_pgm_inst_t cmd_consign;
55 extern parse_pgm_inst_t cmd_maximum;
56 extern parse_pgm_inst_t cmd_maximum_show;
57 extern parse_pgm_inst_t cmd_quadramp;
58 extern parse_pgm_inst_t cmd_quadramp_show;
59 extern parse_pgm_inst_t cmd_cs_status;
60 extern parse_pgm_inst_t cmd_blocking_i;
61 extern parse_pgm_inst_t cmd_blocking_i_show;
62
63 /* commands_sensorboard.c */
64 extern parse_pgm_inst_t cmd_event;
65 extern parse_pgm_inst_t cmd_test;
66
67 /* commands_scan.c */
68 extern parse_pgm_inst_t cmd_sample;
69 extern parse_pgm_inst_t cmd_sadc;
70 extern parse_pgm_inst_t cmd_scan_params;
71 extern parse_pgm_inst_t cmd_scan_calibre;
72 extern parse_pgm_inst_t cmd_scan_do;
73 extern parse_pgm_inst_t cmd_scan_img;
74
75
76 /* in progmem */
77 parse_pgm_ctx_t main_ctx[] = {
78
79         /* commands_gen.c */
80         (parse_pgm_inst_t *)&cmd_reset,
81         (parse_pgm_inst_t *)&cmd_bootloader,
82         (parse_pgm_inst_t *)&cmd_encoders,
83         (parse_pgm_inst_t *)&cmd_pwm,
84         (parse_pgm_inst_t *)&cmd_adc,
85         (parse_pgm_inst_t *)&cmd_sensor,
86         (parse_pgm_inst_t *)&cmd_log,
87         (parse_pgm_inst_t *)&cmd_log_show,
88         (parse_pgm_inst_t *)&cmd_log_type,
89         (parse_pgm_inst_t *)&cmd_stack_space,
90         (parse_pgm_inst_t *)&cmd_scheduler,
91
92         /* commands_ax12.c */
93         (parse_pgm_inst_t *)&cmd_baudrate,
94         (parse_pgm_inst_t *)&cmd_uint16_read,
95         (parse_pgm_inst_t *)&cmd_uint16_write,
96         (parse_pgm_inst_t *)&cmd_uint8_read,
97         (parse_pgm_inst_t *)&cmd_uint8_write,
98
99         /* commands_cs.c */
100         (parse_pgm_inst_t *)&cmd_gain,
101         (parse_pgm_inst_t *)&cmd_gain_show,
102         (parse_pgm_inst_t *)&cmd_speed,
103         (parse_pgm_inst_t *)&cmd_speed_show,
104         (parse_pgm_inst_t *)&cmd_consign,
105         (parse_pgm_inst_t *)&cmd_derivate_filter,
106         (parse_pgm_inst_t *)&cmd_derivate_filter_show,
107         (parse_pgm_inst_t *)&cmd_maximum,
108         (parse_pgm_inst_t *)&cmd_maximum_show,
109         (parse_pgm_inst_t *)&cmd_quadramp,
110         (parse_pgm_inst_t *)&cmd_quadramp_show,
111         (parse_pgm_inst_t *)&cmd_cs_status,
112         (parse_pgm_inst_t *)&cmd_blocking_i,
113         (parse_pgm_inst_t *)&cmd_blocking_i_show,
114
115         /* commands_sensorboard.c */
116         (parse_pgm_inst_t *)&cmd_event,
117         (parse_pgm_inst_t *)&cmd_test,
118
119         /* commands_scan.c */
120         (parse_pgm_inst_t *)&cmd_sample,
121         (parse_pgm_inst_t *)&cmd_sadc,
122         (parse_pgm_inst_t *)&cmd_scan_params,
123         (parse_pgm_inst_t *)&cmd_scan_calibre,
124         (parse_pgm_inst_t *)&cmd_scan_do,
125         (parse_pgm_inst_t *)&cmd_scan_img,
126
127         NULL,
128 };