1.1k 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...