Open main menu

DAVE Developer's Wiki β

Changes

DESK-MP1-L/Peripherals/GPIOs

62 bytes removed, 14:09, 2 August 2023
no edit summary
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|{{oldid|187718185|1817718185}}
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|02/08/2023
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|DESK-MP1-L-1.0.0 release
==Peripheral GPIOs ==
In [[ETRA_SOM | ETRA SOM]] there is an I2C I/O Expander driven via i2c: in this way, with this ETRA can handle external several pins in many different ways and most of them can be configured as GPIOs, these . These GPIOs are present available in the J11 connector.
There is no driver to configure and use these GPIOs, to To configure and write/read the GPIOs you need to interact with configure the I/O expander with i2c via I2C commands.
=== Accessing the peripheral ===
==== Usage with i2c I2C command ====
Set all GPIO on output mode, all pin pins low:
<pre class="workstation-terminal">
</pre>
set Set all pin to high, one by one:
<pre class="workstation-terminal">
</pre>
set Set all pin to high and set all to low one by one: 
<pre class="workstation-terminal">
root@desk-mp1:~# i2cset -y 1 0x34 0x2a 0xff
</pre>
set gpio Set GPIO input mode, disable debounce:
<pre class="workstation-terminal">
</pre>
Read input value:
<pre class="workstation-terminal">
8,226
edits