Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Gpios in Yocto QT Embedded
Qt 6.11 is out! See what's new in the release blog

Gpios in Yocto QT Embedded

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ChrisG
    wrote on last edited by
    #1

    Hey Guys,

    First of all sorry for my English its not my native language. Im kind of a newbie in the Embedded Linux / Qt World so I hope my questions are not to stupid.

    Im using an embedded Board with an IMX287 CPU and I have a custom designed Yocto(Poky) with Kernel version 3.17 running on it. I used core-image-sato as Image recipe and have also included qt4-embedded on it. I can compile now own QT Programms with bitbake and run them on my yocto build.

    Now my question is : Is there an way to control the GPIOs of the IMX287 within my QT Programm(Maybe an library or something similar)? I've read there is an Qt function called "Qprocess" where I can send console commands to control my GPIOs , but this looks like a strange solution for me.

    Thx in advance for your help!

    greetings Chris

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It depends a bit on how the GPIOs are seen by your OS e.g. are they accessible through a device in /dev ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • C Offline
        C Offline
        ChrisG
        wrote on last edited by
        #3

        Hi SGaist,
        Thx for the fast reply.
        Right now I can change the direction of the gpios with commands like this:
        example:
        echo "139" > /sys/class/gpio/export
        echo "in" > /sys/class/gpio/gpio139/direction

        When i look in my /dev folder i cant see something like gpio

        My /dev folder looks like this:
        link text

        Sorry again if this answer is not accurate enough, Im a hardware guy ^^

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          sys ? Even better !

          You can use QFile to write to export and direction and voila nothing more complicated.

          Nop, very good answer :) You can be both guys ;)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • C Offline
            C Offline
            ChrisG
            wrote on last edited by
            #5

            Im far away from beeing both guys ^^ Thanks for your Help !
            Finally got an LED to blink (YAY!). Had some Issues with the Opening Mode of the Qfile . Its only working with OpenMode "WriteOnly" right now.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              There's always a beginning ;)

              IIRC sysfs can provide write-only files

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved