auto initialization of PE components silly question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

auto initialization of PE components silly question

Jump to solution
577 Views
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 Solution
403 Views
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

View solution in original post

2 Replies
404 Views
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

403 Views
tomasmickus
Contributor II

Thanks :smileyhappy:

0 Kudos