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

Interrupt system types: execution levels and trigger kinds. More...

Detailed Description

Interrupt system types: execution levels and trigger kinds.

One execution-level scheme for the whole library. Every platform's vector table maps onto these names (see <mcu>/driver/priorities.hpp in sbl-hardware); application code never writes a numeric priority.

Numbers are ARM NVIC levels: lower is more urgent. The STM32H750 implements four priority bits, so the encoded byte is level << 4 and the sixteen levels below are the whole space. Rationale per row: docs/research/interrupt-priority-and-real-time-scheduling.md ยง4.3.

Definition in file types.hpp.

#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs code.
 
namespace  sbl::hal
 Hardware abstraction: handles and convenience layers over the drivers.
 
namespace  sbl::hal::interrupts
 Interrupt priorities and critical sections.
 

Enumerations

enum class  sbl::hal::interrupts::Level : uint8_t {
  sbl::hal::interrupts::Reserved = 0 , sbl::hal::interrupts::ShortDeadline = 1 , sbl::hal::interrupts::Audio = 2 , sbl::hal::interrupts::UsbMidi = 4 ,
  sbl::hal::interrupts::Dma = 5 , sbl::hal::interrupts::Bus = 6 , sbl::hal::interrupts::ControlTick = 8 , sbl::hal::interrupts::SoftPwm = 9 ,
  sbl::hal::interrupts::Exti = 10 , sbl::hal::interrupts::SoftPend = 11 , sbl::hal::interrupts::Debug = 12 , sbl::hal::interrupts::SysTick = 14 ,
  sbl::hal::interrupts::PendSv = 15
}
 Execution levels, most urgent first. More...
 
enum class  sbl::hal::interrupts::Trigger : uint8_t {
  sbl::hal::interrupts::Rising , sbl::hal::interrupts::Falling , sbl::hal::interrupts::Change , sbl::hal::interrupts::Low ,
  sbl::hal::interrupts::High
}
 External interrupt trigger types. More...
 

Functions

constexpr uint8_t sbl::hal::interrupts::encode (Level level)
 Encode a level as the byte written to NVIC->IP[] / SCB->SHP[] / BASEPRI.
 
constexpr bool sbl::hal::interrupts::masked_by_ceiling (Level level)
 True if a handler at level is masked while BASEPRI sits at the ceiling.
 

Variables

constexpr Level sbl::hal::interrupts::kBasepriCeiling = Level::ControlTick
 The level a ScopedControlCritical raises BASEPRI to.
 
constexpr uint8_t sbl::hal::interrupts::kPriorityBits = 4
 Priority bits the target implements (STM32H750: 4 of 8).