cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX: How to implement 2-way Task Communication of GUI task and other?

BParh.1
Senior III

So I am trying to implement:

  1. When user insert USB Stick, the display show USB stick icon
  2. User then able to click the icon and chose option to log the real life time data displayed by the dynamic graph.

This means I need to:

  1. Send message from USB Host task to GUI task (i.e. TouchGFX_Task) to indicate the USB stick has been connected/disconnected
  2. Send message from GUI task to USB Host task of request to log the data into USB stick.

Can someone give me some pointer please how to implement this 2-way communication? A sample would be great.

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief III

Simple way use global variable state and case it in both tasks.

More multicore oriented is use mesage queues. Backend Communication | TouchGFX Documentation

View solution in original post

5 REPLIES 5
MM..1
Chief III

Simple way use global variable state and case it in both tasks.

More multicore oriented is use mesage queues. Backend Communication | TouchGFX Documentation

BParh.1
Senior III

Thank you @MM..1​ , this what I was looking for

Backend Communication | TouchGFX Documentation

Alexandre RENOUX
Principal

Hello BParh.1,

I also made a document explaining Backend Communication. Maybe it will also help you ^^

/Alexandre

BParh.1
Senior III

Sweetttttt, thank you @Alexandre RENOUX​ , definitely help :grinning_face: .

I love this community hehehhe

Alexandre,

This is quite possibly the most useful document I have seen related to TouchGFX. It is much better than trying to follow the online documentation. I stumbled across this accidentally while looking for some other information, and immediately downloaded it to my design documentation folder. Maybe this is easily found somewhere else, but I have not run across it in 2 months of using TouchGFX.

I HIGHLY RECOMMEND that a sticky thread be placed at the top of the TouchGFX Q&A with the title "BACKEND COMMUNICATION TO GUI - WITH OR WITHOUT OS" and that this document be in the first post.

P.S. - You are a great communicator. The information was very clearly presented. If you have produced other TouchGFX documents like this one, please share!