Skip to content

Commit f120a54

Browse files
committed
Documentation updates.
1 parent d79c519 commit f120a54

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version=1.0
33
author=Christopher Baker <[email protected]>
44
maintainer=Christopher Baker <[email protected]>
55
sentence=A small, efficient library for sending serial data packets.
6-
paragraph=PacketSerial is an small, efficient, library that allows Arduinos to send and receive serial data packets that include bytes with any value (0-255). A packet is simply an array of bytes.
6+
paragraph=PacketSerial is an small, efficient, library that allows Arduinos to send and receive serial data packets that include bytes with any value (0-255). A packet is simply an array of bytes.
77
category=Communication
88
url=https://github.com/bakercp/PacketSerial
99
architectures=*

src/Encoding/COBS.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ class COBS
100100
/// \param size The size of the COBS-encoded buffer.
101101
/// \param destination The target buffer for the decoded bytes.
102102
/// \returns The number of bytes in the decoded buffer.
103-
/// \warning destination must have a minimum capacity of
104-
/// size
103+
/// \warning destination must have a minimum capacity of size.
105104
static size_t decode(const uint8_t* source, size_t size, uint8_t* destination)
106105
{
107106
size_t read_index = 0;

src/Encoding/SLIP.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
class SLIP
5151
{
5252
public:
53+
/// \brief Encode the given buffer.
54+
/// \param buffer A pointer to the buffer to be encoded.
55+
/// \param size The size of the buffer pointed to by \p buffer.
56+
/// \param encoded A pointer to the target encoded buffer. This buffer must have sufficient memory allocated.
57+
/// \returns The number of bytes written to the encoded \p buffer.
58+
/// \warning The encoded buffer must have at least getEncodedBufferSize() allocated.
5359
static size_t encode(const uint8_t* buffer, size_t size, uint8_t* encoded)
5460
{
5561
if (size == 0)
@@ -86,6 +92,12 @@ class SLIP
8692
return write_index;
8793
}
8894

95+
/// \brief Decode a SLIP-encoded buffer.
96+
/// \param source The SLIP-encoded buffer to decode.
97+
/// \param size The size of the SLIP-encoded buffer.
98+
/// \param destination The target buffer for the decoded bytes.
99+
/// \returns The number of bytes in the decoded buffer.
100+
/// \warning destination must have a minimum capacity of size.
89101
static size_t decode(const uint8_t* buffer, size_t size, uint8_t* decoded)
90102
{
91103
if (size == 0)
@@ -140,6 +152,7 @@ class SLIP
140152
return sourceSize * 2 + 2;
141153
}
142154

155+
/// \brief Key constants used in the SLIP protocol.
143156
enum
144157
{
145158
END = 0300,

0 commit comments

Comments
 (0)