Skip to content

Commit e181e35

Browse files
committed
StdioDevice docu
1 parent 296f73c commit e181e35

File tree

9 files changed

+124
-105
lines changed

9 files changed

+124
-105
lines changed

ArduinoCore-Linux/cores/arduino/StdioDevice.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,20 @@
88
namespace arduino {
99

1010
/**
11-
* @brief We use the SerialDef class to be able to provide Serail, Serial1 and
12-
* Serial2 outside of the Arduino environment;
11+
* @class StdioDevice
12+
* @brief Provides a Stream interface for standard input/output operations outside the Arduino environment.
1313
*
14+
* This class implements the Arduino Stream interface using standard C++ streams (std::cout and std::cin),
15+
* allowing code that expects Arduino Serial-like objects to work in non-Arduino environments. It supports
16+
* printing, reading, and flushing, and can be used to provide Serial, Serial1, and Serial2 objects for
17+
* desktop or emulated environments. The class supports auto-flushing after each print/write operation.
18+
*
19+
* Key features:
20+
* - Implements print, println, and write methods for various data types.
21+
* - Supports auto-flush to ensure output is immediately visible.
22+
* - Provides input methods compatible with Arduino's Stream interface.
23+
* - Can be used as a drop-in replacement for Serial in non-Arduino builds.
24+
* - Designed for use in emulators or desktop testing of Arduino code.
1425
*/
1526
class StdioDevice : public Stream {
1627
public:

docs/html/_stdio_device_8h_source.html

Lines changed: 95 additions & 95 deletions
Large diffs are not rendered by default.

docs/html/annotated.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<tr id="row_0_44_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_s_p_i_source.html" target="_self">SPISource</a></td><td class="desc">Abstract interface for providing SPI hardware implementations </td></tr>
123123
<tr id="row_0_45_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_s_p_i_wrapper.html" target="_self">SPIWrapper</a></td><td class="desc">SPI wrapper class that provides flexible hardware abstraction </td></tr>
124124
<tr id="row_0_46_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_s_p_s_c_queue.html" target="_self">SPSCQueue</a></td><td class="desc"></td></tr>
125-
<tr id="row_0_47_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stdio_device.html" target="_self">StdioDevice</a></td><td class="desc">We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino environment; </td></tr>
125+
<tr id="row_0_47_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stdio_device.html" target="_self">StdioDevice</a></td><td class="desc">Provides a <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface for standard input/output operations outside the Arduino environment </td></tr>
126126
<tr id="row_0_48_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_48_" class="arrow" onclick="toggleFolder('0_48_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stream.html" target="_self">Stream</a></td><td class="desc"></td></tr>
127127
<tr id="row_0_48_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structarduino_1_1_stream_1_1_multi_target.html" target="_self">MultiTarget</a></td><td class="desc"></td></tr>
128128
<tr id="row_0_49_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_string.html" target="_self">String</a></td><td class="desc"></td></tr>

docs/html/classarduino_1_1_print.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<area href="classarduino_1_1_hardware_i2_c.html" alt="arduino::HardwareI2C" shape="rect" coords="352,280,518,304"/>
9696
<area href="classarduino_1_1_hardware_serial.html" alt="arduino::HardwareSerial" shape="rect" coords="352,336,518,360"/>
9797
<area href="classarduino_1_1_remote_serial_class.html" title="Remote Serial implementation that operates over a communication stream." alt="arduino::RemoteSerialClass" shape="rect" coords="352,392,518,416"/>
98-
<area href="classarduino_1_1_stdio_device.html" title="We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino e..." alt="arduino::StdioDevice" shape="rect" coords="352,448,518,472"/>
98+
<area href="classarduino_1_1_stdio_device.html" title="Provides a Stream interface for standard input/output operations outside the Arduino environment." alt="arduino::StdioDevice" shape="rect" coords="352,448,518,472"/>
9999
<area href="classarduino_1_1_u_d_p.html" alt="arduino::UDP" shape="rect" coords="352,504,518,528"/>
100100
</map>
101101
</div></div>

docs/html/classarduino_1_1_stdio_device.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
</div><!--header-->
8282
<div class="contents">
8383

84-
<p>We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino environment;.
84+
<p>Provides a <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface for standard input/output operations outside the Arduino environment.
8585
<a href="classarduino_1_1_stdio_device.html#details">More...</a></p>
8686

8787
<p><code>#include &lt;<a class="el" href="_stdio_device_8h_source.html">StdioDevice.h</a>&gt;</code></p>
@@ -348,7 +348,15 @@
348348
<tr class="separator:ad4c57909d9181be38d19c61d6ff827ff inherit pro_methods_classarduino_1_1_print"><td class="memSeparator" colspan="2">&#160;</td></tr>
349349
</table>
350350
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
351-
<div class="textblock"><p>We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino environment;. </p>
351+
<div class="textblock"><p>Provides a <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface for standard input/output operations outside the Arduino environment. </p>
352+
<p>This class implements the Arduino <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface using standard C++ streams (std::cout and std::cin), allowing code that expects Arduino Serial-like objects to work in non-Arduino environments. It supports printing, reading, and flushing, and can be used to provide Serial, Serial1, and Serial2 objects for desktop or emulated environments. The class supports auto-flushing after each print/write operation.</p>
353+
<p>Key features:</p><ul>
354+
<li>Implements print, println, and write methods for various data types.</li>
355+
<li>Supports auto-flush to ensure output is immediately visible.</li>
356+
<li>Provides input methods compatible with Arduino's <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface.</li>
357+
<li>Can be used as a drop-in replacement for Serial in non-Arduino builds.</li>
358+
<li>Designed for use in emulators or desktop testing of Arduino code. </li>
359+
</ul>
352360
</div><h2 class="groupheader">Member Function Documentation</h2>
353361
<a id="aeb3810964d05ffaf89f280908172e455" name="aeb3810964d05ffaf89f280908172e455"></a>
354362
<h2 class="memtitle"><span class="permalink"><a href="#aeb3810964d05ffaf89f280908172e455">&#9670;&#160;</a></span>available()</h2>

docs/html/classarduino_1_1_stream.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<area href="classarduino_1_1_hardware_i2_c.html" alt="arduino::HardwareI2C" shape="rect" coords="176,280,342,304"/>
9696
<area href="classarduino_1_1_hardware_serial.html" alt="arduino::HardwareSerial" shape="rect" coords="176,336,342,360"/>
9797
<area href="classarduino_1_1_remote_serial_class.html" title="Remote Serial implementation that operates over a communication stream." alt="arduino::RemoteSerialClass" shape="rect" coords="176,392,342,416"/>
98-
<area href="classarduino_1_1_stdio_device.html" title="We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino e..." alt="arduino::StdioDevice" shape="rect" coords="176,448,342,472"/>
98+
<area href="classarduino_1_1_stdio_device.html" title="Provides a Stream interface for standard input/output operations outside the Arduino environment." alt="arduino::StdioDevice" shape="rect" coords="176,448,342,472"/>
9999
<area href="classarduino_1_1_u_d_p.html" alt="arduino::UDP" shape="rect" coords="176,504,342,528"/>
100100
</map>
101101
</div></div>

docs/html/hierarchy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
<tr id="row_17_1_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_17_1_4_" class="arrow" onclick="toggleFolder('17_1_4_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_hardware_serial.html" target="_self">arduino::HardwareSerial</a></td><td class="desc"></td></tr>
119119
<tr id="row_17_1_4_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_serial_impl.html" target="_self">arduino::SerialImpl</a></td><td class="desc"></td></tr>
120120
<tr id="row_17_1_5_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_remote_serial_class.html" target="_self">arduino::RemoteSerialClass</a></td><td class="desc">Remote Serial implementation that operates over a communication stream </td></tr>
121-
<tr id="row_17_1_6_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stdio_device.html" target="_self">arduino::StdioDevice</a></td><td class="desc">We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino environment; </td></tr>
121+
<tr id="row_17_1_6_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stdio_device.html" target="_self">arduino::StdioDevice</a></td><td class="desc">Provides a <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface for standard input/output operations outside the Arduino environment </td></tr>
122122
<tr id="row_17_1_7_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_17_1_7_" class="arrow" onclick="toggleFolder('17_1_7_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_u_d_p.html" target="_self">arduino::UDP</a></td><td class="desc"></td></tr>
123123
<tr id="row_17_1_7_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span id="arr_17_1_7_0_" class="arrow" onclick="toggleFolder('17_1_7_0_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_ethernet_u_d_p.html" target="_self">arduino::EthernetUDP</a></td><td class="desc"></td></tr>
124124
<tr id="row_17_1_7_0_0_" class="odd"><td class="entry"><span style="width:80px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_wi_fi_u_d_p_stream.html" target="_self">arduino::WiFiUDPStream</a></td><td class="desc"><a class="el" href="classarduino_1_1_u_d_p.html">UDP</a> <a class="el" href="classarduino_1_1_stream.html">Stream</a> implementation for single-target communication </td></tr>

docs/html/namespacearduino.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarduino_1_1_s_p_s_c_queue.html">SPSCQueue</a></td></tr>
202202
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
203203
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarduino_1_1_stdio_device.html">StdioDevice</a></td></tr>
204-
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino environment;. <a href="classarduino_1_1_stdio_device.html#details">More...</a><br /></td></tr>
204+
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface for standard input/output operations outside the Arduino environment. <a href="classarduino_1_1_stdio_device.html#details">More...</a><br /></td></tr>
205205
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
206206
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarduino_1_1_stream.html">Stream</a></td></tr>
207207
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>

docs/html/namespaces.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<tr id="row_0_44_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_s_p_i_source.html" target="_self">SPISource</a></td><td class="desc">Abstract interface for providing SPI hardware implementations </td></tr>
123123
<tr id="row_0_45_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_s_p_i_wrapper.html" target="_self">SPIWrapper</a></td><td class="desc">SPI wrapper class that provides flexible hardware abstraction </td></tr>
124124
<tr id="row_0_46_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_s_p_s_c_queue.html" target="_self">SPSCQueue</a></td><td class="desc"></td></tr>
125-
<tr id="row_0_47_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stdio_device.html" target="_self">StdioDevice</a></td><td class="desc">We use the SerialDef class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino environment; </td></tr>
125+
<tr id="row_0_47_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stdio_device.html" target="_self">StdioDevice</a></td><td class="desc">Provides a <a class="el" href="classarduino_1_1_stream.html">Stream</a> interface for standard input/output operations outside the Arduino environment </td></tr>
126126
<tr id="row_0_48_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_48_" class="arrow" onclick="toggleFolder('0_48_')">&#9660;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_stream.html" target="_self">Stream</a></td><td class="desc"></td></tr>
127127
<tr id="row_0_48_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structarduino_1_1_stream_1_1_multi_target.html" target="_self">MultiTarget</a></td><td class="desc"></td></tr>
128128
<tr id="row_0_49_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classarduino_1_1_string.html" target="_self">String</a></td><td class="desc"></td></tr>

0 commit comments

Comments
 (0)