Skip to content

Commit 79927ea

Browse files
committed
Arduino lib basics.
1 parent 3cce8c7 commit 79927ea

File tree

7 files changed

+61
-8
lines changed

7 files changed

+61
-8
lines changed

keywords.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#######################################
2+
# Colors for Commander-API
3+
#######################################
4+
# Class
5+
#######################################
6+
7+
Commander KEYWORD1
8+
commandResponse KEYWORD1
9+
commandResponseSerial KEYWORD1
10+
commandResponseArduinoSerial KEYWORD1
11+
commandResponseWiFiClient KEYWORD1
12+
13+
#######################################
14+
# Methods and Functions
15+
#######################################
16+
17+
apiElement KEYWORD2
18+
attachTree KEYWORD2
19+
attachTreeFunction KEYWORD2
20+
init KEYWORD2
21+
execute KEYWORD2
22+
attachDebugChannel KEYWORD2
23+
enableDebug KEYWORD2
24+
disableDebug KEYWORD2
25+
26+
27+
#######################################
28+
# Structures
29+
#######################################
30+
31+
API_t KEYWORD2
32+
33+
#######################################
34+
# Constants
35+
#######################################
36+
37+
COMMANDER_MAX_COMMAND_SIZE LITERAL1
38+
COMMAND_PRINTF_BUFF_LEN LITERAL1

library.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name=Commander-API
2+
version=2.0.1
3+
author=Daniel Hajnal <[email protected]>
4+
maintainer=Daniel Hajnal <[email protected]>
5+
sentence=This library can be used to create a simple command parser.
6+
paragraph=It simply parses text based commands and find the corresponding functions for them.
7+
category=Data Processing
8+
url=https://github.com/dani007200964/Commander-API
9+
architectures=*

src/commander.cpp renamed to src/Commander-API.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SOFTWARE.
3232
*/
3333

3434

35-
#include "commander.hpp"
35+
#include "Commander-API.hpp"
3636

3737

3838
void Commander::attachTreeFunction( API_t *API_tree_p, uint32_t API_tree_size_p ){

src/commander.hpp renamed to src/Commander-API.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ SOFTWARE.
3838
#include "stdint.h"
3939
#include "string.h"
4040

41-
#include "commander_settings.hpp"
42-
#include "commander_io.hpp"
41+
#include "Commander-Settings.hpp"
42+
#include "Commander-IO.hpp"
4343

4444
/// Like STM32 Class Factory
4545
#ifdef COMMANDER_USE_SERIAL_RESPONSE

src/commander_io.cpp renamed to src/Commander-IO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SOFTWARE.
3232
*/
3333

3434

35-
#include "commander_io.hpp"
35+
#include "Commander-IO.hpp"
3636

3737
#ifdef COMMANDER_USE_SERIAL_RESPONSE
3838

src/commander_io.hpp renamed to src/Commander-IO.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ SOFTWARE.
3838
#include <stdint.h>
3939
#include <stddef.h>
4040

41-
#include "commander_settings.hpp"
41+
#include "Commander-Settings.hpp"
4242

4343
#ifdef COMMANDER_USE_SERIAL_RESPONSE
4444
#include "Serial.hpp"

src/commander_settings.hpp renamed to src/Commander-Settings.hpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,19 @@ SOFTWARE.
4747
#endif
4848
#endif
4949

50-
//#define COMMANDER_USE_SERIAL_RESPONSE
51-
//#define COMMANDER_USE_WIFI_CLIENT_RESPONSE
52-
5350
/// Maximum length of the terminal command.
51+
#ifndef COMMANDER_MAX_COMMAND_SIZE
5452
#define COMMANDER_MAX_COMMAND_SIZE 30
53+
#endif
5554

55+
/// printf function buffer length
56+
///
57+
/// If you use printf function the maximumlength
58+
/// of the message( including the termination '\0' character )
59+
/// must be less or equal with COMMAND_PRINTF_BUFF_LEN.
60+
#ifndef COMMAND_PRINTF_BUFF_LEN
5661
#define COMMAND_PRINTF_BUFF_LEN 100
62+
#endif
5763

5864

5965
#endif /* COMMANDER_API_SRC_COMMANDER_SETTINGS_HPP_ */

0 commit comments

Comments
 (0)