auto initialization of PE components silly question

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

auto initialization of PE components silly question

跳至解决方案
603 次查看
tomasmickus
Contributor II

I always avoid this problem, but now i got enough. All PE components have 'init' function, but in component inspector i could choose auto initialization, and it does it for me. Sometimes its cool when init has many parameters and component inspector sets it automatically. But when i want to change component functionality with it's functions, to use any function i must know LDD_TDeviceData, which is return value of 'init'. Where can i find component LDD_TDeviceData name, when i use auto initialization of it. Erich Styger library components don't require any return value of init for setting another functions. Thanks in advance

1 解答
429 次查看
BlackNight
NXP Employee
NXP Employee

Have a look at the header file of the *_LDD component. You will find something like this:

/*! Device data structure pointer used when auto initialization property is enabled. This constant can be passed as a first parameter to all component's methods. */

#define BitIoLdd1_DeviceData  ((LDD_TDeviceData *)PE_LDD_GetDeviceStructure(PE_LDD_COMPONENT_BitIoLdd1_ID))

For this BitIO_LDD, I can use the BitIoLdd1_DeviceData as device handle.

Erich

在原帖中查看解决方案

2 回复数
430 次查看
BlackNight
NXP Employee
NXP Employee

Have a look at the header file of the *_LDD component. You will find something like this:

/*! Device data structure pointer used when auto initialization property is enabled. This constant can be passed as a first parameter to all component's methods. */

#define BitIoLdd1_DeviceData  ((LDD_TDeviceData *)PE_LDD_GetDeviceStructure(PE_LDD_COMPONENT_BitIoLdd1_ID))

For this BitIO_LDD, I can use the BitIoLdd1_DeviceData as device handle.

Erich

429 次查看
tomasmickus
Contributor II

Thanks :smileyhappy:

0 项奖励