Getting started
Copyright IXXAT Automation GmbH
35
IEM Manual, 1.5
* of the COM_t_BOARDINFO structure)
*/
APP_dw_Protocol = s_boardInfo.dw_protocol >> 24;
...
Figure 2-11: DemoStartup()
2.3.11.1.3 Mode selection
After this procedure, the synchronous mode of the application can be selected.
In our demonstration application, we gave the opportunity to select between
synchronous (interrupt driven) or asynchronous (polling) mode. To continue
with the generic overview, for this example, the asynchronous mode is select-
ed.
...
/*
Select the update mode of the process images according
to the available protocol of the IE Module
*/
switch (APP_dw_Protocol)
{
case COM_k_PROT_PROFINET:
{
/* For PROFINET IO the process image is updated asynchronous */
b_UpdateMode = APP_k_UPDATE_MODE_ASYNC;
break;
}
...
/* In synchron mode an update of the process data is triggered
by the module, so register a user callback function to be called
from the ISR */
if (b_UpdateMode == APP_k_UPDATE_MODE_SYNC)
{
BSP_InterruptExtInit(UpdateProcessImage);
}...
Figure 2-12: Mode selection