Results 1 to 4 of 4

Thread: Qt embedded - gpio event

  1. #1

    Default Qt embedded - gpio event

    Hello,

    I am using the AVR32 evaluationboard NGW100 with the peripheral board RMT1 and a LCD with touchscreen. On the NGW runs a Ot 4.5.1 application. Alternatively to the touch i want to use pushbuttons to communicate with my program. The buttons are connected to the NGW GPIOs.
    As far as I know I have to create a custom Qt event. This event have to occur if the GPIO status is changed. How I can create such a custom event?

    Thanking you in anticipation

    Steffen

  2. #2
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt embedded - gpio event

    Hi,
    Your OS (operating system) .i.e Linux, needs to communicate that event to the qtapplication. I am not sure of the details of your kit. Is that event being sent to the Qt application?

  3. #3

    Default Re: Qt embedded - gpio event

    Hi,

    thanks for your reply!
    No the gpio event isn't being sent to my qt application and have no idea how to do this.
    Btw. on my microcontroller (NGW100) runs a linux OS and im reading the ports by using the /dev-based GPIO framework.

  4. #4
    Join Date
    Jul 2008
    Posts
    139
    Thanks
    9
    Thanked 18 Times in 15 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt embedded - gpio event

    OK, you can read the ports via /dev. In your QT application make a thread that monitors the port status (reads from /dev/..), then you can use signals/slots or QEvent to send that signal to your object.
    this is just an example. Read up on signals/slots.

    connect(SENDINGOBJECT, SIGNAL(portstatus(val)),RECOBJECT,SLOT(recportstat us(val)));

    When the port is activated make a signal .. emit portstatus(val), then in your receiver object make a slot recportstatus(val).
    Last edited by QbelcorT; 24th July 2009 at 16:49.

Similar Threads

  1. Replies: 4
    Last Post: 19th February 2009, 12:10
  2. Custom event gets not propagated to the top level widget
    By nightghost in forum Qt Programming
    Replies: 0
    Last Post: 29th January 2009, 10:06
  3. Event propagation direction
    By spraff in forum Qt Programming
    Replies: 0
    Last Post: 6th December 2008, 22:03
  4. Qt event queue overloading?
    By gct in forum Qt Programming
    Replies: 3
    Last Post: 17th March 2008, 19:39
  5. Workload in a QThread blocks main application's event loop ?
    By 0xBulbizarre in forum Qt Programming
    Replies: 14
    Last Post: 9th April 2006, 22:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.