16#ifndef SBL_HW_HAL_INTERRUPTS_TYPES_HPP_
17#define SBL_HW_HAL_INTERRUPTS_TYPES_HPP_
63 return static_cast<uint8_t
>(
static_cast<uint8_t
>(level) << (8u -
kPriorityBits));
68 return static_cast<uint8_t
>(level) >=
static_cast<uint8_t
>(
kBasepriCeiling);
constexpr uint8_t kPriorityBits
Priority bits the target implements (STM32H750: 4 of 8).
Level
Execution levels, most urgent first.
@ Dma
Every other DMA stream (ADC, SDMMC)
@ SysTick
Millisecond tick; busy_wait_ms works from any level below.
@ ShortDeadline
Reserved for microsecond handlers that touch only SPSC queues.
@ PendSv
PendSV and SVCall (left free for an RTOS later)
@ Bus
I2C / SPI event handlers, if interrupt-driven.
@ ControlTick
Control-rate timer tick — the BASEPRI ceiling.
@ Reserved
Empty by design (unmaskable by BASEPRI)
@ Debug
Debug UART, diagnostics drain.
@ Audio
Audio DMA half/complete — the SAI streams only.
@ Exti
External pin interrupts (encoders, buttons)
@ SoftPwm
Software PWM / BCM timer (tolerates tick preemption)
@ SoftPend
Software-pended work: tud_task(), USB-MIDI parse.
@ UsbMidi
USB OTG interrupt, MIDI UART RX (both FIFO-elastic)
constexpr uint8_t encode(Level level)
Encode a level as the byte written to NVIC->IP[] / SCB->SHP[] / BASEPRI.
Trigger
External interrupt trigger types.
@ Falling
Falling edge trigger.
@ Rising
Rising edge trigger.
@ High
High level trigger.
@ Change
Any edge (rising or falling)
constexpr Level kBasepriCeiling
The level a ScopedControlCritical raises BASEPRI to.
constexpr bool masked_by_ceiling(Level level)
True if a handler at level is masked while BASEPRI sits at the ceiling.
Root namespace for all Sound Byte Libs code.