Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Classes | Namespaces | Variables
gpio_requirements.hpp File Reference

GPIO driver requirements validator. More...

#include "method_detection.hpp"
Include dependency graph for gpio_requirements.hpp:

Go to the source code of this file.

Classes

class  sbl::validation::GpioDriverRequirements< GpioDriver >
 GPIO driver requirements validator. More...
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs functionality.
 
namespace  sbl::validation
 Compile-time validation infrastructure.
 

Variables

template<typename GpioDriver >
constexpr bool sbl::validation::gpio_driver_valid = GpioDriverRequirements<GpioDriver>::validate()
 Helper to validate a GPIO driver implementation.
 

Detailed Description

GPIO driver requirements validator.

Validates that GPIO drivers provide required functionality using the method detection system. This is the core GPIO contract enforcement for Sound Byte Libs drivers.

GPIO Driver Contract

Every Sound Byte Libs GPIO driver MUST implement these methods:

Validation Usage

Add validation at the bottom of driver gpio.hpp:

static_assert(sbl::validation::gpio_driver_valid<sbl::driver::Gpio>,
"GPIO driver missing required methods");
GPIO driver requirements validator.
See also
method_detection.hpp

Definition in file gpio_requirements.hpp.