diff --git a/source/firmware/kernel/interface/shell.h b/source/firmware/kernel/interface/shell.h new file mode 100644 index 0000000..ef5cf24 --- /dev/null +++ b/source/firmware/kernel/interface/shell.h @@ -0,0 +1,14 @@ +/* + * shell.h + * + * Created on: Aug 1, 2016 + * Author: tkl + */ + +#ifndef SOURCE_FIRMWARE_KERNEL_INTERFACE_SHELL_H_ +#define SOURCE_FIRMWARE_KERNEL_INTERFACE_SHELL_H_ + +int shell_init(const struct driver *shell_device); +int shell_add_command(const char *command, const void *callback, const void *param); + +#endif /* SOURCE_FIRMWARE_KERNEL_INTERFACE_SHELL_H_ */ diff --git a/source/firmware/kernel/shell.c b/source/firmware/kernel/shell.c new file mode 100644 index 0000000..020adb2 --- /dev/null +++ b/source/firmware/kernel/shell.c @@ -0,0 +1,34 @@ +/* + * shell.c + * + * Created on: Aug 1, 2016 + * Author: tkl + */ + +#include +#include + +#include "stack.h" +#include "queue.h" +#include "driver.h" +#include "kernel.h" + +#define RX_STACK_SIZE 256 +stack_t rx_stack[RX_STACK_SIZE]; +struct thread_context rx_thread; + +void rx_func(void *arg) +{ +} + + +int shell_init(const struct driver *shell_device) +{ + thread_create(&rx_thread, rx_stack, RX_STACK_SIZE, rx_func, NULL, THREAD_PRIO_LOW); + return -1; +} + +int shell_add_command(const char *command, const void *callback, const void *param) +{ + return -1; +}