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 [2021/08/20 12:05]
avsetula
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 group> <WRAP group>
 <WRAP half column 81%> <WRAP half column 81%>
-SysFS driver ​included in the kernel module for all Unipi units with I/O (except Unipi 1.1) provides easy file-based access to all inputs and outputs ​of the unit.+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%> <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-patron">​Patron</​span></​html>​ \\
-<​html><​span class="​dev-tag dev-neuron">​Neuron</​span></​html>​ \\ +<​html><​span class="​dev-tag dev-neuron">​Neuron</​span></​html>​
-<​html><​span class="​dev-tag dev-axon">​Axon</​span></​html>​+
 ;;# ;;#
 </​WRAP>​ </​WRAP>​
Line 15: Line 32:
 ---- ----
  
-<​html><​span class="​kbBlueText">​Check the following examples to get started:</​span></​html>​+<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>​ 
 + 
 +---- 
 + 
 +**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. 
  
-{{page>​en:​sw:​02-apis:​04-sysfs:​documentation-hidden}}+{{page>​en:​sw:​02-apis:​04-sysfs:​docu-deb11-12-hidden}}