Skip to content

Commit 1acd9e0

Browse files
committed
Documentation
1 parent 1964639 commit 1acd9e0

16 files changed

+1340
-24
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "docs/Style/doxygen-awesome-css"]
22
path = docs/Style/doxygen-awesome-css
33
url = https://github.com/jothepro/doxygen-awesome-css.git
4+
[submodule "extras/doxygen-awesome-css"]
5+
path = extras/doxygen-awesome-css
6+
url = https://github.com/jothepro/doxygen-awesome-css.git

Doxyfile

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ PROJECT_BRIEF = "Lightweight Command Parser"
6161
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
6262
# the logo to the output directory.
6363

64-
PROJECT_LOGO = docs/images/logo.svg
64+
PROJECT_LOGO = C:/Users/dani0/Documents/Arduino/libraries/Commander-API/extras/Assets/logo.svg
6565

6666
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
6767
# into which the generated documentation will be written. If a relative path is
6868
# entered, it will be relative to the location where doxygen was started. If
6969
# left blank the current directory will be used.
7070

71-
OUTPUT_DIRECTORY = docs
71+
OUTPUT_DIRECTORY = ../CommanderDocs/
7272

7373
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
7474
# sub-directories (in 2 levels) under the output directory of each output format
@@ -342,7 +342,7 @@ OPTIMIZE_OUTPUT_SLICE = NO
342342
#
343343
# Note see also the list of default file extension mappings.
344344

345-
EXTENSION_MAPPING =
345+
EXTENSION_MAPPING = ino=cpp
346346

347347
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
348348
# according to the Markdown format, which allows for more readable
@@ -795,7 +795,7 @@ FILE_VERSION_FILTER =
795795
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
796796
# tag is left empty.
797797

798-
LAYOUT_FILE = docs/Style/layout.xml
798+
LAYOUT_FILE = extras/Assets/DoxygenLayout.xml
799799

800800
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
801801
# the reference definitions. This must be a list of .bib files. The .bib
@@ -909,7 +909,7 @@ WARN_LOGFILE =
909909
# Note: If this tag is empty the current directory is searched.
910910

911911
INPUT = src \
912-
docs/markdown_pages
912+
extras/Assets/DocuPages
913913

914914
# This tag can be used to specify the character encoding of the source files
915915
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1043,7 +1043,7 @@ EXCLUDE_SYMBOLS =
10431043
# that contain example code fragments that are included (see the \include
10441044
# command).
10451045

1046-
EXAMPLE_PATH = extras/examples_doxygen
1046+
EXAMPLE_PATH =
10471047

10481048
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
10491049
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
@@ -1063,7 +1063,7 @@ EXAMPLE_RECURSIVE = YES
10631063
# that contain images that are to be included in the documentation (see the
10641064
# \image command).
10651065

1066-
IMAGE_PATH = docs/images
1066+
IMAGE_PATH = extras/Assets/DocuImages
10671067

10681068
# The INPUT_FILTER tag can be used to specify a program that doxygen should
10691069
# invoke to filter for each input file. Doxygen will invoke the filter program
@@ -1322,7 +1322,7 @@ HTML_FILE_EXTENSION = .html
13221322
# of the possible markers and block names see the documentation.
13231323
# This tag requires that the tag GENERATE_HTML is set to YES.
13241324

1325-
HTML_HEADER = docs/Style/doxygen-custom/header.html
1325+
HTML_HEADER = extras/Assets/header.html
13261326

13271327
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
13281328
# generated HTML page. If the tag is left blank doxygen will generate a standard
@@ -1332,7 +1332,7 @@ HTML_HEADER = docs/Style/doxygen-custom/header.html
13321332
# that doxygen normally uses.
13331333
# This tag requires that the tag GENERATE_HTML is set to YES.
13341334

1335-
HTML_FOOTER = docs/Style/doxygen-custom/footer.html
1335+
HTML_FOOTER =
13361336

13371337
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
13381338
# sheet that is used by each HTML page. It can be used to fine-tune the look of
@@ -1357,11 +1357,10 @@ HTML_STYLESHEET =
13571357
# list). For an example see the documentation.
13581358
# This tag requires that the tag GENERATE_HTML is set to YES.
13591359

1360-
HTML_EXTRA_STYLESHEET = docs/Style/doxygen-custom/custom.css \
1361-
docs/Style/doxygen-custom/custom-alternative.css \
1362-
docs/Style/doxygen-awesome-css/doxygen-awesome.css \
1363-
docs/Style/doxygen-awesome-css/doxygen-awesome-sidebar-only.css \
1364-
docs/Style/doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css
1360+
HTML_EXTRA_STYLESHEET = extras/doxygen-awesome-css/doxygen-awesome.css \
1361+
extras/doxygen-awesome-css/doxygen-awesome-sidebar-only.css \
1362+
extras/doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css \
1363+
extras/Assets/custom_header.css
13651364

13661365
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
13671366
# other source files which should be copied to the HTML output directory. Note
@@ -1371,13 +1370,10 @@ HTML_EXTRA_STYLESHEET = docs/Style/doxygen-custom/custom.css \
13711370
# files will be copied as-is; there are no commands or markers available.
13721371
# This tag requires that the tag GENERATE_HTML is set to YES.
13731372

1374-
HTML_EXTRA_FILES = docs/images/arduino_logo.png \
1375-
docs/images/platformio_logo.png \
1376-
docs/Style/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
1377-
docs/Style/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \
1378-
docs/Style/doxygen-awesome-css/doxygen-awesome-interactive-toc.js \
1379-
docs/Style/doxygen-awesome-css/doxygen-awesome-paragraph-link.js \
1380-
docs/Style/doxygen-awesome-css/doxygen-awesome-tabs.js
1373+
HTML_EXTRA_FILES = extras/Assets/DocuImages/support_me_on_kofi_red.png \
1374+
extras/Assets/supported_boards.html \
1375+
extras/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
1376+
extras/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js
13811377

13821378
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
13831379
# should be rendered with a dark or light theme. Default setting AUTO_LIGHT
@@ -1405,15 +1401,15 @@ HTML_COLORSTYLE = LIGHT
14051401
# Minimum value: 0, maximum value: 359, default value: 220.
14061402
# This tag requires that the tag GENERATE_HTML is set to YES.
14071403

1408-
HTML_COLORSTYLE_HUE = 209
1404+
HTML_COLORSTYLE_HUE = 220
14091405

14101406
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
14111407
# in the HTML output. For a value of 0 the output will use gray-scales only. A
14121408
# value of 255 will produce the most vivid colors.
14131409
# Minimum value: 0, maximum value: 255, default value: 100.
14141410
# This tag requires that the tag GENERATE_HTML is set to YES.
14151411

1416-
HTML_COLORSTYLE_SAT = 255
1412+
HTML_COLORSTYLE_SAT = 100
14171413

14181414
# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
14191415
# luminance component of the colors in the HTML output. Values below 100
@@ -1424,7 +1420,7 @@ HTML_COLORSTYLE_SAT = 255
14241420
# Minimum value: 40, maximum value: 240, default value: 80.
14251421
# This tag requires that the tag GENERATE_HTML is set to YES.
14261422

1427-
HTML_COLORSTYLE_GAMMA = 113
1423+
HTML_COLORSTYLE_GAMMA = 80
14281424

14291425
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
14301426
# page will contain the date and time when the page was generated. Setting this
14.4 KB
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@page bug_report_page Bug Report
2+
3+
Bugs can happen in any product, and software is no exception. If you come across an issue, it's best to report it as soon as possible so we can fix it. The first step is to create a new issue on
4+
[GitHub](https://github.com/dani007200964/Commander-API/issues/new?template=bug_report.md).
5+
6+
When filling out the issue description, try to be as detailed as possible. The more relevant information you provide, the faster and more efficiently we can investigate and resolve the problem. You don’t need to share your entire project’s source code—just narrow it down to the part that’s causing the issue. If you can include a minimal code snippet that reproduces the problem, that would be incredibly helpful!
7+
8+
Also, don’t forget to mention your setup: which environment you're working in, what microcontroller you’re using, and which compiler you’re working with. Try to document the issue in a way that would make it easy for someone else (or even yourself, later) to reproduce it based on your description.
9+
10+
**Thanks for helping us improve!**
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@page developer_zone_page Developer Zone
2+
3+
@tableofcontents
4+
5+
This section is for those fearless terminal ninjas who want to contribute to improving this system. First of all, we want to say a huge **thank you** for taking the time to make this software better and better!
6+
7+
To ensure that this shared adventure is a fun and productive challenge for everyone, we have a few simple guidelines:
8+
9+
- **Be respectful and constructive** – Everyone starts somewhere, and we value all contributions, whether big or small. Keep discussions friendly and helpful.
10+
- **Clear and concise communication** – When reporting issues or submitting code, provide useful details that make it easy for others to understand and help.
11+
- **Follow the coding style** – Consistency is key. Try to adhere to existing conventions in the project to keep the codebase clean and maintainable.
12+
- **Write meaningful commit messages** – A good commit message helps others understand *why* a change was made, not just *what* changed.
13+
- **Be open to feedback** – Code reviews aren’t about criticism; they’re about making the project stronger. Let’s help each other improve!
14+
- **Keep it fun!** – At the end of the day, we’re all here to learn, build cool things, and collaborate. Let’s make this a positive space for everyone.
15+
16+
### Necessary Tools
17+
18+
Now that we’ve got that covered, let’s dive in! To start developing, you’ll need a few extra tools:
19+
- [Git](https://git-scm.com/) - Any Git client works, but we recommend [GitHub Desktop](https://desktop.github.com/download/)
20+
- [Visual Studio Code](https://code.visualstudio.com/) - We love this code editor
21+
- [Doxygen](https://www.doxygen.nl/) - This builds the whole html documentation. You will need at least __version 1.9.5__
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@page examples_page Examples
2+
3+
## Commander-API & Shellminator: A Perfect Duo for Embedded Terminals
4+
5+
Commander-API has been developed alongside Shellminator for many years. Together, these two software packages allow you to create an interactive terminal on low-power processors. While both projects work independently, documenting the same features twice would have been redundant. That’s why the documentation for Commander-API can be found within the Shellminator documentation.
6+
7+
<div class="section_buttons">
8+
9+
| Previous | Next |
10+
|:------------------|-----------------------------:|
11+
|[Install](@ref installation_page) | [FAQ](@ref faq_page) |
12+
13+
</div>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@page faq_page Frequently Asked Questions
2+
@tableofcontents
3+
4+
It's always great when questions arise in connection with such a project. Based on the experiences of recent years, we've gathered a few questions that many have asked, and we've tried to provide short, concise answers for each. If you need more information beyond these, feel free to ask on the [GitHub Discussions](https://github.com/dani007200964/Commander-API/discussions) platform.
5+
6+
💡 *Can I use Commander-API without Shellminator to save resources?*
7+
Absolutely! The `basic.ino` example demonstrates this. However, keep in mind that without Shellminator, you lose features like interactive editing and command history. If you really need to save resources, you can go this route—but only if a reduced user experience isn’t a concern.
8+
9+
💡 *Does it work on other platforms without the Arduino environment?*
10+
Yes! We’ve been using it with STM32 for a long time without any issues. There’s even a guide in the Shellminator documentation on how to integrate it into an STM32 environment.
11+
12+
💡 *Why does dynamic memory run out so quickly on AVR controllers?*
13+
This is a complex issue. AVR controllers don’t have a unified memory bus, meaning they can’t directly access data from flash memory. As a result, even `const char*` strings end up in dynamic memory. There are two ways to handle this: keep command descriptions short or use AVR-specific memory handling techniques.
14+
15+
💡 *Does it only work with Serial?*
16+
Nope! You can use any channel derived from the `Stream` class. With Shellminator, you can even use TCP, WebSocket, or BLE for communication.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@page installation_page Installation
2+
3+
@tableofcontents
4+
5+
Before we get started with anything, we need to install this software package into our preferred development environment. We've gathered the most popular development environments and prepared a short guide for you to ensure a smooth start to this adventure.
6+
7+
## Terminal Emulator Software
8+
9+
## Arduino Installation
10+
11+
Let's start with the installation guide for the Arduino environment, as we believe this is the simplest one of all. First, you will need the
12+
[Arduino IDE](https://www.arduino.cc/en/software). This software is the heart of the Arduino ecosystem. Next, you'll need an Arduino board that has enough resources to meet your goals.
13+
14+
To help you find the most suitable board, we've created a table for you to easily choose one.
15+
16+
If you're just getting acquainted with this software, we recommend choosing a slightly more modern microcontroller, such as the Raspberry Pi Pico or the ESP32. We suggest this because these platforms have much more memory than, for example, an older Arduino Nano. This extra memory allows you to try out all the functions without needing to optimize right away. We're offering this friendly advice to help you avoid any additional distractions while you're learning.
17+
18+
Once you've installed the Arduino IDE, the next task is to install Commander-API. You can find detailed instructions
19+
[here](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library/).
20+
Please make sure to always strive for using the latest version to ensure you have the most stable version on your computer.
21+
22+
## Arduino Installation Manually
23+
24+
There are, unfortunately, times when the Library Manager is not available. This can happen for various reasons, such as wanting to install the library offline, or working in a corporate environment where the paths used by the Arduino IDE for installation are blocked. But don't worry! The libraries can still be installed in these situations, please follow the instructions from [here](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries/).
25+
26+
<div class="section_buttons">
27+
28+
| Previous | Next |
29+
|:------------------|-----------------------------:|
30+
| | [Examples](@ref examples_page) |
31+
32+
</div>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
@mainpage Introduction
2+
3+
## A Lightweight Command Interpreter for Microcontrollers
4+
5+
Commander-API is a command interpreter designed for microcontrollers with limited resources. It runs on almost any microcontroller, whether old or new.
6+
7+
### So, what’s it good for?
8+
Essentially, it gives you a functionality similar to a command-line interface on a desktop computer. You can create commands and easily link them to specific functions in your code. The main motivation behind this project was to eliminate the need to constantly recompile and upload your code during development. Instead, you can define diagnostic and testing commands that are dynamically available at runtime.
9+
10+
But that’s not all! Commander-API also supports arguments, allowing you to create parameterized commands. This makes your development workflow much more flexible and powerful.
11+
12+
In addition to handling commands and arguments, Commander-API can also manage environment variables. This lets you store and retrieve settings dynamically, making your system even more flexible and adaptable.
13+
14+
## Just a few lines of code and it is done!
15+
16+
```cpp
17+
#include "Commander-API.hpp"
18+
19+
#define COMMAND_SIZE 30
20+
21+
// We have to create an object from Commander class.
22+
Commander commander;
23+
24+
// Command callbacks
25+
bool cat_func( char *args, CommandCaller* caller );
26+
bool dog_func( char *args, CommandCaller* caller );
27+
28+
// Command tree
29+
Commander::systemCommand_t API_tree[] = {
30+
systemCommand( "cat", "Description for cat command.", cat_func ),
31+
systemCommand( "dog", "Description for dog command.", dog_func )
32+
};
33+
34+
// This buffer is used to store command from Serial port.
35+
char commandBuffer[ COMMAND_SIZE ];
36+
37+
// System init section.
38+
void setup(){
39+
Serial.begin(115200);
40+
41+
commander.attachTree( API_tree );
42+
commander.init();
43+
44+
Serial.println();
45+
Serial.println( "---- Init Finished ----" );
46+
Serial.println();
47+
48+
Serial.println( "Type something" );
49+
Serial.print( "$: " );
50+
}
51+
52+
// Infinite loop.
53+
void loop(){
54+
commander.update( commandBuffer, COMMAND_SIZE, &Serial );
55+
}
56+
57+
/// This is an example function for the cat command
58+
bool cat_func(char *args, CommandCaller* caller ){
59+
caller -> print( "Hello from cat function!\r\n" );
60+
return true;
61+
}
62+
63+
/// This is an example function for the dog command
64+
bool dog_func(char *args, CommandCaller* caller ){
65+
caller -> print( "Hello from dog function!\r\n" );
66+
return true;
67+
}
68+
```
69+
70+
Right? It doesn't seem that complicated, does it? It was very important to us to keep things simple.
71+
We really wanted beginner programmer padawans to be able to create amazing things easily with Commander.
72+
That's why we made sure the API is as simple and straightforward as possible.
73+
74+
75+
<div class="section_buttons">
76+
77+
| Previous | Next |
78+
|:------------------|-----------------------------:|
79+
| | [Install](@ref installation_page) |
80+
81+
</div>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@page supported_boards_page Supported Boards
2+
3+
## Compatibility Scale
4+
In the following table, we've compiled a list of the currently popular boards that we have tested.
5+
It's worth noting that while the basic functions of the software are available on almost any microcontroller with
6+
at least 8kB of Flash memory and 1kB of dynamic memory, the more advanced functions are limited by low memory.
7+
We've indicated this with a scale.
8+
9+
\htmlonly
10+
<iframe id="pwHashGenerator" src="supported_boards.html" style="height:600px;width:100%;border:none;display:block;"></iframe>
11+
\endhtmlonly

0 commit comments

Comments
 (0)