2 * Copyright Droids Corporation (2009)
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.
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.
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
18 * Revision : $Id: commands.c,v 1.2 2009-05-27 20:04:07 zer0 Exp $
20 * Olivier MATZ <zer0@droids-corp.org>
24 #include <aversive/pgmspace.h>
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;
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;
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;
63 /* commands_ballboard.c */
64 extern parse_pgm_inst_t cmd_event;
65 extern parse_pgm_inst_t cmd_color;
66 extern parse_pgm_inst_t cmd_state1;
67 extern parse_pgm_inst_t cmd_state2;
68 extern parse_pgm_inst_t cmd_state3;
69 extern parse_pgm_inst_t cmd_state_debug;
70 extern parse_pgm_inst_t cmd_state_machine;
71 extern parse_pgm_inst_t cmd_fork;
72 extern parse_pgm_inst_t cmd_roller;
73 extern parse_pgm_inst_t cmd_test;
76 parse_pgm_ctx_t main_ctx[] = {
79 (parse_pgm_inst_t *)&cmd_reset,
80 (parse_pgm_inst_t *)&cmd_bootloader,
81 (parse_pgm_inst_t *)&cmd_encoders,
82 (parse_pgm_inst_t *)&cmd_pwm,
83 (parse_pgm_inst_t *)&cmd_adc,
84 (parse_pgm_inst_t *)&cmd_sensor,
85 (parse_pgm_inst_t *)&cmd_log,
86 (parse_pgm_inst_t *)&cmd_log_show,
87 (parse_pgm_inst_t *)&cmd_log_type,
88 (parse_pgm_inst_t *)&cmd_stack_space,
89 (parse_pgm_inst_t *)&cmd_scheduler,
92 (parse_pgm_inst_t *)&cmd_baudrate,
93 (parse_pgm_inst_t *)&cmd_uint16_read,
94 (parse_pgm_inst_t *)&cmd_uint16_write,
95 (parse_pgm_inst_t *)&cmd_uint8_read,
96 (parse_pgm_inst_t *)&cmd_uint8_write,
99 (parse_pgm_inst_t *)&cmd_gain,
100 (parse_pgm_inst_t *)&cmd_gain_show,
101 (parse_pgm_inst_t *)&cmd_speed,
102 (parse_pgm_inst_t *)&cmd_speed_show,
103 (parse_pgm_inst_t *)&cmd_consign,
104 (parse_pgm_inst_t *)&cmd_derivate_filter,
105 (parse_pgm_inst_t *)&cmd_derivate_filter_show,
106 (parse_pgm_inst_t *)&cmd_maximum,
107 (parse_pgm_inst_t *)&cmd_maximum_show,
108 (parse_pgm_inst_t *)&cmd_quadramp,
109 (parse_pgm_inst_t *)&cmd_quadramp_show,
110 (parse_pgm_inst_t *)&cmd_cs_status,
111 (parse_pgm_inst_t *)&cmd_blocking_i,
112 (parse_pgm_inst_t *)&cmd_blocking_i_show,
114 /* commands_ballboard.c */
115 (parse_pgm_inst_t *)&cmd_event,
116 (parse_pgm_inst_t *)&cmd_color,
117 (parse_pgm_inst_t *)&cmd_state1,
118 (parse_pgm_inst_t *)&cmd_state2,
119 (parse_pgm_inst_t *)&cmd_state3,
120 (parse_pgm_inst_t *)&cmd_state_debug,
121 (parse_pgm_inst_t *)&cmd_state_machine,
122 (parse_pgm_inst_t *)&cmd_fork,
123 (parse_pgm_inst_t *)&cmd_roller,
124 (parse_pgm_inst_t *)&cmd_test,