12#ifndef ZEPHYR_INCLUDE_SHELL_SHELL_HISTORY_H_
13#define ZEPHYR_INCLUDE_SHELL_SHELL_HISTORY_H_
39#define Z_SHELL_HISTORY_DEFINE(_name, _size) \
40 K_HEAP_DEFINE(_name##_heap, _size); \
41 static struct shell_history _name = { \
42 .heap = &_name##_heap, \
43 .list = SYS_DLIST_STATIC_INIT(&_name.list), \
54void z_shell_history_purge(
struct shell_history *history);
61void z_shell_history_mode_exit(
struct shell_history *history);
75bool z_shell_history_get(
struct shell_history *history,
bool up,
88void z_shell_history_put(
struct shell_history *history,
uint8_t *line,
98static inline bool z_shell_history_active(
struct shell_history *history)
100 return (history->current) ?
true :
false;
Header file for the doubly-linked list API.
struct _dnode sys_dnode_t
Doubly-linked list node structure.
Definition dlist.h:57
struct _dnode sys_dlist_t
Doubly-linked list structure.
Definition dlist.h:53
Header file for the ring buffer API.
#define true
Definition stdbool.h:14
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89