User Tools

Site Tools


getting_started:tutorials:hal3

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
getting_started:tutorials:hal3 [2026/05/13 10:49] ursgrafgetting_started:tutorials:hal3 [2026/05/13 10:55] (current) ursgraf
Line 2: Line 2:
 In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/hal/HalTest4.cpp|HalTest4.cpp]].  In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/hal/HalTest4.cpp|HalTest4.cpp]]. 
  
-The system either uses real hardware inputs and output or makes use of a simulated gpio device. The hardware could be (TODO). You also need to install the necessary wrapper library, see [[getting_started:install_wrapper|]]. +The system either uses real hardware inputs and output or makes use of a simulated gpio device. You need to install the necessary wrapper library for gpio, see [[getting_started:install_wrapper|]]. 
  
 When using a simulated gpio device, make sure to load the kernel driver first and then create the device with When using a simulated gpio device, make sure to load the kernel driver first and then create the device with
Line 33: Line 33:
 <code> <code>
 $ cat /sys/devices/platform/gpio-sim.0/gpiochip0/sim_gpio0/value $ cat /sys/devices/platform/gpio-sim.0/gpiochip0/sim_gpio0/value
 +</code>
 +
 +Next, change the state of channel 16. This is a critical input in the safety system and causes a transition to safety level //slTwo// when pulled up. 
 +<code>
 +$ echo pull-up | sudo tee /sys/devices/platform/gpio-sim.0/gpiochip0/sim_gpio16/pull
 +</code>
 +To change back to //slOne// change the level back to '0'.
 +<code>
 +$ echo pull-down | sudo tee /sys/devices/platform/gpio-sim.0/gpiochip0/sim_gpio16/pull
 </code> </code>
getting_started/tutorials/hal3.1778662199.txt.gz · Last modified: by ursgraf