Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
cycles_requirements.hpp File Reference

The cycle port: what the profiling tools need from a target. More...

Detailed Description

The cycle port: what the profiling tools need from a target.

Each MCU directory provides sbl::driver::Cycles in system/port/cycles.hpp, mounted on the include path as <sbl/system/port/cycles.hpp>:

  • init() - start the counter; boot-time only
  • read() -> uint32_t - the count, one load, wrapping at 2^32
  • rate() -> uint32_t (constexpr) - counts per second

Checked at compile time the way hw/validation checks the driver contracts. The detection lives here because system/ does not include hw/.

Usage:

static_assert(sbl::system::port::cycles_port_valid<sbl::driver::Cycles>,
"the cycle port does not meet its contract");

Definition in file cycles_requirements.hpp.

#include <cstdint>
#include <type_traits>

Go to the source code of this file.

Classes

struct  sbl::system::port::CyclesPortValidator< Port >
 

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::system
 The system layer: execution levels, the control critical section, ring buffers, assertions and the fault handler, profiling, and the port contracts.
 
namespace  sbl::system::port
 Port contracts.
 

Variables

template<typename Port >
constexpr bool sbl::system::port::cycles_port_valid = CyclesPortValidator<Port>::value