Loading...
Searching...
No Matches
shell_lock.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include "shell.h"
28
29#ifdef MODULE_SHELL_LOCK
30 #ifndef CONFIG_SHELL_LOCK_PASSWORD
31 #error Using MODULE_SHELL_LOCK requires defining CONFIG_SHELL_LOCK_PASSWORD
32 #endif /* CONFIG_SHELL_LOCK_PASSWORD */
33#endif /* MODULE_SHELL_LOCK */
34
39#define CONFIG_SHELL_LOCK_ATTEMPTS_BEFORE_TIME_LOCK 3
40
41#ifndef CONFIG_SHELL_LOCK_AUTO_LOCK_TIMEOUT_MS
47#define CONFIG_SHELL_LOCK_AUTO_LOCK_TIMEOUT_MS (5 * 60 * 1000)
48#endif
49
58void shell_lock_checkpoint(char *line_buf, int buf_size);
59
66
71
72#ifdef MODULE_SHELL_LOCK_AUTO_LOCKING
77void shell_lock_auto_lock_refresh(void);
78#endif /* MODULE_SHELL_LOCK_AUTO_LOCKING */
79
80#ifdef __cplusplus
81}
82#endif
83
void shell_lock_checkpoint(char *line_buf, int buf_size)
Entry point for the lock mechanism.
void shell_lock_do_lock(void)
Lock the shell.
bool shell_lock_is_locked(void)
Returns true, if the shell is in the locked state.
Shell interface definition.