1
+ /*
2
+ MIT License
3
+
4
+ Copyright (c) 2024 Maximilian Mönikes
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+ */
24
+
25
+
1
26
#include " TLE9012.h"
2
27
#include < stdio.h>
3
28
@@ -15,6 +40,18 @@ uint32_t last_wd_trigger = 0;
15
40
uint8_t terminalbufferrecvlen = 0 ;
16
41
char terminalbuffer[64 ];
17
42
43
+ // constants
44
+ const char helppage[] =
45
+
46
+ " Arduino based UART-isoUART Bridge v1\n \
47
+ The following commands are implemented:\n \
48
+ \n \
49
+ -IL: no function, only exists for compatibility reasons\n \
50
+ -IH: no function, only exists for compatibility reasons\n \
51
+ -WH/WL device_address register_address data : Write data to a register\n \
52
+ -RH/RL device_address register_address : Read data from a register\n \
53
+ -K update_rate : Reset Watchdog every update_rate interval in milliseconds\n \
54
+ -? Show Manual\n " ;
18
55
19
56
void setup () {
20
57
Serial.begin (115200 ); // Start Console interface
@@ -187,6 +224,12 @@ void interpretCommand(const char commandbuffer[], uint8_t bufferlength)
187
224
}
188
225
}
189
226
}
227
+
228
+ else if (!strcmp (cmd," ?" )) // Print Helppage
229
+ {
230
+ Serial.print (helppage);
231
+ }
232
+
190
233
else // No valid command was detected
191
234
{
192
235
Serial.println (" INVALID COMMAND" );
0 commit comments