Pergunta

I have tried the following to export the gpio in linux userspace:

  • In kernel config,

    Device Drivers --->
          --- GPIO Support
                [*] /sys/class/gpio/... (sysfs interface)
    
  • GPIO=9

    echo $GPIO >/sys/class/gpio/export
    
  • used gpio_export(9) in my code

  • tried to export all the gpio. But no gpio is exported.

What am I missing in exporting gpio pins in sysfs..?

Foi útil?

Solução

Have you requested for the GPIO via "gpio_request"? A call to gpio_export should export the GPIO to the sysfs for control.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top