|
Adapter
Hardware-independent interfaces for MCU adapters.
|
An MCU class is defined by each device-specific adapter. It groups the hardware peripherals exposed by that adapter.
The interfaces repository does not define an MCU base class or enforce a common set of peripheral accessors.
The ADC type above is the concrete peripheral adapter, which implements the required ADC interface.
Applications create the MCU using its constructor:
The MCU object owns its ADC in this example, so references obtained through adc() remain valid while the MCU exists. An adapter can choose a different lifetime strategy if necessary.