Tizen RT Libs&Environment  v1.1 D4
tash.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright 2016 Samsung Electronics All Rights Reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing,
12  * software distributed under the License is distributed on an
13  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
14  * either express or implied. See the License for the specific
15  * language governing permissions and limitations under the License.
16  *
17  ****************************************************************************/
19 
24 
27 #ifndef __APPS_INCLUDE_SHELL_TASH_H
28 #define __APPS_INCLUDE_SHELL_TASH_H
29 
30 #include <tinyara/config.h>
31 
38 #define TASH_EXECMD_SYNC (0)
39 #define TASH_EXECMD_ASYNC (1)
40 
45 typedef int (*TASH_CMD_CALLBACK)(int argc, char **args);
46 
52 struct tash_cmdlist_s {
53  const char *str;
54  const TASH_CMD_CALLBACK cb;
55  const int thread_exec;
56 };
57 typedef struct tash_cmdlist_s tash_cmdlist_t;
58 
63 struct tash_taskinfo_s {
64  const char *str;
65  const int task_prio;
66  const int task_stacksize;
67 };
68 typedef struct tash_taskinfo_s tash_taskinfo_t;
69 
80 int tash_cmd_install(const char *str, TASH_CMD_CALLBACK cb, int thread_exec);
81 
89 void tash_cmdlist_install(const tash_cmdlist_t list[]);
90 
99 int tash_start(void);
100 
101 #if defined(CONFIG_TASH_COMMAND_INTERFACE)
102 
108 int tash_get_cmdscount(void);
109 
125 int tash_get_cmdpair(char *str, TASH_CMD_CALLBACK *cb, int index);
126 #endif /*CONFIG_TASH_COMMAND_INTERFACE */
127 
128 #endif /*__APPS_INCLUDE_SHELL_TASH_H*/
129