Comparison between shared LDD and unique LDD components

Processor Expert generates device driver code for specific hardware. If there is a second module of a device of the same type, it produces another set of functions for the second device. This module is not suitable for OSs as it wastes memory space.

In HAL, a new concept is introduced in LDDs, that is, shared components. A shared component is an LDD component that uses the same set of functions no matter if there are more than one device of the same type in the system. The only function that is unique is the Init(), as it initializes the device with the settings selected by you and allocates the LDD data structure for this specific device.

In other words, a shared component will have as many Init() functions as hardware devices of the same types in Processor Expert project, but the rest of the functions are shared among all those hardware modules.

At this point, it is absolutely necessary to count with a specific data structure that holds the status of each different hardware module, and this is why the LDD data structure exists.

The concept of unique component in HAL is basically the same as in traditional Processor Expert components: it generates a full set of functions for every single hardware module.