SmartSnippets DA1459x SDK
sdk
middleware
cli
include
cli.h
Go to the documentation of this file.
1
44
#ifndef CLI_H_
45
#define CLI_H_
46
47
#if dg_configUSE_CLI
48
49
#include <
osal.h
>
50
#include <stdint.h>
51
52
#ifdef __cplusplus
53
extern
"C"
{
54
#endif
55
59
#ifndef CLI_TASK_PRIORITY
60
#define CLI_TASK_PRIORITY (OS_TASK_PRIORITY_NORMAL)
61
#endif
62
66
typedef
void
*
cli_t
;
67
77
typedef
void (*
cli_handler_t
) (
int
argc,
const
char
*argv[],
void
*user_data);
78
82
typedef
struct
{
83
const
char
*
name
;
84
cli_handler_t
handler
;
85
void
*
user_data
;
86
}
cli_command_t
;
87
88
#if !dg_configUSE_CLI_STUBS
89
97
void
cli_init
(
void
);
98
123
cli_t
cli_register
(uint32_t notif_mask,
const
cli_command_t
cmd_handler[],
124
cli_handler_t
def_handler);
125
140
void
cli_handle_notified
(
cli_t
cli);
141
142
#else
/* !dg_configUSE_CLI_STUBS */
143
144
__STATIC_INLINE
void
cli_init
(
void
)
145
{
146
147
}
148
149
__STATIC_INLINE
cli_t
cli_register
(uint32_t notif_mask,
const
cli_command_t
cmd_handler[],
150
cli_handler_t
def_handler)
151
{
152
return
NULL;
153
}
154
155
__STATIC_INLINE
void
cli_handle_notified
(
cli_t
cli)
156
{
157
158
}
159
160
#endif
/* !dg_configUSE_CLI_STUBS */
161
162
#ifdef __cplusplus
163
}
164
#endif
165
166
#endif
/* dg_configUSE_CLI */
167
168
#endif
/* CLI_H_ */
169
cli_handle_notified
void cli_handle_notified(cli_t cli)
cli_register
cli_t cli_register(uint32_t notif_mask, const cli_command_t cmd_handler[], cli_handler_t def_handler)
cli_command_t::user_data
void * user_data
Definition:
cli.h:85
cli_init
void cli_init(void)
osal.h
OS abstraction layer API.
cli_command_t::name
const char * name
Definition:
cli.h:83
cli_command_t::handler
cli_handler_t handler
Definition:
cli.h:84
cli_command_t
Definition:
cli.h:82
cli_handler_t
void(* cli_handler_t)(int argc, const char *argv[], void *user_data)
Definition:
cli.h:77
cli_t
void * cli_t
Definition:
cli.h:66
Generated on Tue Oct 24 2023 10:38:23 for SmartSnippets DA1459x SDK by
1.8.16