Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:sw:02-apis:04-sysfs [2020/05/22 08:27]
tomhora
en:sw:02-apis:04-sysfs [2024/03/22 12:42] (current)
avsetula
Line 1: Line 1:
 +<​html><​style>​@media only screen and 
 +  (min-width: 450px)
 +{div#​lButton,​ div#​rButton{display:​ none;​}}</​style>​
 +
 +<div class="​version-switch1">​
 +  <div class="​title">​Debian:</​div>​
 +  <div id="​tabs">​
 +  <div id="​tabs-container">​
 +      <a href=""><​span class="​actual-version">​12 & 11</​span></​a>​
 +      <a href="/​en:​sw:​02-apis:​04-sysfs-deb10-hidden"><​span>​10</​span></​a>​
 +    </​div>​
 +    ​
 +    <div id="​lButton"></​div><​div id="​lButton-bg"></​div>​
 +    <div id="​rButton"></​div><​div id="​rButton-bg"></​div>​
 +  </​div>​
 +</​div></​html>​
 +
 ====== SysFS ====== ====== SysFS ======
-<​WRAP ​center round tip 80%> +<​WRAP ​group> 
-The SysFS driver is still under development. Please report any issues or feature requests.+<WRAP half column 81%> 
 +The SysFS driver is part of the kernel module for Unipi units with inputs and outputs and provides easy file-based access to all inputs and outputs.
 </​WRAP>​ </​WRAP>​
 +<WRAP half column 15%>
 +;;#
 +<​html><​span class="​dev-tag dev-iris">​Iris</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-patron">​Patron</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-neuron">​Neuron</​span></​html>​
 +;;#
 +</​WRAP>​
 +</​WRAP>​
 +
 +----
 +
 +<WRAP center round info 95%>
 +To use 1-Wire on a Unipi unit with OpenSource OS, you must install and configure OWFS. In the case of an OS with EVOK, OWFS is already installed.
 +
 +**Do not install OWFS for Mervis OS**! It uses an alternative method to work with 1-Wire and collisions could occur.
 +</​WRAP>​
 +
 +----
 +
 +<​html><​span class="​kbBlueText">​Check the following examples of reading and writing I/O to get started: </​span></​html>​ \\
 +All files within SysFS can be accessed in the same way.
 +\\
 +
 +**DO** status reading: ​
 +<​code>​cat /​run/​unipi/​io_group1/​do_1_01/​do_value</​code>​
 +
 +Setting the **DO** to the closed state: ​
 +<​code>​echo 1 > /​run/​unipi/​io_group1/​do_1_01/​do_value</​code>​
 +
 +----
  
-SysFS driver included in the kernel module for all Unipi controllers,​ except UniPi 1.1 and UniPi 1.1 Lite, provides easy file-based access to all inputs and outputs of the controller. Check the following examples to get started:+**DI** status reading 
 +<​code>​cat /​run/​unipi/​io_group1/​di_1_01/​di_value</​code>​
  
-Set state of DO to 1 +Status reading ​of all first section **DI**'​s: ​ 
-<​code>​echo 1 > /sys/devices/​platform/​unipi_plc/io_group1/do_1_01/do_value</​code>​+<​code>​cat /run/unipi/io_group1/di_[1-3]_[0-9][0-9]/di_value</​code>​
  
-Read the state of DI +Status reading ​of all available **DI** units: 
-<​code>​cat /sys/devices/platform/unipi_plc/​io_group1/​di_1_01/​di_value</​code>​+<​code>​cat /run/unipi/io_group[1-3]/di_[1-3]_[0-9][0-9]/​di_value</​code>​
  
-All IOs can be accessed similarly. 
  
-Further documentation can be found herehttps://​git.unipi.technology/​UniPi/​unipi-kernel/​blob/​master/​docs/​sysfs-platform-unipi.txt+{{page>​en:sw:02-apis:04-sysfs:docu-deb11-12-hidden}}