auto initialization of PE components silly question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

auto initialization of PE components silly question

ソリューションへジャンプ
609件の閲覧回数
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 解決策
435件の閲覧回数
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 返答(返信)
436件の閲覧回数
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

435件の閲覧回数
tomasmickus
Contributor II

Thanks :smileyhappy:

0 件の賞賛