Skip to content

Commit edacd9c

Browse files
authored
removing numbers & adding return types & examples
1 parent e22c60d commit edacd9c

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

Diff for: README.md

+28-6
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ If desired timestamps can be prefixed to the debug message. Timestamp output can
2929
Normally all debug output is redirected to the primary serial output of each board (`Serial`). In case you want to redirect the output to another output stream you can make use of `setDebugOutputStream(&Serial2)`.
3030

3131
# Documentation
32-
### 1. Debug :
32+
### Debug :
3333
Arduino_DebugUtils Object that will be used for calling member functions.
3434

35-
### 2. Debug.setDebugLevel(int const debug_level) :
35+
### Debug.setDebugLevel(int const debug_level) :
3636
Parameter debug_level in order of lowest to highest priority are : `DBG_NONE`, `DBG_ERROR`, `DBG_WARNING`, `DBG_INFO` (default), `DBG_DEBUG`, and `DBG_VERBOSE`.
3737

3838
Return type: void.
@@ -41,23 +41,45 @@ Example:
4141
```
4242
Debug.setDebugLevel(DBG_VERBOSE);
4343
```
44-
### 2. Debug.setDebugOutputStream(Stream * stream) :
44+
### Debug.setDebugOutputStream(Stream * stream) :
4545
By default, Output Stream is Serial. In advanced cases other objects could be other serial ports (if available), or can be a Software Serial object.
4646

47+
Return type: void.
48+
4749
Example:
4850
```
4951
SoftwareSerial mySerial(10, 11); // RX, TX
5052
Debug.setDebugOutputStream(&mySerial);
5153
```
52-
### 3. Debug.timestampOn() :
54+
### Debug.timestampOn() :
5355
Calling this function switches on the timestamp in the `Debug.print()` function call;
5456
By default, printing timestamp is off, unless turned on using this function call.
5557

56-
### 4. Debug.timestampOff() :
58+
Return type: void.
59+
60+
Example:
61+
```
62+
Debug.timestampOn();
63+
Debug.print(DBG_VERBOSE, "i = %d", i); //Output looks like : [ 21007 ] i = 21
64+
```
65+
66+
### Debug.timestampOff() :
5767
Calling this function switches off the timestamp in the `Debug.print()` function call;
5868

59-
### 5. Debug.print(int const debug_level, const char * fmt, ...);
69+
Return type: void.
70+
71+
Example:
72+
```
73+
Debug.timestampOff();
74+
Debug.print(DBG_VERBOSE, "i = %d", i); //Output looks like : i = 21
75+
```
76+
77+
78+
### Debug.print(int const debug_level, const char * fmt, ...);
6079
This function prints the message if parameter `debug_level` in the `Debug.print(debug_level, ...)` function call belongs to the range: DBG_ERROR <= debug_level <= (<DBG_LEVEL> that has been set using `setDebugLevel()` function).
80+
81+
Return type: void.
82+
6183
Example:
6284
```
6385
Debug.setDebugLevel(DBG_VERBOSE);

0 commit comments

Comments
 (0)