Skip to content

Commit 56d8e1b

Browse files
committed
Added description of TP function to README.md
1 parent bd88c72 commit 56d8e1b

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ GG for Arduino is a serial console library. It also contains various functions f
44

55
## Console
66

7-
With GG, you can implement a command line interface on your Arduino and add your own commands.
7+
You can implement a command line interface on your Arduino and add your own commands.
88

9-
### Specifications
9+
### Communication specifications
1010

1111
* Arduino standard serial(Serial)
1212
* 115200BPS / 8bit data length / non-parity
@@ -28,9 +28,33 @@ After creating the function of the original command, register it as shown in the
2828

2929
* [GG_console_cmd.ino](examples/GG_console_cmd/GG_console_cmd.ino).
3030

31+
### How to use without command line interface
32+
33+
You can use character output like printf () without command line interface.
34+
See example below.
35+
36+
* [GG_printf.ino](examples/GG_printf/GG_printf.ino).
37+
38+
### Timing analysis
39+
40+
By using the TP function, you can analyze the timing of your program's operation.
41+
You can measure the processing time of the routine. It is also convenient for observing the status of interrupt processing and task processing in the RTOS.
42+
43+
First, embed the status number control (GG_TP_ON / GG_TP_OFF) in the program point you want to analyze. Then use the tp command to select the status number to be output to TP1 or TP2. You can also switch at any time.
44+
45+
Millions of logical state numbers can be placed, but there are only two physical outputs, TP1 and TP2. This is limited because the number of physical signals is limited and the CPU load increases when many signal pin switchings are checked.
46+
47+
In the sample below, TP1 is Arduino pin 2 and TP2 is Arduino pin 3. The oscilloscope has TP1 (pin 2) connected to yellow CH1 and TP2 (pin 3) connected to purple CH2. The tp command (tp 10 30) sets TP1 to status number 10 and TP2 to status number 30.
48+
49+
* [GG_tp.ino](examples/GG_tp/GG_tp.ino).
50+
51+
![tp_10_30](tp_10_30.jpg "Y:TP1(status number 10),M:TP2(status number 30)")
52+
3153
## Functions
3254

33-
|Functions / Variables|Specification|
55+
All functions do not use the heap.
56+
57+
|Functions / Variables|specification|
3458
|--|---|
3559
|***GG_for_Arduino.h***||
3660
|int gg_start(const char \*title)|Start processing GG for Arduino|
@@ -66,7 +90,7 @@ After creating the function of the original command, register it as shown in the
6690
|***gg_printf.h***||
6791
|int gg_vxprintf(int (\*putc)(int), const char \*fmt, va_list vlst)|vprintf() with putc()|
6892
|int gg_xprintf(int (\*putc)(int), const char \*fmt, ...)|printf() with putc()|
69-
|int gg_printf(const char \*fmt, ...)|printf() with standard output|
93+
|int gg_printf(const char \*fmt, ...)|printf() with standard output.% e is not implemented|
7094
|int gg_vsprintf(char \*buf, const char \*fmt, va_list vlst)|vsprintf() to buf[]|
7195
|int gg_sprintf(char \*buf, const char \*fmt, ...)|sprintf() to buf[]|
7296
|gg_printDATE(gg_time_t)|"YY/MM/DD"|
@@ -78,7 +102,7 @@ After creating the function of the original command, register it as shown in the
78102
|GG_CON_CMDMRK(title)|Display delimiter of list in help|
79103
|GG_CON|Work area for console (internal use)|
80104
|int gg_con_MonInit(void)|Console initialization|
81-
|char \*gg_con_prompt|Prompt string|
105+
|char \*gg_con_prompt|Prompt string. ">" by default|
82106
|int gg_con_MonRePrompt(void)|Redisplay prompt|
83107
|int gg_con_MonPrompt(void)|Prompt display (used internally)|
84108
|int gg_con_Check(void)|Console check with gg_GetC()|

examples/GG_console_cmd/GG_console_cmd.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Example
1515
16-
** GG console
16+
** GG **
1717
>help
1818
-- GG standard command --
1919
help [cmd..] : command help

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name=GG
22
version=1.0.0
33
author=Masao Koga <[email protected]>
44
maintainer=Masao Koga <[email protected]>
5-
sentence=GG for Arduino is a library package that provides serial consoles, formatted output and timing analysis.
6-
paragraph=You can implement a command line interface on Arduino and add your commands very quickly and easily.This library contains built-in commands that allow memory access and timing analysis.It also includes formatted output like printf().
5+
sentence=GG for Arduino is a serial console library.
6+
paragraph=It also contains various functions for implementing the console, for example printf(). You can implement a command line interface on your Arduino and add your own commands. This library contains built-in commands that allow memory access and timing analysis.
77
category=Communication
88
url=https://github.com/mkogax/GG_for_Arduino
99
architectures=*

tp_10_30.jpg

20.7 KB
Loading

0 commit comments

Comments
 (0)