Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX9-L/Peripherals/GPIOs

20 bytes removed, 2 February
Accessing the peripheral
Information about GPIOs library '''libgpiod''' - C library and tools - can be found on [https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/ git.kernel.org]
==== libgpiod example ====It is possible to cross-compile <code>libgpiod</code> in the target (if the related Yocto package is not available for installation). Once the ''autoconf-archive'' package has been installed
<pre>
dnf install autoconf-archive
</pre>
Once installed, the <code>gpio</code> utilities are availabel available in the target:
<pre class="workstation-terminal">
</pre>
===== gpio interrupt gpiomon example ===== If a push button, with proper pull-up, is connected to a GPIO line available - for example using the J33.34 28 pin available on [[AURA_SOM/AXEL_Lite_Evaluation_Kit/Interfaces_and_Connectors/WIDE | SBC AXEL Lite WIDE]] connector - the related GPIO can be used as an interrupt:
* J33.28 is connected to J10.191 SO-DIMM pin
** J33 connector is the WIDE connector in the [[AURA_Lite_SOMAURA_SOM/AXEL_Lite_Evaluation_Kit AURA_Evaluation_Kit | AURA Evaluation Kit]]
** J10 connector is the SO-DIMM connector in the AURA Evaluation Kit
** ALT-0 alternate function for this pin is <code>GPIO2_IO12</code>
^Croot@desk-mx93:~#
</pre>
 
===== gpioset example =====
For changing a GPIO output status, the <code>gpioset</code> utility can be used:
8,226
edits