Skip to content

Commit 3e93e8d

Browse files
committed
Update README showing macro usage.
1 parent 53f1679 commit 3e93e8d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Diff for: README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Example:
2424
```C++
2525
int i = 1;
2626
float pi = 3.1459;
27-
Debug.print(DBG_VERBOSE, "i = %d, pi = %f", i, pi);
27+
DEBUG_VERBOSE("i = %d, pi = %f", i, pi);
2828
```
2929
**Note**: The output of floating point numbers (`%f`) does NOT work on [ArduinoCore-avr](https://github.com/arduino/ArduinoCore-avr).
3030
@@ -43,7 +43,7 @@ Parameter debug_level in order of lowest to highest priority are : `DBG_NONE`, `
4343
Return type: void.
4444
4545
Example:
46-
```
46+
```C++
4747
Debug.setDebugLevel(DBG_VERBOSE);
4848
```
4949
### Debug.setDebugOutputStream(Stream * stream) :
@@ -52,7 +52,7 @@ By default, Output Stream is Serial. In advanced cases other objects could be ot
5252
Return type: void.
5353

5454
Example:
55-
```
55+
```C++
5656
SoftwareSerial mySerial(10, 11); // RX, TX
5757
Debug.setDebugOutputStream(&mySerial);
5858
```
@@ -63,9 +63,9 @@ By default, printing timestamp is off, unless turned on using this function call
6363
Return type: void.
6464
6565
Example:
66-
```
66+
```C++
6767
Debug.timestampOn();
68-
Debug.print(DBG_VERBOSE, "i = %d", i); //Output looks like : [ 21007 ] i = 21
68+
DBG_VERBOSE("i = %d", i); //Output looks like : [ 21007 ] i = 21
6969
```
7070

7171
### Debug.timestampOff() :
@@ -74,9 +74,9 @@ Calling this function switches off the timestamp in the `Debug.print()` function
7474
Return type: void.
7575

7676
Example:
77-
```
77+
```C++
7878
Debug.timestampOff();
79-
Debug.print(DBG_VERBOSE, "i = %d", i); //Output looks like : i = 21
79+
DEBUG_VERBOSE("i = %d", i); //Output looks like : i = 21
8080
```
8181
8282
### Debug.newlineOn() :
@@ -85,7 +85,7 @@ By default, a newline is sent
8585
Return type: void.
8686
8787
Example:
88-
```
88+
```C++
8989
Debug.newlineOn();
9090
```
9191

@@ -95,7 +95,7 @@ By default a newline is sent. Call this to shut that functionality off.
9595
Return type: void.
9696

9797
Example:
98-
```
98+
```C++
9999
Debug.timestampOff();
100100
```
101101

@@ -106,8 +106,8 @@ This function prints the message if parameter `debug_level` in the `Debug.print(
106106
Return type: void.
107107

108108
Example:
109-
```
109+
```C++
110110
Debug.setDebugLevel(DBG_VERBOSE);
111111
int i = 0;
112-
Debug.print(DBG_VERBOSE, "DBG_VERBOSE i = %d", i);
112+
DEBUG_VERBOSE("DBG_VERBOSE i = %d", i);
113113
```

0 commit comments

Comments
 (0)