383 views
in System Integration by
Reading the device class and driver documetation I supposed that each driver can be held in a separate Device Driver.

It's also possible to instantiate multiple DeviceClass Objects in the application. But in the main.c the YourDevice_Initialize(), YourDevice_ProcessData() and YourDevice_Deinitialize() methods are called only for one DeviceClass.

1 Answer

0 votes
by
Hello,

of course, you can implement several device classes / device drivers - each of them responsible for controlling a dedicated hardware, driver, etc.

In principle, you can create several autoobjects out of one class - but typically (when talking about device classes) every device class accesses a certain hardware resource exclusively. Otherwise, this can cause some conflicts, when several instances are trying to communicate with the same (identical) hardware.

In many cases, a GUI application accesses several (independent) device classes.

To answer your question: In main.c you can also access these different device drivers to initialize/deinitialize the hardware and to process the data. "YourDevice_ProcessData()" is just a place holder. You can replace this by several calls to your drivers.
by
OK, and main.c will not be overwritten by F8 in EW Studio?
by
Only the UI project is generated - for every Unit that your project contains one C file is generated.

Don't worry about your other files, like BSP, main.c, ..... Embedded Wizard Studio is responsible for the UI application - not more not less...

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

...