Skip to content

Commit 296f73c

Browse files
committed
Improve documentation
1 parent a652c9f commit 296f73c

File tree

415 files changed

+28025
-19289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+28025
-19289
lines changed

ArduinoCore-Linux/cores/arduino/HardwareService.h

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace arduino {
66

77
/**
8-
* We virtualize the hardware and send the requests and replys over
8+
* @brief We virtualize the hardware and send the requests and replys over
99
* a stream.
1010
*
1111
**/
@@ -68,9 +68,28 @@ enum HWCalls {
6868
};
6969

7070
/**
71-
* Stream over which we tunnel the SPI, I2C, I2S and GPIO messages. Since most
72-
* embedded divices are little endian we communicate in little endian!
73-
**/
71+
* @class HardwareService
72+
* @brief Provides a virtualized hardware communication service for SPI, I2C, I2S, and GPIO over a stream.
73+
*
74+
* This class encapsulates the logic to tunnel hardware protocol messages (SPI, I2C, I2S, GPIO, Serial, etc.)
75+
* over a generic stream interface. It handles serialization and deserialization of protocol calls and data,
76+
* ensuring correct endianness (little endian by default for embedded devices). The class provides methods
77+
* to send and receive various data types, manage the underlying stream, and perform byte-swapping as needed.
78+
*
79+
* Key features:
80+
* - Tunnels hardware protocol messages over a stream (e.g., network, serial).
81+
* - Supports sending and receiving multiple data types with correct endianness.
82+
* - Provides blocking read with timeout for reliable communication.
83+
* - Handles byte order conversion for cross-platform compatibility.
84+
* - Can be used as a base for remote hardware emulation or proxying.
85+
*
86+
* Usage:
87+
* - Set the stream using setStream().
88+
* - Use send() methods to transmit protocol calls and data.
89+
* - Use receive methods to read responses from the remote hardware.
90+
* - Use flush() to ensure all data is sent.
91+
*
92+
*/
7493

7594
class HardwareService {
7695
public:

ArduinoCore-Linux/cores/arduino/HardwareSetupRemote.h

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,40 @@
1414
namespace arduino {
1515

1616
/**
17-
* Class which is used to configure the actual Hardware APIs
17+
* @class HardwareSetupRemote
18+
* @brief Configures and manages remote hardware interfaces for Arduino emulation.
19+
*
20+
* This class is responsible for setting up and managing remote hardware APIs such as I2C, SPI, and GPIO
21+
* over a network or stream interface. It provides mechanisms to assign protocol handlers to a communication
22+
* stream, perform handshakes with remote devices, and manage the lifecycle of hardware connections.
23+
*
24+
* Key features:
25+
* - Supports initialization via a stream or UDP port.
26+
* - Assigns remote protocol handlers (I2C, SPI, GPIO) to the provided stream.
27+
* - Optionally sets up global protocol objects for use throughout the application.
28+
* - Performs handshake with remote devices to ensure connectivity.
29+
* - Provides accessors for the underlying protocol handler objects.
30+
* - Manages cleanup and resource release on shutdown.
31+
*
32+
* Usage:
33+
* - Create an instance and call begin() with the desired configuration.
34+
* - Use getI2C(), getSPI(), and getGPIO() to access protocol handlers.
35+
* - Call end() to release resources when done.
36+
*
1837
*/
1938

20-
class HardwareSetupRemoteClass : public I2CSource,
39+
class HardwareSetupRemote : public I2CSource,
2140
public SPISource,
2241
public GPIOSource {
2342
public:
2443
/// default constructor: you need to call begin() afterwards
25-
HardwareSetupRemoteClass() = default;
44+
HardwareSetupRemote() = default;
2645

2746
/// HardwareSetup uses the indicated stream
28-
HardwareSetupRemoteClass(Stream& stream) { begin(&stream, false); }
47+
HardwareSetupRemote(Stream& stream) { begin(&stream, false); }
2948

3049
/// HardwareSetup that uses udp
31-
HardwareSetupRemoteClass(int port) { this->port = port; }
50+
HardwareSetupRemote(int port) { this->port = port; }
3251

3352
/// assigns the different protocols to the stream
3453
bool begin(Stream* s, bool asDefault = true, bool doHandShake = true) {
@@ -123,7 +142,7 @@ class HardwareSetupRemoteClass : public I2CSource,
123142
};
124143

125144
#if !defined(SKIP_HARDWARE_SETUP)
126-
static HardwareSetupRemoteClass Remote{7000};
145+
static HardwareSetupRemote Remote{7000};
127146
#endif
128147

129148
} // namespace arduino

docs/html/_arduino_8h_source.html

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

docs/html/_arduino_a_p_i_8h_source.html

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

docs/html/_arduino_logger_8h_source.html

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

docs/html/_binary_8h_source.html

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

docs/html/_can_msg_8h_source.html

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

docs/html/_can_msg_ringbuffer_8h_source.html

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

docs/html/_client_8h_source.html

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

docs/html/_common_8h_source.html

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

0 commit comments

Comments
 (0)