Skip to content

Commit d390924

Browse files
committed
Updated README file
1 parent 346aafb commit d390924

1 file changed

Lines changed: 52 additions & 27 deletions

File tree

README.md

Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,63 @@ hal/newdev
2929

3030
**Note:** Use any of the other device support implementation of minbasecli_X.h/cpp files as example to edit.
3131

32-
2. Include new device support sources in "minbasecli.h" using an existing global define that allows to know wich device/framework is being compiled (this define should exists in some way in device framework, otherwise, you need to pass it to the compiler at build time, i.e. using -DMY_NEW_DEV for gcc compiler):
32+
2. Include new device support sources in "minbasecli_hal_select.h" using an existing global define that allows to know which device/framework is being compiled (this define should exists in some way in device framework, otherwise, you need to pass it to the compiler at build time, i.e. using -DMY_NEW_DEV for gcc compiler):
3333

3434
```c++
3535

3636
/* ... */
3737

38-
/* Use Specific HAL for build system */
39-
40-
#if defined(__linux__)
41-
#include "hal/linux/minbasecli_linux.h"
42-
#define MINBASECLI_HAL MINBASECLI_LINUX
43-
#elif defined(_WIN32) || defined(_WIN64)
44-
#include "hal/windows/minbasecli_windows.h"
45-
#define MINBASECLI_HAL MINBASECLI_WINDOWS
46-
#elif defined(ARDUINO)
47-
#include "hal/arduino/minbasecli_arduino.h"
48-
#define MINBASECLI_HAL MINBASECLI_ARDUINO
49-
#elif defined(__AVR)
50-
#include "hal/avr/minbasecli_avr.h"
51-
#define MINBASECLI_HAL MINBASECLI_AVR
52-
#elif defined(ESP_PLATFORM)
53-
#include "hal/espidf/minbasecli_espidf.h"
54-
#define MINBASECLI_HAL MINBASECLI_ESPIDF
55-
#elif defined(MY_NEW_DEV) // This has been include
56-
#include "hal/newdev/minbasecli_newdev.h" // This has been include
57-
#define MINBASECLI_HAL MINBASECLI_NEWDEV // This has been include
58-
#else
59-
#warning "minbasecli - Unsupported device/system."
60-
#define HAL_NONE
61-
#include "hal/none/minbasecli_none.h"
62-
#define MINBASECLI_HAL MINBASECLI_NONE
63-
#endif
38+
/*****************************************************************************/
39+
40+
/* Hardware Abstraction Layer: NewDevice */
41+
42+
#elif defined(MY_NEW_DEV)
43+
44+
// Interface HAL Selection
45+
#include "hal/newdev/minbasecli_newdev.h"
46+
#define MINBASECLI_HAL MINBASECLI_NEWDEV
47+
48+
// Default CLI Baud Rate Speed to use if not provided
49+
#if !defined(MINBASECLI_DEFAULT_BAUDS)
50+
#define MINBASECLI_DEFAULT_BAUDS 115200
51+
#endif
52+
53+
// Maximum CLI read buffer size
54+
#if !defined(MINBASECLI_MAX_READ_SIZE)
55+
#define MINBASECLI_MAX_READ_SIZE 64
56+
#endif
57+
58+
// Maximum CLI Command length
59+
#if !defined(MINBASECLI_MAX_CMD_LEN)
60+
#define MINBASECLI_MAX_CMD_LEN 24
61+
#endif
62+
63+
// Maximum CLI Command Argument length
64+
#if !defined(MINBASECLI_MAX_ARGV_LEN)
65+
#define MINBASECLI_MAX_ARGV_LEN 32
66+
#endif
67+
68+
// Maximum number of arguments to check on a received CLI command
69+
#if !defined(MINBASECLI_MAX_ARGV)
70+
#define MINBASECLI_MAX_ARGV 4
71+
#endif
72+
73+
// Maximum Print formatted number array size
74+
#if !defined(MINBASECLI_MAX_PRINT_SIZE)
75+
#define MINBASECLI_MAX_PRINT_SIZE 22
76+
#endif
77+
78+
// Maximum number of commands that can be added to the CLI
79+
#if !defined(MINBASECLI_MAX_CMD_TO_ADD)
80+
#define MINBASECLI_MAX_CMD_TO_ADD 16
81+
#endif
82+
83+
// Maximum length of command description text
84+
#if !defined(MINBASECLI_MAX_CMD_DESCRIPTION)
85+
#define MINBASECLI_MAX_CMD_DESCRIPTION 64
86+
#endif
87+
88+
/*****************************************************************************/
6489

6590
/* ... */
6691

0 commit comments

Comments
 (0)