Skip to content

Commit 8f2d021

Browse files
committed
📝 docs(documentation): Update documentation
1 parent cdab6e5 commit 8f2d021

File tree

2 files changed

+25
-51
lines changed

2 files changed

+25
-51
lines changed

docs/index.rst

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,3 @@ Features
2323
* Support for various baud rates and communication parameters
2424
* Modern C++17 implementation
2525
* Exception-based error handling
26-
27-
Quick Start
28-
-----------
29-
30-
Here's a simple example of how to use libserial:
31-
32-
.. code-block:: cpp
33-
34-
#include <libserial/serial.hpp>
35-
#include <iostream>
36-
37-
int main() {
38-
try {
39-
libserial::Serial serial("/dev/ttyUSB0");
40-
serial.open();
41-
serial.write("Hello, World!");
42-
43-
std::string response = serial.read();
44-
std::cout << "Received: " << response << std::endl;
45-
46-
serial.close();
47-
} catch (const libserial::SerialException& e) {
48-
std::cerr << "Error: " << e.what() << std::endl;
49-
return 1;
50-
}
51-
52-
return 0;
53-
}
54-
55-
.. Indices and tables
56-
.. ==================
57-
58-
.. * :ref:`genindex`
59-
.. * :ref:`modindex`
60-
.. * :ref:`search`

docs/installation.rst

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Prerequisites
1010
To build libserial from source, you'll need:
1111

1212
* CMake (version 3.10 or higher)
13-
* A C++14 compatible compiler (GCC 5.4+ or Clang 3.4+)
13+
* A C++17 compatible compiler (GCC 5.4+ or Clang 3.4+)
1414
* Git (for cloning the repository)
1515

1616
For documentation generation (optional):
@@ -28,8 +28,8 @@ Building the Library
2828

2929
.. code-block:: bash
3030
31-
git clone https://github.com/NestorDP/libserial.git
32-
cd libserial
31+
git clone https://github.com/NestorDP/cppserial.git
32+
cd cppserial
3333
3434
2. Create a build directory:
3535

@@ -69,28 +69,37 @@ You can customize the build with various CMake options:
6969
# Install to a custom location
7070
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
7171
72-
Package Installation
73-
--------------------
72+
# Enable testing
73+
cmake -DBUILD_TESTING=ON ..
7474
75-
Ubuntu/Debian
76-
~~~~~~~~~~~~~
75+
# Enable coverage reports
76+
cmake -DENABLE_COVERAGE=ON ..
7777
78-
.. code-block:: bash
78+
# Enable documentation generation
79+
cmake -DBUILD_DOCUMENTATION=ON ..
80+
81+
.. Package Installation
82+
.. --------------------
83+
84+
.. Ubuntu/Debian
85+
.. ~~~~~~~~~~~~~
86+
87+
.. .. code-block:: bash
7988
80-
sudo apt update
81-
sudo apt install libserial-dev
89+
.. sudo apt update
90+
.. sudo apt install libserial-dev
8291
83-
(Note: Package availability depends on your distribution)
92+
.. (Note: Package availability depends on your distribution)
8493
85-
From Binary Releases
86-
~~~~~~~~~~~~~~~~~~~~~
94+
.. From Binary Releases
95+
.. ~~~~~~~~~~~~~~~~~~~~~
8796
88-
Download the latest release from the `GitHub releases page <https://github.com/NestorDP/libserial/releases>`_ and follow the installation instructions provided with the release.
97+
.. Download the latest release from the `GitHub releases page <https://github.com/NestorDP/cppserial/releases>`_ and follow the installation instructions provided with the release.
8998
9099
Verifying Installation
91100
----------------------
92101

93-
To verify that libserial is installed correctly, create a simple test program:
102+
To verify that cppserial is installed correctly, create a simple test program:
94103

95104
.. code-block:: cpp
96105
@@ -106,5 +115,5 @@ Compile and run:
106115

107116
.. code-block:: bash
108117
109-
g++ -std=c++14 test.cpp -lserial -o test
118+
g++ -std=c++17 test.cpp -lserial -o test
110119
./test

0 commit comments

Comments
 (0)