-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli_io.c
55 lines (51 loc) · 1.62 KB
/
cli_io.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* @brief Compact & Simple Command Line Interface for microcontrollers
*
* Copyright (c) 2018 Vitaliy Nimych - vitaliy.nimych@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Modified 14 January 2019 - Vitaliy Nimych
* add cli input log commands
*
* Modified 20 April 2019 - Vitaliy Nimych
* add pars buttons: UP, DOWN, LEFT, RIGHT
*
* Modified 1 September 2019 - Vitaliy Nimych
* add pars buttons: TAB, ESC, Ctrl + C
*
* Modified 27 December 2020 - Vitaliy Nimych
* add pars buttons for clear screen : Ctrl + L, small code refactoring
*
* */
#include "cli_io.h"
/** Your implementation of acceptance a character with IO stream
* just call this function and put character symbol with IO */
void CLI_AppendChar(char c)
{
// your implementation RX char
}
/** Your implementation of sending a character to IO stream */
void CLI_PrintChar(char c)
{
// your implementation TX char
}
void CLI_PrintStr(char *str)
{
uint16_t i = 0;
while (str[i] != '\0') {
CLI_PrintChar(str[i]);
i++;
}
}