Differences between LDD and high level components
- Each component provides
Init() method to initialize appropriate peripheral and driver.
Init() method returns a pointer to driver's device structure.
- Each component provides
Deinit() method to de-initialize appropriate peripheral and driver.
- 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).
- 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.
- 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.
- LDD components have RTOS adapter support allowing to generate variable code for different RTOSes.
- Runtime enable/disable of component events.
- Low Power Modes support.