SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Functions | Variables
commands.c File Reference
#include <string.h>
#include <sstdlib.h>
#include <log.h>
#include "cli.h"
#include "cli_config.h"
#include "cli_history.h"
#include "cli_termesc.h"
Include dependency graph for commands.c:

Functions

static int cmd_echo (int argc, const char **argv)
 
static int cmd_ls (int argc, const char **argv)
 
static int cmd_hexdump (int argc, const char **argv)
 
static int cmd_read32 (int argc, const char **argv)
 
static int cmd_write32 (int argc, const char **argv)
 
static int cmd_history (int argc, const char **argv)
 
static int cmd_help (int argc, const char **argv)
 
static const msh_command_entryfind_command_entry (const msh_command_entry *cmdlist, const char *name)
 
int msh_do_command (const msh_command_entry *cmdlist, int argc, const char **argv)
 
void msh_print_cmdlist (const msh_command_entry *cmdlist)
 
const char * msh_get_command_usage (const msh_command_entry *cmdlist, const char *cmdname)
 

Variables

const msh_command_entry msh_builtin_commands []
 

Function Documentation

◆ cmd_echo()

static int cmd_echo ( int  argc,
const char **  argv 
)
static

◆ cmd_help()

static int cmd_help ( int  argc,
const char **  argv 
)
static

◆ cmd_hexdump()

static int cmd_hexdump ( int  argc,
const char **  argv 
)
static

◆ cmd_history()

static int cmd_history ( int  argc,
const char **  argv 
)
static

◆ cmd_ls()

static int cmd_ls ( int  argc,
const char **  argv 
)
static

◆ cmd_read32()

static int cmd_read32 ( int  argc,
const char **  argv 
)
static

◆ cmd_write32()

static int cmd_write32 ( int  argc,
const char **  argv 
)
static

◆ find_command_entry()

static const msh_command_entry * find_command_entry ( const msh_command_entry cmdlist,
const char *  name 
)
static

◆ msh_do_command()

int msh_do_command ( const msh_command_entry cmdlist,
int  argc,
const char **  argv 
)

◆ msh_get_command_usage()

const char * msh_get_command_usage ( const msh_command_entry cmdlist,
const char *  cmdname 
)

◆ msh_print_cmdlist()

void msh_print_cmdlist ( const msh_command_entry cmdlist)

Variable Documentation

◆ msh_builtin_commands

const msh_command_entry msh_builtin_commands[]
Initial value:
= {
{"help", cmd_help, "display help for available commands",
"Usage: help [command]\n"
" Displays help for 'command', or all commands and their\n"
" short descriptions.\n"},
{"echo", cmd_echo, "echo all arguments separated by a whitespace it can show args", "Usage: echo [string ...]\n"},
{"history", cmd_history, "show all history command", "Usage: history\n"},
{"hexdump", cmd_hexdump, "dumps memory region in hex", "Usage: hexdump [address] [length]\n"},
{"read32", cmd_read32, "read 32-bits value from device reg", "Usage: read32 [address]\n"},
{"write32", cmd_write32, "write 32-bits value to device reg", "Usage: write32 [address] [data]\n"},
{"ls", cmd_ls, "linux nerd compatible", "Usage: ls\n"},
}
#define msh_command_end
Definition cli.h:21
static int cmd_history(int argc, const char **argv)
Definition commands.c:70
static int cmd_help(int argc, const char **argv)
Definition commands.c:78
static int cmd_read32(int argc, const char **argv)
Definition commands.c:44
static int cmd_echo(int argc, const char **argv)
Definition commands.c:12
static int cmd_write32(int argc, const char **argv)
Definition commands.c:58
static int cmd_ls(int argc, const char **argv)
Definition commands.c:25
static int cmd_hexdump(int argc, const char **argv)
Definition commands.c:30