]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-dad.git/blob - sw/app/lx_dad/appl_cmdproc.c
Prepare build-able skeleton for LX_DAD application.
[fpga/lx-cpu1/lx-dad.git] / sw / app / lx_dad / appl_cmdproc.c
1 #include <system_def.h>
2 #include <stdio.h>
3 #include <string.h>
4 #include <stdlib.h>
5 #include <cmd_proc.h>
6
7 #include "appl_defs.h"
8
9 extern cmd_des_t const *cmd_pxmc_base[];
10 extern cmd_des_t const *cmd_appl_tests[];
11 extern cmd_des_t const *cmd_pxmc_ptable[];
12
13 cmd_des_t const **cmd_list;
14
15 cmd_des_t const cmd_des_help={
16     0, 0,
17     "help","prints help for commands",
18     cmd_do_help,{(char*)&cmd_list}};
19
20
21 cmd_des_t const *cmd_list_main[]={
22   &cmd_des_help,
23   CMD_DES_INCLUDE_SUBLIST(cmd_appl_tests),
24  #ifdef CONFIG_PXMC
25   CMD_DES_INCLUDE_SUBLIST(cmd_pxmc_base),
26   CMD_DES_INCLUDE_SUBLIST(cmd_pxmc_ptable),
27  #endif
28   NULL
29 };
30
31 cmd_des_t const **cmd_list = cmd_list_main;
32
33 extern cmd_io_t cmd_io_uartcon;
34
35 int cmdproc_poll(void)
36 {
37   return cmd_processor_run(&cmd_io_uartcon, cmd_list_main);
38 }