https://github.com/aztechsk/cmdln
The cmdline library provides a simple command-line interpreter.
https://github.com/aztechsk/cmdln
firmware freertos
Last synced: 3 months ago
JSON representation
The cmdline library provides a simple command-line interpreter.
- Host: GitHub
- URL: https://github.com/aztechsk/cmdln
- Owner: aztechsk
- License: isc
- Created: 2024-04-07T19:36:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T12:45:21.000Z (5 months ago)
- Last Synced: 2025-01-22T13:40:06.561Z (5 months ago)
- Topics: firmware, freertos
- Language: C
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmdln
The **cmdln** C library provides a simple command-line interpreter. Commands with
various parameters can be registered, and upon successful parsing of a command
with parameters, a callback function is invoked.### Registration Functions and Parameter Types
**Command with no arguments:**
void add_command_noargs(const char *p_name, void (*p_handler)(void));
**Command with a boolean parameter:**
void add_command_boolean(const char *p_name, void (*p_handler)(boolean_t));
**Command with a char parameter:**
void add_command_char(const char *p_name, void (*p_handler)(char));
**Command with an int parameter:**
void add_command_int(const char *p_name, void (*p_handler)(int));
**Command with char and int parameters:**
void add_command_char_int(const char *p_name, void (*p_handler)(char, int));
**Command with a string parameter:**
void add_command_string(const char *p_name, void (*p_handler)(const char *));
**Command with char and string parameters:**
void add_command_char_string(const char *p_name, void (*p_handler)(char, const char *));
**Command with int and string parameters:**
void add_command_int_string(const char *p_name, void (*p_handler)(int, const char *));
### Library Features
- Standardized API (for the AZTech framework).