关于你这个问题,其实是LDD与 high level 部件的区别,这个在我们的help中也有讲了:
Differences between LDD and high level components
1:Each component provides Init() method to initialize appropriate peripheral and driver. Init() method returns a pointer to driver's device structure. 2:Each component provides Deinit() method to de-initialize appropriate peripheral and driver.
3:The first parameter of each component's method is a pointer to a device structure returned from Init() method. It is up to you to pass a valid device structure pointer to component's methods (null check is highly recommended).
4:The Init() method has one parameter UserDataPtr. You can pass a pointer to its own data and this pointer is then returned back as a parameter in component's events. The pointer or date pointed by this pointer is not modified by driver itself. A bare-board application typically passes a null pointer to Init() method.
5:LDD components are not automatically initialized in processor component by default. If Auto initialization property is not enabled, you must call appropriate Init() method during runtime. Otherwise the Init method is automatically called in processor component and device structure is automatically defined.
6 : LDD components have RTOS adapter support allowing to generate variable code for different RTOSes.
7 : Runtime enable/disable of component events.
8 : Low Power Modes support.