mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 13:09:49 +04:00
[FL-3965] Separate cli_shell into toolbox (#4175)
* cli_shell: separate into toolbox * fix: cmd flags * fix formatting * cli: increase default stack depth * cli_shell: fix loader lock logic * cli: fix command flags * fix f18 * speaker_debug: fix * cli_registry: fix docs * ufbt: rename cli target back * cli: rename app and record * cli: fix and simplify help command * cli_master_shell: fix ext commands * fix formatting * cli: rename master to main * fix formatting --------- Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
34
lib/toolbox/cli/shell/cli_shell_i.h
Normal file
34
lib/toolbox/cli/shell/cli_shell_i.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "../cli_ansi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct CliShell CliShell;
|
||||
|
||||
/**
|
||||
* @brief Key combo handler
|
||||
* @return true if the event was handled, false otherwise
|
||||
*/
|
||||
typedef bool (*CliShellKeyComboAction)(CliKeyCombo combo, void* context);
|
||||
|
||||
typedef struct {
|
||||
CliKeyCombo combo;
|
||||
CliShellKeyComboAction action;
|
||||
} CliShellKeyComboRecord;
|
||||
|
||||
typedef struct {
|
||||
CliShellKeyComboAction fallback;
|
||||
size_t count;
|
||||
CliShellKeyComboRecord records[];
|
||||
} CliShellKeyComboSet;
|
||||
|
||||
void cli_shell_execute_command(CliShell* cli_shell, FuriString* command);
|
||||
|
||||
const char* cli_shell_get_prompt(CliShell* cli_shell);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user