From b8658657c480f84a7a2c8b0dbc70c116ab406cfb Mon Sep 17 00:00:00 2001 From: tkl Date: Sun, 21 Aug 2016 13:20:14 +0200 Subject: [PATCH] add missing includes --- source/os/release/include/list.h | 25 +++++++++++++++++++++++++ source/os/release/include/shell.h | 23 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 source/os/release/include/list.h create mode 100644 source/os/release/include/shell.h diff --git a/source/os/release/include/list.h b/source/os/release/include/list.h new file mode 100644 index 0000000..f26b4fe --- /dev/null +++ b/source/os/release/include/list.h @@ -0,0 +1,25 @@ +/* + * list.h + * + * Created on: Jul 27, 2016 + * Author: tkl + */ + +#ifndef SOURCE_FIRMWARE_KERNEL_LIST_H_ +#define SOURCE_FIRMWARE_KERNEL_LIST_H_ + +struct list_node { + struct list_node *next; + unsigned int data; +}; + +struct list { + struct list_node *front; + struct list_node *rear; +}; + +int list_init(struct list *head); +int list_add(struct list *head, struct list_node *node); +int list_get_len(struct list *head); + +#endif /* SOURCE_FIRMWARE_KERNEL_LIST_H_ */ diff --git a/source/os/release/include/shell.h b/source/os/release/include/shell.h new file mode 100644 index 0000000..c242e8d --- /dev/null +++ b/source/os/release/include/shell.h @@ -0,0 +1,23 @@ +/* + * shell.h + * + * Created on: Aug 1, 2016 + * Author: tkl + */ + +#ifndef SOURCE_FIRMWARE_KERNEL_INTERFACE_SHELL_H_ +#define SOURCE_FIRMWARE_KERNEL_INTERFACE_SHELL_H_ + +typedef void *(*command_callback)(const char*); + +struct command { + const char *command; + const char *description; + const command_callback command_callback; + struct list_node item; +}; + +int shell_init(const struct driver *shell_device); +int shell_add_command(struct command *command); + +#endif /* SOURCE_FIRMWARE_KERNEL_INTERFACE_SHELL_H_ */