 
 libgpiod yocto
Neem de libgpiod en afhankelijke bibliotheken op in uw image met de volgende instelling:
IMAGE_INSTALL:append = " libgpiod libgpiod-dev libgpiod-tools"testen libgpiod
Log in op uw eigen embedded systeem of maak verbinding via SSH.
Nu kunt u de libgpiod-commando's gebruiken en zien of de implementatie succesvol was.
Rapporteer gpio-banken
Allereerst kunt u detecteren hoeveel gpio-banken zijn geïnstalleerd.
Gebruik het volgende commando:
gpiodetectDe uitvoer moet er als volgt uitzien:
gpiochip0 [gpio0] (32 lines)
gpiochip1 [gpio1] (32 lines)
gpiochip2 [gpio2] (32 lines)
gpiochip3 [gpio3] (32 lines)
gpiochip4 [gpio4] (32 lines)Alle instellingen ophalen
Om alle instellingen te krijgen, gebruikt u de volgende opdracht:
gpioinfoDe uitvoer moet er als volgt uitzien:
gpiochip0 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	... 
	line   4:      unnamed "host-wakeup" input active-high [used]
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed         "cd"   input   active-low [used]
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed   "shutdown"  output  active-high [used]
	line  10:      unnamed      "reset"  output   active-low [used]
	...
gpiochip1 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	... 
	line  31:      unnamed       unused   input  active-high 
gpiochip2 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	...
	line  31:      unnamed       unused   input  active-high 
gpiochip3 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	...
	line  31:      unnamed       unused   input  active-high 
gpiochip4 - 32 lines:
	line   0:      unnamed       unused   input  active-high 
	...
	line  29:   "GPIO4_D5"       unused   input  active-high Eén GPIO-regel instellen
Om GPIO-regel 29 op gpiochip4 op uitvoer en hoog in te stellen, gebruikt u het volgende commando:
gpioset gpiochip4 29=1Auteursrechtlicentie
Copyright © 2022 Interelectronix e.K.
Deze broncode van het project is gelicentieerd onder de GPL-3.0 licentie.
 
 