aboutsummaryrefslogtreecommitdiff
path: root/kernel/test/kshell/command.h
blob: 96a5cb069ac8d628c29090c475b44835c32b5556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "priv.h"

#include "test/kshell/kshell.h"

typedef struct kshell_command
{
    char kc_name[KSH_CMD_NAME_LEN + 1];
    kshell_cmd_func_t kc_cmd_func;
    char kc_desc[KSH_DESC_LEN + 1];

    list_link_t kc_commands_link;
} kshell_command_t;

kshell_command_t *kshell_command_create(const char *name,
                                        kshell_cmd_func_t cmd_func,
                                        const char *desc);

void kshell_command_destroy(kshell_command_t *cmd);