Writing reusable code

When you are first getting started with creating abstractions, it can be difficult to know exactly what should be abstracted versus what should be used directly. To make code fully reusable, a module should only perform one function and reference interfaces for the other pieces of functionality. Any hardware-specific calls must go through interfaces, rather than deal with the hardware directly. This is true for accessing actual hardware (such as specific pins) and also MCU-specific APIs (such as STM32 HAL).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.13.173