544 views
in Embedded Wizard Studio by

Hi :)
 

I'm trying to receive a message over UART and show the message on my application. There's a topic explaining how to do so, but it doesn't seems to work for me.

Here's the original topic: https://ask.embedded-wizard.de/946/how-to-interact-with-received-uart-messages

I created the device object on my unit:

Here's it:

Then I added the following code on the ewmain.c:

Finally, I added the SystemEventHandler on my application and linked to the system event:

When I try to compile it I receive the following error:

Aparently the ApplicationDeviceClass is not being recognized. Does anyone has an idea of what may be the problem?

Thanks in advance.

Best Regards,

Persike.

by
Aparently I solved the compilation problem adding "#include "Application.h"" in my "ewmain.c" file. That's strange because the file is inside the "GeneratedCode", included on the makefile and also included on the "DeviceDriver.h", which was already included on the "ewmain.c" file.

Anyway, I'm using the Embedded working package to the STM34L4 provided by the EW website (compiling with GCC).

Now the compilation problem is solved, but the function is not triggering. Further debug is necessary.
by
Update: I created the project again and added the components, now it's working.

Just in case, if someone face this problem, add the #include "Application.h" in your "ewmain.c" file.

1 Answer

0 votes
by

Hello Persike,

in principle you can do that as written in your message - it will work.

But maybe it is not the best way to structure your software, because you are now accessing the device class from the code that is intended to translate the keyboard messages and to provide them as key events to the GUI application.

As you can see in this answer and in this older answer, you can implement the code to trigger your event within the device driver (see the section Processing Data from your Device Driver(s)). This is the right location to get data from your devices and to forward it to the GUI application.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...