Skip to content

Commit

Permalink
Added write from buffer
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <[email protected]>
  • Loading branch information
SRGDamia1 committed Nov 14, 2024
1 parent 6221a0c commit 2fe588f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions StreamDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ class StreamDebugger
_dump->write(ch);
return _data ? _data->write(ch) : 0;
}
virtual size_t write(const uint8_t *buffer, size_t size)
{
if (_dump)
_dump->write(buffer, size);
return _data ? _data->write(buffer, size) : 0;
}
virtual int read() {
if (!_data)
return -1;
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "StreamDebugger",
"version": "2.0.1",
"version": "2.0.2",
"description": "Debugger for Arduino Stream-based communication. This class is an Arduino Stream, that dumps all data to another Stream for debug purposes.",
"keywords": "Stream, Serial, Debug",
"authors": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=StreamDebugger
version=2.0.1
version=2.0.2
author=Volodymyr Shymanskyy
maintainer=Volodymyr Shymanskyy
sentence=Debugger for Arduino Stream-based communication
Expand Down
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ src_dir = examples/Example
default_envs = esp32

[env]
build_flags =
build_flags =
-Wall
-Wextra
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-D MYCILA_TRIAL_DURATION=15

lib_compat_mode = strict
lib_ldf_mode = deep+

Expand Down

0 comments on commit 2fe588f

Please sign in to comment.