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
tick_requirements.hpp File Reference

The tick port: the hardware timer under the system timer. More...

Detailed Description

The tick port: the hardware timer under the system timer.

Each MCU directory provides sbl::driver::Tick in system/port/tick.hpp, mounted on the include path as <sbl/system/port/tick.hpp>. It is a free-running counter with an overflow interrupt, shaped like CMSIS-RTOS2's OS Tick API:

  • init() - start counting; boot-time only, on every boot path
  • setup(void (*handler)()) - register the overflow handler
  • enable(), disable() - the overflow interrupt on and off
  • acknowledge() - clear the overflow flag
  • overflow() -> bool - the overflow flag is pending
  • count() -> uint32_t - the count, one load, wrapping at 2^32
  • rate() -> uint32_t (constexpr) - counts per second

The system timer (system/timer.hpp) composes the 64-bit count, the waits and millis() on top; the port carries no units beyond its rate.

Definition in file tick_requirements.hpp.

#include <cstdint>
#include <type_traits>

Go to the source code of this file.

Classes

struct  sbl::system::port::TickPortValidator< 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::tick_port_valid = TickPortValidator<Port>::value