component APIs with pointer/reference access approach? | Cypress Semiconductor
component APIs with pointer/reference access approach?
I wonder why the component APIs aren't written for accessing the components "by reference". Instead, for each component the API is 'cloned'. Having the API functions only once would save code space.
Is there any special reason for that (e.g. hard to implement or not fail-save, etc.)? In fact, the ARM Cortex architecture is well suited for such an approach since registers must accessed by pointers anyway.