Skip to content

Commit

Permalink
adding Zig examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubberazer committed Jun 26, 2024
1 parent 390dbae commit a1b9917
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ That's it, the library should be installed and ready to be used. To uninstall th

<h2 align="left">HOW TO:</h2>

You will find code examples to learn how to use the library in both: EXAMPLES_C & EXAMPLES_C++ folders, the first one contains all the C examples, the second one contains the same examples ready to compile in C++. To compile the examples you will find instructions in the comment section at the top of each of the example files
You will find code examples to learn how to use the library in both: EXAMPLES_C & EXAMPLES_C++ folders, the first one contains all the C examples, the second one contains the same examples ready to compile in C++. To compile the examples you will find instructions in the comment section at the top of each of the example files. I have also added a fodler with examples in teh Zig programming language to test interoperability.

- [jetgpio_example.c](https://github.com/Rubberazer/JETGPIO/blob/main/EXAMPLES_C/jetgpio_example.c) & [jetgpio_example.cpp](https://github.com/Rubberazer/JETGPIO/blob/main/EXAMPLES_C++/jetgpio_example.cpp) show how to setup and use any of the pins as Inputs/Outputs, this will allow you to toggle pins from 0V (logic 0) to 3.3V (logic 1) or read the pin as an input where 3.3V at the pin is a logic 1. Note that when reading inputs, floating pins will throw unreliable results (as there is no actual input)

Expand Down
2 changes: 1 addition & 1 deletion docs/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h2 align="left">INSTALLATION:</h2>
sudo make install
</pre><p> That's it, the library should be installed and ready to be used. To uninstall the library: </p><pre class="fragment">sudo make uninstall
</pre> <h2 align="left">HOW TO:</h2>
<p>You will find code examples to learn how to use the library in both: EXAMPLES_C &amp; EXAMPLES_C++ folders, the first one contains all the C examples, the second one contains the same examples ready to compile in C++. To compile the examples you will find instructions in the comment section at the top of each of the example files</p>
<p>You will find code examples to learn how to use the library in both: EXAMPLES_C &amp; EXAMPLES_C++ folders, the first one contains all the C examples, the second one contains the same examples ready to compile in C++. To compile the examples you will find instructions in the comment section at the top of each of the example files. I have also added a fodler with examples in teh Zig programming language to test interoperability.</p>
<ul>
<li><a href="https://github.com/Rubberazer/JETGPIO/blob/main/EXAMPLES_C/jetgpio_example.c">jetgpio_example.c</a> &amp; <a href="https://github.com/Rubberazer/JETGPIO/blob/main/EXAMPLES_C++/jetgpio_example.cpp">jetgpio_example.cpp</a> show how to setup and use any of the pins as Inputs/Outputs, this will allow you to toggle pins from 0V (logic 0) to 3.3V (logic 1) or read the pin as an input where 3.3V at the pin is a logic 1. Note that when reading inputs, floating pins will throw unreliable results (as there is no actual input)</li>
<li><a href="https://github.com/Rubberazer/JETGPIO/blob/main/EXAMPLES_C/jetgpio_edge.c">jetgpio_edge.c</a> &amp; <a href="https://github.com/Rubberazer/JETGPIO/blob/main/EXAMPLES_C++/jetgpio_edge.cpp">jetgpio_edge.cpp</a> show how to catch rising or falling edges in any pin working as Input, timestamp in epoch format in nanoseconds is provided</li>
Expand Down

0 comments on commit a1b9917

Please sign in to comment.