├── .gitignore ├── Doxyfile ├── LICENSE ├── README.md ├── doc └── html │ ├── annotated.html │ ├── annotated_dup.js │ ├── bc_s.png │ ├── bdwn.png │ ├── classes.html │ ├── classserialib-members.html │ ├── classserialib.html │ ├── classserialib.js │ ├── classtime_out-members.html │ ├── classtime_out.html │ ├── classtime_out.js │ ├── closed.png │ ├── dir_2df2faa64bc87c08198f883db7427042.html │ ├── dir_2df2faa64bc87c08198f883db7427042.js │ ├── dir_52713a7cd53474fec784a13806f62d5c.html │ ├── dir_97aefd0d527b934f1d99a682da8fe6a9.html │ ├── dir_97aefd0d527b934f1d99a682da8fe6a9.js │ ├── doc.png │ ├── doxygen.css │ ├── doxygen.png │ ├── doxygen.svg │ ├── dynsections.js │ ├── example1_2main_8cpp.html │ ├── example1_2main_8cpp.js │ ├── files.html │ ├── files.js │ ├── files_dup.js │ ├── folderclosed.png │ ├── folderopen.png │ ├── functions.html │ ├── functions_func.html │ ├── globals.html │ ├── globals_defs.html │ ├── globals_enum.html │ ├── globals_eval.html │ ├── globals_func.html │ ├── index.html │ ├── jquery.js │ ├── md__r_e_a_d_m_e.html │ ├── menu.js │ ├── menudata.js │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── navtree.css │ ├── navtree.js │ ├── navtreedata.js │ ├── navtreeindex0.js │ ├── open.png │ ├── pages.html │ ├── resize.js │ ├── search │ ├── all_0.html │ ├── all_0.js │ ├── all_1.html │ ├── all_1.js │ ├── all_2.html │ ├── all_2.js │ ├── all_3.html │ ├── all_3.js │ ├── all_4.html │ ├── all_4.js │ ├── all_5.html │ ├── all_5.js │ ├── all_6.html │ ├── all_6.js │ ├── all_7.html │ ├── all_7.js │ ├── all_8.html │ ├── all_8.js │ ├── all_9.html │ ├── all_9.js │ ├── all_a.html │ ├── all_a.js │ ├── all_b.html │ ├── all_b.js │ ├── all_c.html │ ├── all_c.js │ ├── all_d.html │ ├── all_d.js │ ├── classes_0.html │ ├── classes_0.js │ ├── classes_1.html │ ├── classes_1.js │ ├── close.png │ ├── close.svg │ ├── defines_0.html │ ├── defines_0.js │ ├── enums_0.html │ ├── enums_0.js │ ├── enumvalues_0.html │ ├── enumvalues_0.js │ ├── files_0.html │ ├── files_0.js │ ├── files_1.html │ ├── files_1.js │ ├── functions_0.html │ ├── functions_0.js │ ├── functions_1.html │ ├── functions_1.js │ ├── functions_2.html │ ├── functions_2.js │ ├── functions_3.html │ ├── functions_3.js │ ├── functions_4.html │ ├── functions_4.js │ ├── functions_5.html │ ├── functions_5.js │ ├── functions_6.html │ ├── functions_6.js │ ├── functions_7.html │ ├── functions_7.js │ ├── functions_8.html │ ├── functions_8.js │ ├── functions_9.html │ ├── functions_9.js │ ├── functions_a.html │ ├── functions_a.js │ ├── functions_b.html │ ├── functions_b.js │ ├── functions_c.html │ ├── functions_c.js │ ├── mag_sel.png │ ├── mag_sel.svg │ ├── nomatches.html │ ├── pages_0.html │ ├── pages_0.js │ ├── search.css │ ├── search.js │ ├── search_l.png │ ├── search_m.png │ ├── search_r.png │ └── searchdata.js │ ├── serialib_8cpp.html │ ├── serialib_8h.html │ ├── serialib_8h.js │ ├── serialib_8h_source.html │ ├── splitbar.png │ ├── sync_off.png │ ├── sync_on.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ └── tabs.css ├── example1 ├── example1.pro └── main.cpp ├── example2 ├── example2.pro └── main.cpp ├── example3 ├── arduino-code │ └── arduino-code.ino ├── example3.pro └── main.cpp ├── example4 ├── arduino-code │ └── arduino-code.ino ├── example4.pro └── main.cpp └── lib ├── serialib.cpp └── serialib.h /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/qtcreator 3 | # Edit at https://www.gitignore.io/?templates=qtcreator 4 | 5 | ### QtCreator ### 6 | # gitignore for Qt Creator like IDE for pure C/C++ project without Qt 7 | # 8 | # Reference: http://doc.qt.io/qtcreator/creator-project-generic.html 9 | 10 | 11 | 12 | # Qt Creator autogenerated files 13 | 14 | 15 | # A listing of all the files included in the project 16 | *.files 17 | 18 | # Include directories 19 | *.includes 20 | bin/ 21 | build*/ 22 | 23 | # Project configuration settings like predefined Macros 24 | *.config 25 | *.pro.user 26 | 27 | # Qt Creator settings 28 | *.creator 29 | 30 | # User project settings 31 | *.creator.user* 32 | 33 | # Qt Creator backups 34 | *.autosave 35 | 36 | # End of https://www.gitignore.io/api/qtcreator 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Fifi Lulu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Serialib 2 | 3 | Serialib is a simple C++ library for serial communication. 4 | * No dependencies 5 | * Only two files (serialib.h and serialib.cpp) 6 | * Cross-platform 7 | 8 | The library has been tested on Windows and Linux. This project has been developed 9 | with Qt Creator and succesfully compile with: 10 | * gcc on Linux 11 | * MinGW on Windows 12 | The library should work on Mac OS and be compiled with others IDE. 13 | 14 | 15 | More details on [Lulu's blog](https://lucidar.me/en/serialib/cross-plateform-rs232-serial-library/) 16 | 17 | ## Usage Examples 18 | 19 | * [How to list serial ports in C?](https://lucidar.me/en/serialib/scan-serial-ports/) 20 | * [How to read and write strings on serial port in C/C++](https://lucidar.me//en/serialib/read-and-write-strings-on-serial-port-in-c-cpp/) 21 | * [What are the most used baud rates?](https://lucidar.me/en/serialib/what-are-the-most-used-baud-rates/) 22 | 23 | ## Usefull Tools 24 | 25 | * [Most common baud rates table](https://lucidar.me/en/serialib/most-used-baud-rates-table/) 26 | * [Convert bauds to bits per second](https://lucidar.me/en/serialib/convert-bauds-to-bits-per-second/) 27 | * [Convert bauds to bytes per second](https://lucidar.me/en/serialib/convert-bauds-to-bytes-per-second/) 28 | -------------------------------------------------------------------------------- /doc/html/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: Class List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |
87 |
Class List
88 |
89 |
90 |
Here are the classes, structs, unions and interfaces with brief descriptions:
91 | 92 | 93 | 94 |
 CserialibThis class is used for communication over a serial device
 CtimeOutThis class can manage a timer which is used as a timeout
95 |
96 |
97 |
98 | 99 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/html/annotated_dup.js: -------------------------------------------------------------------------------- 1 | var annotated_dup = 2 | [ 3 | [ "serialib", "classserialib.html", "classserialib" ], 4 | [ "timeOut", "classtime_out.html", "classtime_out" ] 5 | ]; -------------------------------------------------------------------------------- /doc/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/bc_s.png -------------------------------------------------------------------------------- /doc/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/bdwn.png -------------------------------------------------------------------------------- /doc/html/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: Class Index 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |
87 |
Class Index
88 |
89 |
90 |
S | T
91 |
92 |
93 |
S
94 |
serialib
95 |
96 |
T
97 |
timeOut
98 |
99 |
100 |
101 | 102 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /doc/html/classserialib.js: -------------------------------------------------------------------------------- 1 | var classserialib = 2 | [ 3 | [ "serialib", "classserialib.html#a26166f63ad73013ca7cbcd2ae59edc91", null ], 4 | [ "~serialib", "classserialib.html#ac44215001ae198f2c196bb7993327a4b", null ], 5 | [ "available", "classserialib.html#a50c91bf8cab23afdfdf05ca58392456f", null ], 6 | [ "clearDTR", "classserialib.html#adf49bff6401d3101b41fb52e98309635", null ], 7 | [ "clearRTS", "classserialib.html#ab0b5882339240002fccf7701f5321e0a", null ], 8 | [ "closeDevice", "classserialib.html#a8a1c8803c8df1a19222d6006328534b8", null ], 9 | [ "DTR", "classserialib.html#a3dc0ec56e84ab2b43dc02fc2e02148a1", null ], 10 | [ "flushReceiver", "classserialib.html#a572dd8d208511ec81d848de72cb05c7a", null ], 11 | [ "isCTS", "classserialib.html#aca544a6f8dfa33f8e771713646768215", null ], 12 | [ "isDCD", "classserialib.html#a5f451a5eea7c8c1bdcff684ba131d6ff", null ], 13 | [ "isDSR", "classserialib.html#a3f1f0894543dfb17955de50157965dd7", null ], 14 | [ "isDTR", "classserialib.html#a4ec78286be81602bf1df44a4eb8372a8", null ], 15 | [ "isRI", "classserialib.html#a605d8a8015fadb5db5521350aefe084e", null ], 16 | [ "isRTS", "classserialib.html#ab2b121af07fb732f82668f6a14e93cfb", null ], 17 | [ "openDevice", "classserialib.html#afcef685b74a3db58dc2d1898bb34aaca", null ], 18 | [ "readBytes", "classserialib.html#ab05e51ff3bc47c02d7d000d58b45a961", null ], 19 | [ "readChar", "classserialib.html#a6c78b8a11ae7b8af57eea3dbc7fa237b", null ], 20 | [ "readString", "classserialib.html#ab155c84352ddefe1304d391c19497ac1", null ], 21 | [ "RTS", "classserialib.html#a5a73f159762fa4d5c252f36acfe7ab47", null ], 22 | [ "setDTR", "classserialib.html#a7564b9e28b1b50675d9d6d3fabc896c0", null ], 23 | [ "setRTS", "classserialib.html#a21767ffe86a76f300a71c496fbcc26a1", null ], 24 | [ "writeBytes", "classserialib.html#aa14196b6f422584bf5eebc4ddb71d483", null ], 25 | [ "writeChar", "classserialib.html#aa6d231cb99664a613bcb503830f73497", null ], 26 | [ "writeString", "classserialib.html#a6a32655c718b998e5b63d8cdc483ac6d", null ] 27 | ]; -------------------------------------------------------------------------------- /doc/html/classtime_out-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |
87 |
timeOut Member List
88 |
89 |
90 | 91 |

This is the complete list of members for timeOut, including all inherited members.

92 | 93 | 94 | 95 | 96 |
elapsedTime_ms()timeOut
initTimer()timeOut
timeOut()timeOut
97 |
98 | 99 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /doc/html/classtime_out.js: -------------------------------------------------------------------------------- 1 | var classtime_out = 2 | [ 3 | [ "timeOut", "classtime_out.html#a2cffa89f7b90e4501e07e8cb7ccb3117", null ], 4 | [ "elapsedTime_ms", "classtime_out.html#af5db5b5f0db4f6ada19187ef8f214214", null ], 5 | [ "initTimer", "classtime_out.html#a88b4caef4ce7bfc42b73a61589c098e8", null ] 6 | ]; -------------------------------------------------------------------------------- /doc/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/closed.png -------------------------------------------------------------------------------- /doc/html/dir_2df2faa64bc87c08198f883db7427042.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: example1 Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 36 | 37 | 38 |
31 |
Serialib 32 |  2.0 33 |
34 |
Multi plateform serial library
35 |
39 |
40 | 41 | 42 | 45 | 46 | 47 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 68 |
69 | 70 |
74 |
75 | 76 | 77 |
78 | 81 |
82 | 83 |
84 |
85 |
example1 Directory Reference
86 |
87 |
88 | 89 | 91 | 92 | 93 | 94 |

90 | Files

file  main.cpp
 File containing example of serial port communication.
 
95 |
96 |
97 | 98 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /doc/html/dir_2df2faa64bc87c08198f883db7427042.js: -------------------------------------------------------------------------------- 1 | var dir_2df2faa64bc87c08198f883db7427042 = 2 | [ 3 | [ "main.cpp", "example1_2main_8cpp.html", "example1_2main_8cpp" ] 4 | ]; -------------------------------------------------------------------------------- /doc/html/dir_52713a7cd53474fec784a13806f62d5c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: example2 Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 36 | 37 | 38 |
31 |
Serialib 32 |  2.0 33 |
34 |
Multi plateform serial library
35 |
39 |
40 | 41 | 42 | 45 | 46 | 47 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 68 |
69 | 70 |
74 |
75 | 76 | 77 |
78 | 81 |
82 | 83 |
84 |
85 |
example2 Directory Reference
86 |
87 |
88 |
89 |
90 | 91 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /doc/html/dir_97aefd0d527b934f1d99a682da8fe6a9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: lib Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |
87 |
lib Directory Reference
88 |
89 |
90 | 91 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |

92 | Files

file  serialib.cpp
 Source file of the class serialib. This class is used for communication over a serial device.
 
file  serialib.h [code]
 Header file of the class serialib. This class is used for communication over a serial device.
 
100 |
101 |
102 | 103 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /doc/html/dir_97aefd0d527b934f1d99a682da8fe6a9.js: -------------------------------------------------------------------------------- 1 | var dir_97aefd0d527b934f1d99a682da8fe6a9 = 2 | [ 3 | [ "serialib.cpp", "serialib_8cpp.html", null ], 4 | [ "serialib.h", "serialib_8h.html", "serialib_8h" ] 5 | ]; -------------------------------------------------------------------------------- /doc/html/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/doc.png -------------------------------------------------------------------------------- /doc/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/doxygen.png -------------------------------------------------------------------------------- /doc/html/dynsections.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | function toggleVisibility(linkObj) 26 | { 27 | var base = $(linkObj).attr('id'); 28 | var summary = $('#'+base+'-summary'); 29 | var content = $('#'+base+'-content'); 30 | var trigger = $('#'+base+'-trigger'); 31 | var src=$(trigger).attr('src'); 32 | if (content.is(':visible')===true) { 33 | content.hide(); 34 | summary.show(); 35 | $(linkObj).addClass('closed').removeClass('opened'); 36 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 37 | } else { 38 | content.show(); 39 | summary.hide(); 40 | $(linkObj).removeClass('closed').addClass('opened'); 41 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 42 | } 43 | return false; 44 | } 45 | 46 | function updateStripes() 47 | { 48 | $('table.directory tr'). 49 | removeClass('even').filter(':visible:even').addClass('even'); 50 | } 51 | 52 | function toggleLevel(level) 53 | { 54 | $('table.directory tr').each(function() { 55 | var l = this.id.split('_').length-1; 56 | var i = $('#img'+this.id.substring(3)); 57 | var a = $('#arr'+this.id.substring(3)); 58 | if (l 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: example1/main.cpp File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 36 | 37 | 38 |
31 |
Serialib 32 |  2.0 33 |
34 |
Multi plateform serial library
35 |
39 |
40 | 41 | 42 | 45 | 46 | 47 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 68 |
69 | 70 |
74 |
75 | 76 | 77 |
78 | 81 |
82 | 83 |
84 |
85 | Functions
86 |
87 |
main.cpp File Reference
88 |
89 |
90 | 91 |

File containing example of serial port communication. 92 | More...

93 |
#include "../lib/serialib.h"
94 | #include <unistd.h>
95 |
96 | 98 | 99 | 100 | 101 |

97 | Functions

int main ()
 main Simple example that send ASCII characters to the serial device More...
 
102 |

Detailed Description

103 |

File containing example of serial port communication.

104 |
Author
Philippe Lucidarme
105 |
Date
December 2019 This example send the ASCII table through the serial device
106 |
See also
https://lucidar.me
107 |

Function Documentation

108 | 109 |

◆ main()

110 | 111 |
112 |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
int main ()
121 |
122 | 123 |

main Simple example that send ASCII characters to the serial device

124 |
Returns
0 : success <0 : an error occured
125 | 126 |
127 |
128 |
129 |
130 | 131 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /doc/html/example1_2main_8cpp.js: -------------------------------------------------------------------------------- 1 | var example1_2main_8cpp = 2 | [ 3 | [ "main", "example1_2main_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ] 4 | ]; -------------------------------------------------------------------------------- /doc/html/files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: File List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |
87 |
File List
88 |
89 |
90 |
Here is a list of all documented files with brief descriptions:
91 |
[detail level 12]
92 | 93 | 94 | 95 |
  lib
 serialib.cppSource file of the class serialib. This class is used for communication over a serial device
 serialib.hHeader file of the class serialib. This class is used for communication over a serial device
96 |
97 |
98 |
99 | 100 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/html/files.js: -------------------------------------------------------------------------------- 1 | var files = 2 | [ 3 | [ "example1", "dir_2df2faa64bc87c08198f883db7427042.html", "dir_2df2faa64bc87c08198f883db7427042" ], 4 | [ "lib", "dir_97aefd0d527b934f1d99a682da8fe6a9.html", "dir_97aefd0d527b934f1d99a682da8fe6a9" ] 5 | ]; -------------------------------------------------------------------------------- /doc/html/files_dup.js: -------------------------------------------------------------------------------- 1 | var files_dup = 2 | [ 3 | [ "lib", "dir_97aefd0d527b934f1d99a682da8fe6a9.html", "dir_97aefd0d527b934f1d99a682da8fe6a9" ] 4 | ]; -------------------------------------------------------------------------------- /doc/html/folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/folderclosed.png -------------------------------------------------------------------------------- /doc/html/folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/folderopen.png -------------------------------------------------------------------------------- /doc/html/globals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: File Members 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |
Here is a list of all documented file members with links to the documentation:
139 |
140 |
141 | 142 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /doc/html/globals_defs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: File Members 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |   91 |
92 |
93 | 94 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /doc/html/globals_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: File Members 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |   97 |
98 |
99 | 100 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/html/globals_eval.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: File Members 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |   127 |
128 |
129 | 130 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /doc/html/globals_func.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: File Members 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 36 | 37 | 38 |
31 |
Serialib 32 |  2.0 33 |
34 |
Multi plateform serial library
35 |
39 |
40 | 41 | 42 | 45 | 46 | 47 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 68 |
69 | 70 |
74 |
75 | 76 | 77 |
78 | 81 |
82 | 83 |
84 |   89 |
90 |
91 | 92 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /doc/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: Main Page 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 33 | 34 | 35 |
28 |
Serialib 29 |  2.0 30 |
31 |
Multi plateform serial library
32 |
36 |
37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 70 |
71 | 72 |
76 |
77 | 78 | 79 |
80 | 83 |
84 | 85 |
86 |
87 |
Serialib Documentation
88 |
89 |
90 |
91 |
92 | 93 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /doc/html/md__r_e_a_d_m_e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: serialib 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 36 | 37 | 38 |
31 |
Serialib 32 |  2.0 33 |
34 |
Multi plateform serial library
35 |
39 |
40 | 41 | 42 | 45 | 46 | 47 | 53 | 54 |
55 |
56 | 61 |
63 |
64 |
65 | 68 |
69 | 70 |
74 |
75 | 76 | 77 |
78 | 81 |
82 | 83 |
84 |
85 |
serialib
86 |
87 |
88 |

Serialib is a simple C++ library for serial communication. The library has been designed to work under Linux and Windows.

89 |

More details on Lulu's blog

90 |
91 |
92 | 93 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /doc/html/menu.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { 26 | function makeTree(data,relPath) { 27 | var result=''; 28 | if ('children' in data) { 29 | result+=''; 36 | } 37 | return result; 38 | } 39 | 40 | $('#main-nav').append(makeTree(menudata,relPath)); 41 | $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); 42 | if (searchEnabled) { 43 | if (serverSide) { 44 | $('#main-menu').append('
  • '); 45 | } else { 46 | $('#main-menu').append('
  • '); 47 | } 48 | } 49 | $('#main-menu').smartmenus(); 50 | } 51 | /* @license-end */ 52 | -------------------------------------------------------------------------------- /doc/html/menudata.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | var menudata={children:[ 26 | {text:"Main Page",url:"index.html"}, 27 | {text:"Classes",url:"annotated.html",children:[ 28 | {text:"Class List",url:"annotated.html"}, 29 | {text:"Class Index",url:"classes.html"}, 30 | {text:"Class Members",url:"functions.html",children:[ 31 | {text:"All",url:"functions.html"}, 32 | {text:"Functions",url:"functions_func.html"}]}]}, 33 | {text:"Files",url:"files.html",children:[ 34 | {text:"File List",url:"files.html"}, 35 | {text:"File Members",url:"globals.html",children:[ 36 | {text:"All",url:"globals.html"}, 37 | {text:"Enumerations",url:"globals_enum.html"}, 38 | {text:"Enumerator",url:"globals_eval.html"}, 39 | {text:"Macros",url:"globals_defs.html"}]}]}]} 40 | -------------------------------------------------------------------------------- /doc/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/nav_f.png -------------------------------------------------------------------------------- /doc/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/nav_g.png -------------------------------------------------------------------------------- /doc/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/nav_h.png -------------------------------------------------------------------------------- /doc/html/navtree.css: -------------------------------------------------------------------------------- 1 | #nav-tree .children_ul { 2 | margin:0; 3 | padding:4px; 4 | } 5 | 6 | #nav-tree ul { 7 | list-style:none outside none; 8 | margin:0px; 9 | padding:0px; 10 | } 11 | 12 | #nav-tree li { 13 | white-space:nowrap; 14 | margin:0px; 15 | padding:0px; 16 | } 17 | 18 | #nav-tree .plus { 19 | margin:0px; 20 | } 21 | 22 | #nav-tree .selected { 23 | background-image: url('tab_a.png'); 24 | background-repeat:repeat-x; 25 | color: #fff; 26 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 27 | } 28 | 29 | #nav-tree img { 30 | margin:0px; 31 | padding:0px; 32 | border:0px; 33 | vertical-align: middle; 34 | } 35 | 36 | #nav-tree a { 37 | text-decoration:none; 38 | padding:0px; 39 | margin:0px; 40 | outline:none; 41 | } 42 | 43 | #nav-tree .label { 44 | margin:0px; 45 | padding:0px; 46 | font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 47 | } 48 | 49 | #nav-tree .label a { 50 | padding:2px; 51 | } 52 | 53 | #nav-tree .selected a { 54 | text-decoration:none; 55 | color:#fff; 56 | } 57 | 58 | #nav-tree .children_ul { 59 | margin:0px; 60 | padding:0px; 61 | } 62 | 63 | #nav-tree .item { 64 | margin:0px; 65 | padding:0px; 66 | } 67 | 68 | #nav-tree { 69 | padding: 0px 0px; 70 | background-color: #FAFAFF; 71 | font-size:14px; 72 | overflow:auto; 73 | } 74 | 75 | #doc-content { 76 | overflow:auto; 77 | display:block; 78 | padding:0px; 79 | margin:0px; 80 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 81 | } 82 | 83 | #side-nav { 84 | padding:0 6px 0 0; 85 | margin: 0px; 86 | display:block; 87 | position: absolute; 88 | left: 0px; 89 | width: 250px; 90 | } 91 | 92 | .ui-resizable .ui-resizable-handle { 93 | display:block; 94 | } 95 | 96 | .ui-resizable-e { 97 | background-image:url("splitbar.png"); 98 | background-size:100%; 99 | background-repeat:repeat-y; 100 | background-attachment: scroll; 101 | cursor:ew-resize; 102 | height:100%; 103 | right:0; 104 | top:0; 105 | width:6px; 106 | } 107 | 108 | .ui-resizable-handle { 109 | display:none; 110 | font-size:0.1px; 111 | position:absolute; 112 | z-index:1; 113 | } 114 | 115 | #nav-tree-contents { 116 | margin: 6px 0px 0px 0px; 117 | } 118 | 119 | #nav-tree { 120 | background-image:url('nav_h.png'); 121 | background-repeat:repeat-x; 122 | background-color: #F9FAFC; 123 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 124 | } 125 | 126 | #nav-sync { 127 | position:absolute; 128 | top:5px; 129 | right:24px; 130 | z-index:0; 131 | } 132 | 133 | #nav-sync img { 134 | opacity:0.3; 135 | } 136 | 137 | #nav-sync img:hover { 138 | opacity:0.9; 139 | } 140 | 141 | @media print 142 | { 143 | #nav-tree { display: none; } 144 | div.ui-resizable-handle { display: none; position: relative; } 145 | } 146 | 147 | -------------------------------------------------------------------------------- /doc/html/navtreedata.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | var NAVTREE = 26 | [ 27 | [ "Serialib", "index.html", [ 28 | [ "Classes", "annotated.html", [ 29 | [ "Class List", "annotated.html", "annotated_dup" ], 30 | [ "Class Index", "classes.html", null ], 31 | [ "Class Members", "functions.html", [ 32 | [ "All", "functions.html", null ], 33 | [ "Functions", "functions_func.html", null ] 34 | ] ] 35 | ] ], 36 | [ "Files", "files.html", [ 37 | [ "File List", "files.html", "files_dup" ], 38 | [ "File Members", "globals.html", [ 39 | [ "All", "globals.html", null ], 40 | [ "Enumerations", "globals_enum.html", null ], 41 | [ "Enumerator", "globals_eval.html", null ], 42 | [ "Macros", "globals_defs.html", null ] 43 | ] ] 44 | ] ] 45 | ] ] 46 | ]; 47 | 48 | var NAVTREEINDEX = 49 | [ 50 | "annotated.html" 51 | ]; 52 | 53 | var SYNCONMSG = 'click to disable panel synchronisation'; 54 | var SYNCOFFMSG = 'click to enable panel synchronisation'; -------------------------------------------------------------------------------- /doc/html/navtreeindex0.js: -------------------------------------------------------------------------------- 1 | var NAVTREEINDEX0 = 2 | { 3 | "annotated.html":[0,0], 4 | "classes.html":[0,1], 5 | "classserialib.html":[0,0,0], 6 | "classserialib.html#a21767ffe86a76f300a71c496fbcc26a1":[0,0,0,20], 7 | "classserialib.html#a26166f63ad73013ca7cbcd2ae59edc91":[0,0,0,0], 8 | "classserialib.html#a3dc0ec56e84ab2b43dc02fc2e02148a1":[0,0,0,6], 9 | "classserialib.html#a3f1f0894543dfb17955de50157965dd7":[0,0,0,10], 10 | "classserialib.html#a4ec78286be81602bf1df44a4eb8372a8":[0,0,0,11], 11 | "classserialib.html#a50c91bf8cab23afdfdf05ca58392456f":[0,0,0,2], 12 | "classserialib.html#a572dd8d208511ec81d848de72cb05c7a":[0,0,0,7], 13 | "classserialib.html#a5a73f159762fa4d5c252f36acfe7ab47":[0,0,0,18], 14 | "classserialib.html#a5f451a5eea7c8c1bdcff684ba131d6ff":[0,0,0,9], 15 | "classserialib.html#a605d8a8015fadb5db5521350aefe084e":[0,0,0,12], 16 | "classserialib.html#a6a32655c718b998e5b63d8cdc483ac6d":[0,0,0,23], 17 | "classserialib.html#a6c78b8a11ae7b8af57eea3dbc7fa237b":[0,0,0,16], 18 | "classserialib.html#a7564b9e28b1b50675d9d6d3fabc896c0":[0,0,0,19], 19 | "classserialib.html#a8a1c8803c8df1a19222d6006328534b8":[0,0,0,5], 20 | "classserialib.html#aa14196b6f422584bf5eebc4ddb71d483":[0,0,0,21], 21 | "classserialib.html#aa6d231cb99664a613bcb503830f73497":[0,0,0,22], 22 | "classserialib.html#ab05e51ff3bc47c02d7d000d58b45a961":[0,0,0,15], 23 | "classserialib.html#ab0b5882339240002fccf7701f5321e0a":[0,0,0,4], 24 | "classserialib.html#ab155c84352ddefe1304d391c19497ac1":[0,0,0,17], 25 | "classserialib.html#ab2b121af07fb732f82668f6a14e93cfb":[0,0,0,13], 26 | "classserialib.html#ac44215001ae198f2c196bb7993327a4b":[0,0,0,1], 27 | "classserialib.html#aca544a6f8dfa33f8e771713646768215":[0,0,0,8], 28 | "classserialib.html#adf49bff6401d3101b41fb52e98309635":[0,0,0,3], 29 | "classserialib.html#afcef685b74a3db58dc2d1898bb34aaca":[0,0,0,14], 30 | "classtime_out.html":[0,0,1], 31 | "classtime_out.html#a2cffa89f7b90e4501e07e8cb7ccb3117":[0,0,1,0], 32 | "classtime_out.html#a88b4caef4ce7bfc42b73a61589c098e8":[0,0,1,2], 33 | "classtime_out.html#af5db5b5f0db4f6ada19187ef8f214214":[0,0,1,1], 34 | "dir_97aefd0d527b934f1d99a682da8fe6a9.html":[1,0,0], 35 | "files.html":[1,0], 36 | "functions.html":[0,2,0], 37 | "functions_func.html":[0,2,1], 38 | "globals.html":[1,1,0], 39 | "globals_defs.html":[1,1,3], 40 | "globals_enum.html":[1,1,1], 41 | "globals_eval.html":[1,1,2], 42 | "index.html":[], 43 | "pages.html":[], 44 | "serialib_8cpp.html":[1,0,0,0], 45 | "serialib_8h.html":[1,0,0,1], 46 | "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7":[1,0,0,1,3], 47 | "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a0af46a1b1917daf04f071cc62409b1d0":[1,0,0,1,3,0], 48 | "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a5c284f8eb4f32fa561544a95e506227d":[1,0,0,1,3,4], 49 | "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7ae7d27f5b5b60277dccbadd399897606d":[1,0,0,1,3,3], 50 | "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7aeaccb09be92b75b1ac6a327eb21fb161":[1,0,0,1,3,2], 51 | "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7af037109ad2db2f77d36c2a9806b23978":[1,0,0,1,3,1], 52 | "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6":[1,0,0,1,4], 53 | "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a0392c989829d4e47a2cc54a12cb6125a":[1,0,0,1,4,1], 54 | "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a10bed0b14962edaf7e883bf186d4773b":[1,0,0,1,4,4], 55 | "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a2ba4057e060ceb427fb3105ef629ccf6":[1,0,0,1,4,3], 56 | "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a38bc0d79b89ff9341767232da5448fe8":[1,0,0,1,4,0], 57 | "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6ab3213e8e4b9f1199aac388ed1b671a6e":[1,0,0,1,4,2], 58 | "serialib_8h.html#a86d500a34c624c2cae56bc25a31b12f3":[1,0,0,1,2], 59 | "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654":[1,0,0,1,5], 60 | "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a031c032346661741186af9d0680782ec":[1,0,0,1,5,2], 61 | "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5d487c59b00736410f8512b345ce6a0d":[1,0,0,1,5,0], 62 | "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5e9a6cef3d12988dba0fa9b9053ec3cc":[1,0,0,1,5,1], 63 | "serialib_8h_source.html":[1,0,0,1] 64 | }; 65 | -------------------------------------------------------------------------------- /doc/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/open.png -------------------------------------------------------------------------------- /doc/html/pages.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: Related Pages 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
    26 |
    27 | 28 | 29 | 30 | 36 | 37 | 38 |
    31 |
    Serialib 32 |  2.0 33 |
    34 |
    Multi plateform serial library
    35 |
    39 |
    40 | 41 | 42 | 45 | 46 | 47 | 53 | 54 |
    55 |
    56 | 61 |
    63 |
    64 |
    65 | 68 |
    69 | 70 |
    74 |
    75 | 76 | 77 |
    78 | 81 |
    82 | 83 |
    84 |
    85 |
    Related Pages
    86 |
    87 |
    88 |
    Here is a list of all related documentation pages:
    89 | 90 | 91 |
     serialib
    92 |
    93 |
    94 |
    95 | 96 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /doc/html/resize.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | function initResizable() 26 | { 27 | var cookie_namespace = 'doxygen'; 28 | var sidenav,navtree,content,header,collapsed,collapsedWidth=0,barWidth=6,desktop_vp=768,titleHeight; 29 | 30 | function readCookie(cookie) 31 | { 32 | var myCookie = cookie_namespace+"_"+cookie+"="; 33 | if (document.cookie) { 34 | var index = document.cookie.indexOf(myCookie); 35 | if (index != -1) { 36 | var valStart = index + myCookie.length; 37 | var valEnd = document.cookie.indexOf(";", valStart); 38 | if (valEnd == -1) { 39 | valEnd = document.cookie.length; 40 | } 41 | var val = document.cookie.substring(valStart, valEnd); 42 | return val; 43 | } 44 | } 45 | return 0; 46 | } 47 | 48 | function writeCookie(cookie, val, expiration) 49 | { 50 | if (val==undefined) return; 51 | if (expiration == null) { 52 | var date = new Date(); 53 | date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week 54 | expiration = date.toGMTString(); 55 | } 56 | document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; 57 | } 58 | 59 | function resizeWidth() 60 | { 61 | var windowWidth = $(window).width() + "px"; 62 | var sidenavWidth = $(sidenav).outerWidth(); 63 | content.css({marginLeft:parseInt(sidenavWidth)+"px"}); 64 | writeCookie('width',sidenavWidth-barWidth, null); 65 | } 66 | 67 | function restoreWidth(navWidth) 68 | { 69 | var windowWidth = $(window).width() + "px"; 70 | content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); 71 | sidenav.css({width:navWidth + "px"}); 72 | } 73 | 74 | function resizeHeight() 75 | { 76 | var headerHeight = header.outerHeight(); 77 | var footerHeight = footer.outerHeight(); 78 | var windowHeight = $(window).height() - headerHeight - footerHeight; 79 | content.css({height:windowHeight + "px"}); 80 | navtree.css({height:windowHeight + "px"}); 81 | sidenav.css({height:windowHeight + "px"}); 82 | var width=$(window).width(); 83 | if (width!=collapsedWidth) { 84 | if (width=desktop_vp) { 85 | if (!collapsed) { 86 | collapseExpand(); 87 | } 88 | } else if (width>desktop_vp && collapsedWidth0) { 103 | restoreWidth(0); 104 | collapsed=true; 105 | } 106 | else { 107 | var width = readCookie('width'); 108 | if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } 109 | collapsed=false; 110 | } 111 | } 112 | 113 | header = $("#top"); 114 | sidenav = $("#side-nav"); 115 | content = $("#doc-content"); 116 | navtree = $("#nav-tree"); 117 | footer = $("#nav-path"); 118 | $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); 119 | $(sidenav).resizable({ minWidth: 0 }); 120 | $(window).resize(function() { resizeHeight(); }); 121 | var device = navigator.userAgent.toLowerCase(); 122 | var touch_device = device.match(/(iphone|ipod|ipad|android)/); 123 | if (touch_device) { /* wider split bar for touch only devices */ 124 | $(sidenav).css({ paddingRight:'20px' }); 125 | $('.ui-resizable-e').css({ width:'20px' }); 126 | $('#nav-sync').css({ right:'34px' }); 127 | barWidth=20; 128 | } 129 | var width = readCookie('width'); 130 | if (width) { restoreWidth(width); } else { resizeWidth(); } 131 | resizeHeight(); 132 | var url = location.href; 133 | var i=url.indexOf("#"); 134 | if (i>=0) window.location.hash=url.substr(i); 135 | var _preventDefault = function(evt) { evt.preventDefault(); }; 136 | $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); 137 | $(".ui-resizable-handle").dblclick(collapseExpand); 138 | $(window).on('load',resizeHeight); 139 | } 140 | /* @license-end */ 141 | -------------------------------------------------------------------------------- /doc/html/search/all_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['available_0',['available',['../classserialib.html#a50c91bf8cab23afdfdf05ca58392456f',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['cleardtr_1',['clearDTR',['../classserialib.html#adf49bff6401d3101b41fb52e98309635',1,'serialib']]], 4 | ['clearrts_2',['clearRTS',['../classserialib.html#ab0b5882339240002fccf7701f5321e0a',1,'serialib']]], 5 | ['closedevice_3',['closeDevice',['../classserialib.html#a8a1c8803c8df1a19222d6006328534b8',1,'serialib']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/all_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['dtr_4',['DTR',['../classserialib.html#a3dc0ec56e84ab2b43dc02fc2e02148a1',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['elapsedtime_5fms_5',['elapsedTime_ms',['../classtime_out.html#af5db5b5f0db4f6ada19187ef8f214214',1,'timeOut']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['flushreceiver_6',['flushReceiver',['../classserialib.html#a572dd8d208511ec81d848de72cb05c7a',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['inittimer_7',['initTimer',['../classtime_out.html#a88b4caef4ce7bfc42b73a61589c098e8',1,'timeOut']]], 4 | ['iscts_8',['isCTS',['../classserialib.html#aca544a6f8dfa33f8e771713646768215',1,'serialib']]], 5 | ['isdcd_9',['isDCD',['../classserialib.html#a5f451a5eea7c8c1bdcff684ba131d6ff',1,'serialib']]], 6 | ['isdsr_10',['isDSR',['../classserialib.html#a3f1f0894543dfb17955de50157965dd7',1,'serialib']]], 7 | ['isdtr_11',['isDTR',['../classserialib.html#a4ec78286be81602bf1df44a4eb8372a8',1,'serialib']]], 8 | ['isri_12',['isRI',['../classserialib.html#a605d8a8015fadb5db5521350aefe084e',1,'serialib']]], 9 | ['isrts_13',['isRTS',['../classserialib.html#ab2b121af07fb732f82668f6a14e93cfb',1,'serialib']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /doc/html/search/all_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['opendevice_14',['openDevice',['../classserialib.html#afcef685b74a3db58dc2d1898bb34aaca',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['readbytes_15',['readBytes',['../classserialib.html#ab05e51ff3bc47c02d7d000d58b45a961',1,'serialib']]], 4 | ['readchar_16',['readChar',['../classserialib.html#a6c78b8a11ae7b8af57eea3dbc7fa237b',1,'serialib']]], 5 | ['readstring_17',['readString',['../classserialib.html#ab155c84352ddefe1304d391c19497ac1',1,'serialib']]], 6 | ['rts_18',['RTS',['../classserialib.html#a5a73f159762fa4d5c252f36acfe7ab47',1,'serialib']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/html/search/all_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serial_5fdatabits_5f16_19',['SERIAL_DATABITS_16',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a5c284f8eb4f32fa561544a95e506227d',1,'serialib.h']]], 4 | ['serial_5fdatabits_5f5_20',['SERIAL_DATABITS_5',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a0af46a1b1917daf04f071cc62409b1d0',1,'serialib.h']]], 5 | ['serial_5fdatabits_5f6_21',['SERIAL_DATABITS_6',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7af037109ad2db2f77d36c2a9806b23978',1,'serialib.h']]], 6 | ['serial_5fdatabits_5f7_22',['SERIAL_DATABITS_7',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7aeaccb09be92b75b1ac6a327eb21fb161',1,'serialib.h']]], 7 | ['serial_5fdatabits_5f8_23',['SERIAL_DATABITS_8',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7ae7d27f5b5b60277dccbadd399897606d',1,'serialib.h']]], 8 | ['serial_5fparity_5feven_24',['SERIAL_PARITY_EVEN',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a0392c989829d4e47a2cc54a12cb6125a',1,'serialib.h']]], 9 | ['serial_5fparity_5fmark_25',['SERIAL_PARITY_MARK',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a2ba4057e060ceb427fb3105ef629ccf6',1,'serialib.h']]], 10 | ['serial_5fparity_5fnone_26',['SERIAL_PARITY_NONE',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a38bc0d79b89ff9341767232da5448fe8',1,'serialib.h']]], 11 | ['serial_5fparity_5fodd_27',['SERIAL_PARITY_ODD',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6ab3213e8e4b9f1199aac388ed1b671a6e',1,'serialib.h']]], 12 | ['serial_5fparity_5fspace_28',['SERIAL_PARITY_SPACE',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a10bed0b14962edaf7e883bf186d4773b',1,'serialib.h']]], 13 | ['serial_5fstopbits_5f1_29',['SERIAL_STOPBITS_1',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5d487c59b00736410f8512b345ce6a0d',1,'serialib.h']]], 14 | ['serial_5fstopbits_5f1_5f5_30',['SERIAL_STOPBITS_1_5',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5e9a6cef3d12988dba0fa9b9053ec3cc',1,'serialib.h']]], 15 | ['serial_5fstopbits_5f2_31',['SERIAL_STOPBITS_2',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a031c032346661741186af9d0680782ec',1,'serialib.h']]], 16 | ['serialdatabits_32',['SerialDataBits',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7',1,'serialib.h']]], 17 | ['serialib_33',['serialib',['../classserialib.html',1,'serialib'],['../classserialib.html#a26166f63ad73013ca7cbcd2ae59edc91',1,'serialib::serialib()']]], 18 | ['serialib_2ecpp_34',['serialib.cpp',['../serialib_8cpp.html',1,'']]], 19 | ['serialib_2eh_35',['serialib.h',['../serialib_8h.html',1,'']]], 20 | ['serialparity_36',['SerialParity',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6',1,'serialib.h']]], 21 | ['serialstopbits_37',['SerialStopBits',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654',1,'serialib.h']]], 22 | ['setdtr_38',['setDTR',['../classserialib.html#a7564b9e28b1b50675d9d6d3fabc896c0',1,'serialib']]], 23 | ['setrts_39',['setRTS',['../classserialib.html#a21767ffe86a76f300a71c496fbcc26a1',1,'serialib']]] 24 | ]; 25 | -------------------------------------------------------------------------------- /doc/html/search/all_9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['timeout_40',['timeOut',['../classtime_out.html',1,'timeOut'],['../classtime_out.html#a2cffa89f7b90e4501e07e8cb7ccb3117',1,'timeOut::timeOut()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['unused_41',['UNUSED',['../serialib_8h.html#a86d500a34c624c2cae56bc25a31b12f3',1,'serialib.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['writebytes_42',['writeBytes',['../classserialib.html#aa14196b6f422584bf5eebc4ddb71d483',1,'serialib']]], 4 | ['writechar_43',['writeChar',['../classserialib.html#aa6d231cb99664a613bcb503830f73497',1,'serialib']]], 5 | ['writestring_44',['writeString',['../classserialib.html#a6a32655c718b998e5b63d8cdc483ac6d',1,'serialib']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/all_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/all_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7eserialib_45',['~serialib',['../classserialib.html#ac44215001ae198f2c196bb7993327a4b',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/html/search/all_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7eserialib',['~serialib',['../classserialib.html#ac44215001ae198f2c196bb7993327a4b',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/classes_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serialib_46',['serialib',['../classserialib.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/classes_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/classes_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['timeout_47',['timeOut',['../classtime_out.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/search/close.png -------------------------------------------------------------------------------- /doc/html/search/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 13 | 15 | 16 | 18 | image/svg+xml 19 | 21 | 22 | 23 | 24 | 25 | 27 | 31 | 32 | -------------------------------------------------------------------------------- /doc/html/search/defines_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/defines_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['unused_93',['UNUSED',['../serialib_8h.html#a86d500a34c624c2cae56bc25a31b12f3',1,'serialib.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/enums_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/enums_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serialdatabits_77',['SerialDataBits',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7',1,'serialib.h']]], 4 | ['serialparity_78',['SerialParity',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6',1,'serialib.h']]], 5 | ['serialstopbits_79',['SerialStopBits',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654',1,'serialib.h']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/enumvalues_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/enumvalues_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serial_5fdatabits_5f16_80',['SERIAL_DATABITS_16',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a5c284f8eb4f32fa561544a95e506227d',1,'serialib.h']]], 4 | ['serial_5fdatabits_5f5_81',['SERIAL_DATABITS_5',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a0af46a1b1917daf04f071cc62409b1d0',1,'serialib.h']]], 5 | ['serial_5fdatabits_5f6_82',['SERIAL_DATABITS_6',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7af037109ad2db2f77d36c2a9806b23978',1,'serialib.h']]], 6 | ['serial_5fdatabits_5f7_83',['SERIAL_DATABITS_7',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7aeaccb09be92b75b1ac6a327eb21fb161',1,'serialib.h']]], 7 | ['serial_5fdatabits_5f8_84',['SERIAL_DATABITS_8',['../serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7ae7d27f5b5b60277dccbadd399897606d',1,'serialib.h']]], 8 | ['serial_5fparity_5feven_85',['SERIAL_PARITY_EVEN',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a0392c989829d4e47a2cc54a12cb6125a',1,'serialib.h']]], 9 | ['serial_5fparity_5fmark_86',['SERIAL_PARITY_MARK',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a2ba4057e060ceb427fb3105ef629ccf6',1,'serialib.h']]], 10 | ['serial_5fparity_5fnone_87',['SERIAL_PARITY_NONE',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a38bc0d79b89ff9341767232da5448fe8',1,'serialib.h']]], 11 | ['serial_5fparity_5fodd_88',['SERIAL_PARITY_ODD',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6ab3213e8e4b9f1199aac388ed1b671a6e',1,'serialib.h']]], 12 | ['serial_5fparity_5fspace_89',['SERIAL_PARITY_SPACE',['../serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a10bed0b14962edaf7e883bf186d4773b',1,'serialib.h']]], 13 | ['serial_5fstopbits_5f1_90',['SERIAL_STOPBITS_1',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5d487c59b00736410f8512b345ce6a0d',1,'serialib.h']]], 14 | ['serial_5fstopbits_5f1_5f5_91',['SERIAL_STOPBITS_1_5',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5e9a6cef3d12988dba0fa9b9053ec3cc',1,'serialib.h']]], 15 | ['serial_5fstopbits_5f2_92',['SERIAL_STOPBITS_2',['../serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a031c032346661741186af9d0680782ec',1,'serialib.h']]] 16 | ]; 17 | -------------------------------------------------------------------------------- /doc/html/search/files_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serialib_2ecpp_48',['serialib.cpp',['../serialib_8cpp.html',1,'']]], 4 | ['serialib_2eh_49',['serialib.h',['../serialib_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/files_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/html/search/files_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serialib_2ecpp',['serialib.cpp',['../serialib_8cpp.html',1,'']]], 4 | ['serialib_2eh',['serialib.h',['../serialib_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['available_50',['available',['../classserialib.html#a50c91bf8cab23afdfdf05ca58392456f',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['cleardtr_51',['clearDTR',['../classserialib.html#adf49bff6401d3101b41fb52e98309635',1,'serialib']]], 4 | ['clearrts_52',['clearRTS',['../classserialib.html#ab0b5882339240002fccf7701f5321e0a',1,'serialib']]], 5 | ['closedevice_53',['closeDevice',['../classserialib.html#a8a1c8803c8df1a19222d6006328534b8',1,'serialib']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/functions_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['dtr_54',['DTR',['../classserialib.html#a3dc0ec56e84ab2b43dc02fc2e02148a1',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['elapsedtime_5fms_55',['elapsedTime_ms',['../classtime_out.html#af5db5b5f0db4f6ada19187ef8f214214',1,'timeOut']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['flushreceiver_56',['flushReceiver',['../classserialib.html#a572dd8d208511ec81d848de72cb05c7a',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['inittimer_57',['initTimer',['../classtime_out.html#a88b4caef4ce7bfc42b73a61589c098e8',1,'timeOut']]], 4 | ['iscts_58',['isCTS',['../classserialib.html#aca544a6f8dfa33f8e771713646768215',1,'serialib']]], 5 | ['isdcd_59',['isDCD',['../classserialib.html#a5f451a5eea7c8c1bdcff684ba131d6ff',1,'serialib']]], 6 | ['isdsr_60',['isDSR',['../classserialib.html#a3f1f0894543dfb17955de50157965dd7',1,'serialib']]], 7 | ['isdtr_61',['isDTR',['../classserialib.html#a4ec78286be81602bf1df44a4eb8372a8',1,'serialib']]], 8 | ['isri_62',['isRI',['../classserialib.html#a605d8a8015fadb5db5521350aefe084e',1,'serialib']]], 9 | ['isrts_63',['isRTS',['../classserialib.html#ab2b121af07fb732f82668f6a14e93cfb',1,'serialib']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /doc/html/search/functions_6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['opendevice_64',['openDevice',['../classserialib.html#afcef685b74a3db58dc2d1898bb34aaca',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['readbytes_65',['readBytes',['../classserialib.html#ab05e51ff3bc47c02d7d000d58b45a961',1,'serialib']]], 4 | ['readchar_66',['readChar',['../classserialib.html#a6c78b8a11ae7b8af57eea3dbc7fa237b',1,'serialib']]], 5 | ['readstring_67',['readString',['../classserialib.html#ab155c84352ddefe1304d391c19497ac1',1,'serialib']]], 6 | ['rts_68',['RTS',['../classserialib.html#a5a73f159762fa4d5c252f36acfe7ab47',1,'serialib']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/html/search/functions_8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serialib_69',['serialib',['../classserialib.html#a26166f63ad73013ca7cbcd2ae59edc91',1,'serialib']]], 4 | ['setdtr_70',['setDTR',['../classserialib.html#a7564b9e28b1b50675d9d6d3fabc896c0',1,'serialib']]], 5 | ['setrts_71',['setRTS',['../classserialib.html#a21767ffe86a76f300a71c496fbcc26a1',1,'serialib']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/functions_9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['timeout_72',['timeOut',['../classtime_out.html#a2cffa89f7b90e4501e07e8cb7ccb3117',1,'timeOut']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['writebytes_73',['writeBytes',['../classserialib.html#aa14196b6f422584bf5eebc4ddb71d483',1,'serialib']]], 4 | ['writechar_74',['writeChar',['../classserialib.html#aa6d231cb99664a613bcb503830f73497',1,'serialib']]], 5 | ['writestring_75',['writeString',['../classserialib.html#a6a32655c718b998e5b63d8cdc483ac6d',1,'serialib']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/functions_b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    Loading...
    13 |
    14 | 19 |
    Searching...
    20 |
    No Matches
    21 | 35 |
    36 | 37 | 38 | -------------------------------------------------------------------------------- /doc/html/search/functions_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7eserialib_76',['~serialib',['../classserialib.html#ac44215001ae198f2c196bb7993327a4b',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/html/search/functions_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7eserialib',['~serialib',['../classserialib.html#ac44215001ae198f2c196bb7993327a4b',1,'serialib']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/search/mag_sel.png -------------------------------------------------------------------------------- /doc/html/search/mag_sel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 31 | 33 | 57 | 63 | 69 | 74 | 75 | -------------------------------------------------------------------------------- /doc/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 |
    No Matches
    11 |
    12 | 13 | 14 | -------------------------------------------------------------------------------- /doc/html/search/pages_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
    11 |
    Loading...
    12 |
    13 | 16 |
    Searching...
    17 |
    No Matches
    18 | 24 |
    25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/html/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['serialib',['serialib',['../md__r_e_a_d_m_e.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/search.css: -------------------------------------------------------------------------------- 1 | /*---------------- Search Box */ 2 | 3 | #MSearchBox { 4 | white-space : nowrap; 5 | background: white; 6 | border-radius: 0.65em; 7 | box-shadow: inset 0.5px 0.5px 3px 0px #555; 8 | z-index: 102; 9 | } 10 | 11 | #MSearchBox .left { 12 | display: inline-block; 13 | vertical-align: middle; 14 | height: 1.4em; 15 | } 16 | 17 | #MSearchSelect { 18 | display: inline-block; 19 | vertical-align: middle; 20 | height: 1.4em; 21 | padding: 0 0 0 0.3em; 22 | margin: 0; 23 | } 24 | 25 | #MSearchField { 26 | display: inline-block; 27 | vertical-align: middle; 28 | width: 7.5em; 29 | height: 1.1em; 30 | margin: 0 0.15em; 31 | padding: 0; 32 | line-height: 1em; 33 | border:none; 34 | color: #909090; 35 | outline: none; 36 | font-family: Arial, Verdana, sans-serif; 37 | -webkit-border-radius: 0px; 38 | border-radius: 0px; 39 | background: none; 40 | } 41 | 42 | 43 | #MSearchBox .right { 44 | display: inline-block; 45 | vertical-align: middle; 46 | width: 1.4em; 47 | height: 1.4em; 48 | } 49 | 50 | #MSearchClose { 51 | display: none; 52 | font-size: inherit; 53 | background : none; 54 | border: none; 55 | margin: 0; 56 | padding: 0; 57 | outline: none; 58 | 59 | } 60 | 61 | #MSearchCloseImg { 62 | height: 1.4em; 63 | padding: 0.3em; 64 | margin: 0; 65 | } 66 | 67 | .MSearchBoxActive #MSearchField { 68 | color: #000000; 69 | } 70 | 71 | #main-menu > li:last-child { 72 | /* This
  • object is the parent of the search bar */ 73 | display: flex; 74 | justify-content: center; 75 | align-items: center; 76 | height: 36px; 77 | margin-right: 1em; 78 | } 79 | 80 | /*---------------- Search filter selection */ 81 | 82 | #MSearchSelectWindow { 83 | display: none; 84 | position: absolute; 85 | left: 0; top: 0; 86 | border: 1px solid #90A5CE; 87 | background-color: #F9FAFC; 88 | z-index: 10001; 89 | padding-top: 4px; 90 | padding-bottom: 4px; 91 | -moz-border-radius: 4px; 92 | -webkit-border-top-left-radius: 4px; 93 | -webkit-border-top-right-radius: 4px; 94 | -webkit-border-bottom-left-radius: 4px; 95 | -webkit-border-bottom-right-radius: 4px; 96 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 97 | } 98 | 99 | .SelectItem { 100 | font: 8pt Arial, Verdana, sans-serif; 101 | padding-left: 2px; 102 | padding-right: 12px; 103 | border: 0px; 104 | } 105 | 106 | span.SelectionMark { 107 | margin-right: 4px; 108 | font-family: monospace; 109 | outline-style: none; 110 | text-decoration: none; 111 | } 112 | 113 | a.SelectItem { 114 | display: block; 115 | outline-style: none; 116 | color: #000000; 117 | text-decoration: none; 118 | padding-left: 6px; 119 | padding-right: 12px; 120 | } 121 | 122 | a.SelectItem:focus, 123 | a.SelectItem:active { 124 | color: #000000; 125 | outline-style: none; 126 | text-decoration: none; 127 | } 128 | 129 | a.SelectItem:hover { 130 | color: #FFFFFF; 131 | background-color: #3D578C; 132 | outline-style: none; 133 | text-decoration: none; 134 | cursor: pointer; 135 | display: block; 136 | } 137 | 138 | /*---------------- Search results window */ 139 | 140 | iframe#MSearchResults { 141 | width: 60ex; 142 | height: 15em; 143 | } 144 | 145 | #MSearchResultsWindow { 146 | display: none; 147 | position: absolute; 148 | left: 0; top: 0; 149 | border: 1px solid #000; 150 | background-color: #EEF1F7; 151 | z-index:10000; 152 | } 153 | 154 | /* ----------------------------------- */ 155 | 156 | 157 | #SRIndex { 158 | clear:both; 159 | padding-bottom: 15px; 160 | } 161 | 162 | .SREntry { 163 | font-size: 10pt; 164 | padding-left: 1ex; 165 | } 166 | 167 | .SRPage .SREntry { 168 | font-size: 8pt; 169 | padding: 1px 5px; 170 | } 171 | 172 | body.SRPage { 173 | margin: 5px 2px; 174 | } 175 | 176 | .SRChildren { 177 | padding-left: 3ex; padding-bottom: .5em 178 | } 179 | 180 | .SRPage .SRChildren { 181 | display: none; 182 | } 183 | 184 | .SRSymbol { 185 | font-weight: bold; 186 | color: #425E97; 187 | font-family: Arial, Verdana, sans-serif; 188 | text-decoration: none; 189 | outline: none; 190 | } 191 | 192 | a.SRScope { 193 | display: block; 194 | color: #425E97; 195 | font-family: Arial, Verdana, sans-serif; 196 | text-decoration: none; 197 | outline: none; 198 | } 199 | 200 | a.SRSymbol:focus, a.SRSymbol:active, 201 | a.SRScope:focus, a.SRScope:active { 202 | text-decoration: underline; 203 | } 204 | 205 | span.SRScope { 206 | padding-left: 4px; 207 | font-family: Arial, Verdana, sans-serif; 208 | } 209 | 210 | .SRPage .SRStatus { 211 | padding: 2px 5px; 212 | font-size: 8pt; 213 | font-style: italic; 214 | font-family: Arial, Verdana, sans-serif; 215 | } 216 | 217 | .SRResult { 218 | display: none; 219 | } 220 | 221 | div.searchresults { 222 | margin-left: 10px; 223 | margin-right: 10px; 224 | } 225 | 226 | /*---------------- External search page results */ 227 | 228 | .searchresult { 229 | background-color: #F0F3F8; 230 | } 231 | 232 | .pages b { 233 | color: white; 234 | padding: 5px 5px 3px 5px; 235 | background-image: url("../tab_a.png"); 236 | background-repeat: repeat-x; 237 | text-shadow: 0 1px 1px #000000; 238 | } 239 | 240 | .pages { 241 | line-height: 17px; 242 | margin-left: 4px; 243 | text-decoration: none; 244 | } 245 | 246 | .hl { 247 | font-weight: bold; 248 | } 249 | 250 | #searchresults { 251 | margin-bottom: 20px; 252 | } 253 | 254 | .searchpages { 255 | margin-top: 10px; 256 | } 257 | 258 | -------------------------------------------------------------------------------- /doc/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/search/search_l.png -------------------------------------------------------------------------------- /doc/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/search/search_m.png -------------------------------------------------------------------------------- /doc/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/search/search_r.png -------------------------------------------------------------------------------- /doc/html/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "acdefiorstuw~", 4 | 1: "st", 5 | 2: "s", 6 | 3: "acdefiorstw~", 7 | 4: "s", 8 | 5: "s", 9 | 6: "u" 10 | }; 11 | 12 | var indexSectionNames = 13 | { 14 | 0: "all", 15 | 1: "classes", 16 | 2: "files", 17 | 3: "functions", 18 | 4: "enums", 19 | 5: "enumvalues", 20 | 6: "defines" 21 | }; 22 | 23 | var indexSectionLabels = 24 | { 25 | 0: "All", 26 | 1: "Classes", 27 | 2: "Files", 28 | 3: "Functions", 29 | 4: "Enumerations", 30 | 5: "Enumerator", 31 | 6: "Macros" 32 | }; 33 | 34 | -------------------------------------------------------------------------------- /doc/html/serialib_8cpp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Serialib: lib/serialib.cpp File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
    23 |
    24 | 25 | 26 | 27 | 33 | 34 | 35 |
    28 |
    Serialib 29 |  2.0 30 |
    31 |
    Multi plateform serial library
    32 |
    36 |
    37 | 38 | 39 | 44 | 45 | 46 | 53 | 54 |
    55 |
    56 | 61 |
    63 |
    64 |
    65 | 70 |
    71 | 72 |
    76 |
    77 | 78 | 79 |
    80 | 83 |
    84 | 85 |
    86 |
    87 |
    serialib.cpp File Reference
    88 |
    89 |
    90 | 91 |

    Source file of the class serialib. This class is used for communication over a serial device. 92 | More...

    93 |
    #include "serialib.h"
    94 |

    Detailed Description

    95 |

    Source file of the class serialib. This class is used for communication over a serial device.

    96 |
    Author
    Philippe Lucidarme (University of Angers)
    97 |
    Version
    2.0
    98 |
    Date
    december the 27th of 2019
    99 |

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    100 |

    This is a licence-free software, it can be used by anyone who try to build a better world.

    101 |
    102 |
    103 | 104 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /doc/html/serialib_8h.js: -------------------------------------------------------------------------------- 1 | var serialib_8h = 2 | [ 3 | [ "serialib", "classserialib.html", "classserialib" ], 4 | [ "timeOut", "classtime_out.html", "classtime_out" ], 5 | [ "UNUSED", "serialib_8h.html#a86d500a34c624c2cae56bc25a31b12f3", null ], 6 | [ "SerialDataBits", "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7", [ 7 | [ "SERIAL_DATABITS_5", "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a0af46a1b1917daf04f071cc62409b1d0", null ], 8 | [ "SERIAL_DATABITS_6", "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7af037109ad2db2f77d36c2a9806b23978", null ], 9 | [ "SERIAL_DATABITS_7", "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7aeaccb09be92b75b1ac6a327eb21fb161", null ], 10 | [ "SERIAL_DATABITS_8", "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7ae7d27f5b5b60277dccbadd399897606d", null ], 11 | [ "SERIAL_DATABITS_16", "serialib_8h.html#a1ecb786dca6b3ea0df424552bd25aba7a5c284f8eb4f32fa561544a95e506227d", null ] 12 | ] ], 13 | [ "SerialParity", "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6", [ 14 | [ "SERIAL_PARITY_NONE", "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a38bc0d79b89ff9341767232da5448fe8", null ], 15 | [ "SERIAL_PARITY_EVEN", "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a0392c989829d4e47a2cc54a12cb6125a", null ], 16 | [ "SERIAL_PARITY_ODD", "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6ab3213e8e4b9f1199aac388ed1b671a6e", null ], 17 | [ "SERIAL_PARITY_MARK", "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a2ba4057e060ceb427fb3105ef629ccf6", null ], 18 | [ "SERIAL_PARITY_SPACE", "serialib_8h.html#a2c48912c12fd98a4f4faffbc7f20a9f6a10bed0b14962edaf7e883bf186d4773b", null ] 19 | ] ], 20 | [ "SerialStopBits", "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654", [ 21 | [ "SERIAL_STOPBITS_1", "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5d487c59b00736410f8512b345ce6a0d", null ], 22 | [ "SERIAL_STOPBITS_1_5", "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a5e9a6cef3d12988dba0fa9b9053ec3cc", null ], 23 | [ "SERIAL_STOPBITS_2", "serialib_8h.html#aa2678ddd8376c65d7cad07cd6cae5654a031c032346661741186af9d0680782ec", null ] 24 | ] ] 25 | ]; -------------------------------------------------------------------------------- /doc/html/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/splitbar.png -------------------------------------------------------------------------------- /doc/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/sync_off.png -------------------------------------------------------------------------------- /doc/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/sync_on.png -------------------------------------------------------------------------------- /doc/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/tab_a.png -------------------------------------------------------------------------------- /doc/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/tab_b.png -------------------------------------------------------------------------------- /doc/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/tab_h.png -------------------------------------------------------------------------------- /doc/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imabot2/serialib/ef7f57a8f63598b66141d5cfd05a17b0a89284fa/doc/html/tab_s.png -------------------------------------------------------------------------------- /example1/example1.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2013-10-18T12:36:34 4 | # 5 | #------------------------------------------------- 6 | 7 | QT -= core 8 | QT -= network 9 | QT -= gui 10 | 11 | TARGET = project 12 | CONFIG += console 13 | CONFIG -= app_bundle 14 | 15 | TEMPLATE = app 16 | 17 | 18 | SOURCES += main.cpp \ 19 | ../lib/serialib.cpp 20 | 21 | HEADERS += ../lib/serialib.h 22 | 23 | -------------------------------------------------------------------------------- /example1/main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file /example1/main.cpp 3 | * @author Philippe Lucidarme 4 | * @date December 2019 5 | * @brief File containing example of serial port communication 6 | * 7 | * This example send the ASCII table through the serial device 8 | * 9 | * @see https://lucidar.me 10 | */ 11 | 12 | 13 | // Serial library 14 | #include "../lib/serialib.h" 15 | #include 16 | #include 17 | 18 | 19 | #if defined (_WIN32) || defined(_WIN64) 20 | //for serial ports above "COM9", we must use this extended syntax of "\\.\COMx". 21 | //also works for COM0 to COM9. 22 | //https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea?redirectedfrom=MSDN#communications-resources 23 | #define SERIAL_PORT "\\\\.\\COM1" 24 | #endif 25 | #if defined (__linux__) || defined(__APPLE__) 26 | #define SERIAL_PORT "/dev/ttyACM0" 27 | #endif 28 | 29 | 30 | 31 | /*! 32 | * \brief main Simple example that send ASCII characters to the serial device 33 | * \return 0 : success 34 | * <0 : an error occured 35 | */ 36 | int main( /*int argc, char *argv[]*/) 37 | { 38 | // Serial object 39 | serialib serial; 40 | 41 | 42 | // Connection to serial port 43 | char errorOpening = serial.openDevice(SERIAL_PORT, 115200); 44 | 45 | 46 | // If connection fails, return the error code otherwise, display a success message 47 | if (errorOpening!=1) return errorOpening; 48 | printf ("Successful connection to %s\n",SERIAL_PORT); 49 | 50 | 51 | // Display ASCII characters (from 32 to 128) 52 | for (int c=32;c<128;c++) 53 | { 54 | serial.writeChar(c); 55 | usleep(10000); 56 | } 57 | 58 | // Close the serial device 59 | serial.closeDevice(); 60 | 61 | return 0 ; 62 | } 63 | -------------------------------------------------------------------------------- /example2/example2.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2013-10-18T12:36:34 4 | # 5 | #------------------------------------------------- 6 | 7 | QT -= core 8 | QT -= network 9 | QT -= gui 10 | 11 | TARGET = project 12 | CONFIG += console 13 | CONFIG -= app_bundle 14 | 15 | TEMPLATE = app 16 | 17 | 18 | SOURCES += main.cpp \ 19 | ../lib/serialib.cpp 20 | 21 | HEADERS += ../lib/serialib.h 22 | 23 | -------------------------------------------------------------------------------- /example2/main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file /example1/main.cpp 3 | * @author Philippe Lucidarme 4 | * @date December 2019 5 | * @brief File containing example of serial port communication 6 | * 7 | * This example send the ASCII table through the serial device 8 | * 9 | * @see https://lucidar.me 10 | */ 11 | 12 | 13 | // Serial library 14 | #include "../lib/serialib.h" 15 | #include 16 | #include 17 | 18 | 19 | #if defined (_WIN32) || defined(_WIN64) 20 | //for serial ports above "COM9", we must use this extended syntax of "\\.\COMx". 21 | //also works for COM0 to COM9. 22 | //https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea?redirectedfrom=MSDN#communications-resources 23 | #define SERIAL_PORT "\\\\.\\COM1" 24 | #endif 25 | #if defined (__linux__) || defined(__APPLE__) 26 | #define SERIAL_PORT "/dev/ttyS0" 27 | #endif 28 | 29 | /*! 30 | * \brief main Example of read and write serial port IO pins 31 | * \return never ! 32 | */ 33 | int main( /*int argc, char *argv[]*/) 34 | { 35 | // Serial object 36 | serialib serial; 37 | 38 | // Connection to serial port 39 | char errorOpening = serial.openDevice(SERIAL_PORT, 115200); 40 | 41 | 42 | // If connection fails, return the error code otherwise, display a success message 43 | if (errorOpening!=1) return errorOpening; 44 | printf ("Successful connection to %s\n",SERIAL_PORT); 45 | 46 | // Set DTR 47 | serial.DTR(true); 48 | // Clear RTS 49 | serial.RTS(false); 50 | 51 | // Loop forever 52 | while (1) 53 | { 54 | // Read and display the status of each pin 55 | // DTR should be 1 56 | // RTS should be 0 57 | printf ("4-DTR=%d\t", serial.isDTR()); 58 | printf ("7-RTS=%d\t", serial.isRTS()); 59 | 60 | printf ("1-DCD=%d\t", serial.isDCD()); 61 | printf ("8-CTS=%d\t", serial.isCTS()); 62 | printf ("6-DSR=%d\t", serial.isDSR()); 63 | printf ("9-RING=%d\n", serial.isRI()); 64 | } 65 | 66 | // Close the serial device 67 | serial.closeDevice(); 68 | 69 | return 0 ; 70 | } 71 | -------------------------------------------------------------------------------- /example3/arduino-code/arduino-code.ino: -------------------------------------------------------------------------------- 1 | // Return the returns the character received on Serial after capitalizing it 2 | // More details on: 3 | // https://lucidar.me/en/serialib/cross-plateform-rs232-serial-library/ 4 | 5 | // Setup, initialize 6 | void setup() { 7 | Serial.begin(115200); 8 | } 9 | 10 | // Loop forever 11 | void loop() { 12 | // If serial data is pending, read, capitalize and write the character 13 | if (Serial.available()) 14 | Serial.write( toupper (Serial.read()) ); 15 | } -------------------------------------------------------------------------------- /example3/example3.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2013-10-18T12:36:34 4 | # 5 | #------------------------------------------------- 6 | 7 | QT -= core 8 | QT -= network 9 | QT -= gui 10 | 11 | TARGET = project 12 | CONFIG += console 13 | CONFIG -= app_bundle 14 | 15 | TEMPLATE = app 16 | 17 | 18 | SOURCES += main.cpp \ 19 | ../lib/serialib.cpp 20 | 21 | HEADERS += ../lib/serialib.h 22 | 23 | -------------------------------------------------------------------------------- /example3/main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file /example1/main.cpp 3 | * @author Philippe Lucidarme 4 | * @date December 2019 5 | * @brief File containing example of serial port communication 6 | * 7 | * This example send a string through the serial device 8 | * The program expect receiving a string from the device 9 | * The received string is expected to terminated by a carriage return 10 | * 11 | * The following code has been tested with this Arduino Uno sketch 12 | * that return the uppercase character received on the serial device 13 | * 14 | * // Setup, initialize 15 | * void setup() { 16 | * Serial.begin(115200); 17 | * } 18 | * 19 | * // Loop forever 20 | * void loop() { 21 | * // If serial data is pending, read and write the character uppercased 22 | * if (Serial.available()) 23 | * Serial.write( toupper (Serial.read()) ); 24 | * } 25 | * 26 | * @see https://lucidar.me 27 | */ 28 | 29 | 30 | // Serial library 31 | #include "../lib/serialib.h" 32 | #include 33 | #include 34 | 35 | 36 | #if defined (_WIN32) || defined(_WIN64) 37 | //for serial ports above "COM9", we must use this extended syntax of "\\.\COMx". 38 | //also works for COM0 to COM9. 39 | //https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea?redirectedfrom=MSDN#communications-resources 40 | #define SERIAL_PORT "\\\\.\\COM1" 41 | #endif 42 | #if defined (__linux__) || defined(__APPLE__) 43 | #define SERIAL_PORT "/dev/ttyACM0" 44 | #endif 45 | 46 | /*! 47 | * \brief main Example of read and write string 48 | */ 49 | int main( /*int argc, char *argv[]*/) 50 | { 51 | // Serial object 52 | serialib serial; 53 | 54 | // Connection to serial port 55 | char errorOpening = serial.openDevice(SERIAL_PORT, 115200); 56 | 57 | 58 | // If connection fails, return the error code otherwise, display a success message 59 | if (errorOpening!=1) return errorOpening; 60 | printf ("Successful connection to %s\n",SERIAL_PORT); 61 | 62 | 63 | // Create the string 64 | char buffer[15] = "hello\n"; 65 | 66 | // Write the string on the serial device 67 | serial.writeString(buffer); 68 | printf ("String sent: %s", buffer); 69 | 70 | // Read the string 71 | serial.readString(buffer, '\n', 14, 2000); 72 | printf("String read: %s\n", buffer); 73 | 74 | // Close the serial device 75 | serial.closeDevice(); 76 | 77 | return 0 ; 78 | } 79 | -------------------------------------------------------------------------------- /example4/arduino-code/arduino-code.ino: -------------------------------------------------------------------------------- 1 | // Return the returns the character received on Serial multiply by two 2 | // More details on: 3 | // https://lucidar.me/en/serialib/cross-plateform-rs232-serial-library/ 4 | 5 | // Setup, initialize 6 | void setup() { 7 | Serial.begin(115200); 8 | } 9 | 10 | // Loop forever 11 | void loop() { 12 | // If serial data is pending, read, write twice the received byte 13 | if (Serial.available()) 14 | Serial.write( 2*Serial.read() ); 15 | } -------------------------------------------------------------------------------- /example4/example4.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2013-10-18T12:36:34 4 | # 5 | #------------------------------------------------- 6 | 7 | QT -= core 8 | QT -= network 9 | QT -= gui 10 | 11 | TARGET = project 12 | CONFIG += console 13 | CONFIG -= app_bundle 14 | 15 | TEMPLATE = app 16 | 17 | 18 | SOURCES += main.cpp \ 19 | ../lib/serialib.cpp 20 | 21 | HEADERS += ../lib/serialib.h 22 | 23 | -------------------------------------------------------------------------------- /example4/main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @file /example1/main.cpp 3 | * @author Philippe Lucidarme 4 | * @date December 2019 5 | * @brief File containing example of serial port communication 6 | * 7 | * This example send an array of bytees through the serial device 8 | * The program expect receiving a the same number of bytes from the device 9 | * 10 | * The following code has been tested with this Arduino Uno sketch 11 | * that return the uppercase character received on the serial device 12 | * 13 | * // Setup, initialize 14 | * void setup() { 15 | * Serial.begin(115200); 16 | * } 17 | * 18 | * // Loop forever 19 | * void loop() { 20 | * // If serial data is pending, read, write twice the received byte 21 | * if (Serial.available()) 22 | * Serial.write( 2*Serial.read() ); 23 | * } 24 | * 25 | * @see https://lucidar.me 26 | */ 27 | 28 | 29 | // Serial library 30 | #include "../lib/serialib.h" 31 | #include 32 | #include 33 | 34 | 35 | #if defined (_WIN32) || defined(_WIN64) 36 | //for serial ports above "COM9", we must use this extended syntax of "\\.\COMx". 37 | //also works for COM0 to COM9. 38 | //https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea?redirectedfrom=MSDN#communications-resources 39 | #define SERIAL_PORT "\\\\.\\COM1" 40 | #endif 41 | #if defined (__linux__) || defined(__APPLE__) 42 | #define SERIAL_PORT "/dev/ttyACM0" 43 | #endif 44 | 45 | /*! 46 | * \brief main Example of read and write string 47 | */ 48 | int main( /*int argc, char *argv[]*/) 49 | { 50 | // Serial object 51 | serialib serial; 52 | 53 | // Connection to serial port 54 | char errorOpening = serial.openDevice(SERIAL_PORT, 115200); 55 | 56 | 57 | // If connection fails, return the error code otherwise, display a success message 58 | if (errorOpening!=1) return errorOpening; 59 | printf ("Successful connection to %s\n",SERIAL_PORT); 60 | 61 | 62 | // Create an array of bytes 63 | unsigned char prime[8] = { 1, 3, 5, 7, 11, 13, 17, 19 }; 64 | 65 | // Write the array on the serial device 66 | serial.writeBytes(prime, 8); 67 | printf ("Data sent\n"); 68 | 69 | // Read the bytes 70 | unsigned char received[8]; 71 | serial.readBytes(received, 8, 2000, 1000); 72 | 73 | // Display each byte received 74 | for (int i=0; i<8 ; i++) 75 | printf("Receive [%d] = %d\n", i, received[i]); 76 | 77 | // Close the serial device 78 | serial.closeDevice(); 79 | 80 | return 0 ; 81 | } 82 | --------------------------------------------------------------------------------