-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathREADME.html
More file actions
149 lines (148 loc) · 7.31 KB
/
README.html
File metadata and controls
149 lines (148 loc) · 7.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<h1>Linux Simple I/O Library</h1>
<p><b>libsimpleio</b> is an attempt to encapsulate (as much as possible) the
ugliness of Linux I/O device access. It provides services for the following
types of I/O devices:</p>
<ul>
<li><a href="https://wiki.analog.com/software/linux/docs/iio/iio">Industrial
I/O Subsystem</a> A/D (Analog to Digital) Converter Devices</li>
<li><a href="https://wiki.analog.com/software/linux/docs/iio/iio">Industrial
I/O Subsystem</a> D/A (Digital to Analog) Converter Devices</li>
<li>GPIO (General Purpose Input/Output) Pins</li>
<li>Raw HID (Human Interface Device) Devices</li>
<li>I<sup>2</sup>C (Inter-Integrated Circuit) Bus Devices</li>
<li>PWM (Pulse Width Modulated) Output Devices</li>
<li><a href=
"https://repo.munts.com/libsimpleio/doc/RemoteIOProtocol.pdf">Remote I/O
Protocol</a> Devices</li>
<li>Serial Ports</li>
<li>SPI (Serial Peripheral Interface) Bus Devices</li>
<li><a href=
"https://repo.munts.com/libsimpleio/doc/StreamFramingProtocol.pdf">Stream
Framing Protocol</a> Devices</li>
<li>TCP and UDP over IPv4 Network Devices</li>
<li>Watchdog Timer Devices</li>
</ul>
<p>Although <b>libsimpleio</b> was originally intended for Linux microcomputers
such as the Raspberry Pi, it can also be useful on larger desktop Linux
systems.</p>
<p>The C wrapper functions exported by <b>libsimpleio</b> all follow the same
uniform pattern:</p>
<ul>
<li>All C wrapper functions are proper procedures (<b><tt>void f()</tt></b> in
C).</li>
<li>All input arguments of primitive types (<b><tt>int</tt></b>,
<b><tt>float</tt></b>, etc.) are passed by value.</li>
<li>All output arguments of primitive types are passed by reference (<b><tt>int
*</tt></b>, <b><tt>float *</tt></b>, etc.).</li>
<li>All composite types are passed by reference.</li>
<li><b><tt>int32_t</tt></b> is used wherever possible for <b><tt>int</tt></b>
and <b><tt>bool</tt></b> arguments.</li>
</ul>
<p>All of the C wrapper functions are declared between
<b><tt>_BEGIN_STD_C</tt></b> and <b><tt>_END_STD_C</tt></b> for C++. Additional
source code libraries are provided for Ada, C++, C#, Free Pascal, Modula-2, and
Python that define OOP (Object Oriented Programming) thick binding classes for
<b>libsimpleio</b>.</p>
<p>The Ada library unit packages in the <b>libsimpleio</b> code tree are
especially rich and are both more numerous and more refined than those for
other programming languages. Ada was originally developed and released in 1983
to replace a myriad of other programming languages used for developing software
for military aircraft and other complex weapons systems. With the help of
<b>libsimpleio</b>, Ada is still one of the best languages around for
developing reliable embedded systems software for Linux computers.</p>
<p>See also <a href="https://github.com/pmunts/muntsos">MuntsOS Embedded
Linux</a>, which uses <b>libsimpleio</b> pervasively.</p>
<h2>Documentation at <a href=
"https://repo.munts.com/libsimpleio/doc">https://repo.munts.com/libsimpleio/doc</a></h2>
<h3>User Manual:</h3>
<a href=
"https://repo.munts.com/libsimpleio/doc/UserManual.pdf">https://repo.munts.com/libsimpleio/doc/UserManual.pdf</a>
<h3>C Wrapper Functions API Specification:</h3>
<a href=
"https://repo.munts.com/libsimpleio/doc/libsimpleio.html">https://repo.munts.com/libsimpleio/doc/libsimpleio.html</a>
<h3>.Net Binding API Specifications:</h3>
<a href=
"https://repo.munts.com/libsimpleio/doc/libremoteio.dll">https://repo.munts.com/libsimpleio/doc/libremoteio.dll</a><br>
<a href=
"https://repo.munts.com/libsimpleio/doc/libsimpleio.dll">https://repo.munts.com/libsimpleio/doc/libsimpleio.dll</a>
<h2>Git Repository</h2>
<p>The <b>libsimpleio</b> source code tree is available at:</p>
<p><a href=
"https://github.com/pmunts/libsimpleio">https://github.com/pmunts/libsimpleio</a></p>
<p>Use the following command to clone it:</p>
<p><b><tt>git clone https://github.com/pmunts/libsimpleio.git</tt></b></p>
<h2>Debian Package Repository</h2>
<p>Prebuilt <b><tt>libsimpleio</tt></b> packages for <a href=
"http://www.debian.org">Debian</a> Linux are available at:</p>
<p><a href=
"https://repo.munts.com/debian13">https://repo.munts.com/debian13</a></p>
<h2><a href="https://alire.ada.dev">Alire</a> Crates</h2>
<p><a href="https://alire.ada.dev/crates/libsimpleio.html"><img alt=
"libsimpleio" src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/libsimpleio.json"></a>
<a href="https://alire.ada.dev/crates/mcp2221.html"><img alt="mcp2221" src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/mcp2221.json">
</a> <a href="https://alire.ada.dev/crates/remoteio.html"><img alt="remoteio"
src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/remoteio.json">
</a><br>
<a href="https://alire.ada.dev/crates/wioe5_ham1"><img alt="wioe5_ham1" src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/wioe5_ham1.json">
</a> <a href="https://alire.ada.dev/crates/wioe5_ham2.html"><img alt=
"wioe5_ham2" src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/wioe5_ham2.json">
</a> <a href="https://alire.ada.dev/crates/wioe5_p2p.html"><img alt="wioe5_p2p"
src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/wioe5_p2p.json">
</a></p>
<p>Ada programs using the <b><tt>libsimpleio</tt></b> crate run only on Linux
target computers.</p>
<p>Ada programs using the <b><tt>mcp2221</tt></b> crate can run on Linux,
macOS, or Windows target computers, enabling you to control I/O resources on a
USB tethered <a href=
"https://www.microchip.com/en-us/product/MCP2221A">MCP2221A USB 2.0 to
I<sup>2</sup>C/UART Protocol Converter with GPIO</a>, perhaps using a module
like the <a href="https://www.adafruit.com/product/4471">Adafruit MCP2221A
Breakout</a>.</p>
<p>Ada programs using the <b><tt>remoteio</tt></b> crate can run on Linux,
macOS, or Windows target computers, enabling you to control GPIO resources on a
USB tethered or networked <a href=
"https://repo.munts.com/libsimpleio/doc/RemoteIOProtocol.pdf">Remote I/O
Protocol</a> server.</p>
<h2><a href="https://nuget.org/">NuGet</a> Packages for <a href=
"https://dotnet.microsoft.com">.Net</a></h2>
<p><a href="https://www.nuget.org/packages/libremoteio"><img alt="libremoteio"
src=
"https://img.shields.io/nuget/v/libremoteio?style=flat&logo=nuget&label=libremoteio"></a>
<a href="https://www.nuget.org/packages/libremoteio-templates"><img alt=
"libremoteio-templates" src=
"https://img.shields.io/nuget/v/libremoteio-templates?style=flat&logo=nuget&label=libremoteio-templates">
</a><br>
<a href="https://www.nuget.org/packages/libsimpleio"><img alt="libsimpleio"
src="https://img.shields.io/nuget/v/libsimpleio?style=flat&logo=nuget&label=libsimpleio">
</a> <a href="https://www.nuget.org/packages/libsimpleio-templates"><img alt=
"libsimpleio-templates" src=
"https://img.shields.io/nuget/v/libsimpleio-templates?style=flat&logo=nuget&label=libsimpleio-templates">
</a></p>
<p>Use one of the following command sequences to create a .Net program
project:</p>
<pre><b>
dotnet new install libremoteio-templates
mkdir myprogram
cd myprogram
dotnet new csharp_console_libremoteio
dotnet new sln
dotnet sln add myprogram.csproj
</b></pre>
Or
<pre><b>
dotnet new install libsimpleio-templates
mkdir myprogram
cd myprogram
dotnet new csharp_console_libsimpleio
dotnet new sln
dotnet sln add myprogram.csproj
</b></pre>
<hr>
Questions or comments to Philip Munts <a href=
"mailto:phil@munts.net">phil@munts.net</a>