Sound Byte Libs
0.2.0-19-g53fe051
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
src
sbl
hal
interrupts
types.hpp
Go to the documentation of this file.
1
/**
2
* @file types.hpp
3
* @brief Interrupt system types and enumerations
4
* @ingroup hal
5
*
6
* Common interrupt types shared across the interrupt system.
7
* Simple enumerations and data structures - no behavior.
8
*/
9
10
#ifndef SBL_HAL_INTERRUPTS_TYPES_HPP_
11
#define SBL_HAL_INTERRUPTS_TYPES_HPP_
12
13
#include <cstdint>
14
15
namespace
sbl
{
16
namespace
core {
17
namespace
hal {
18
namespace
interrupts {
19
20
/**
21
* @brief Interrupt priority levels for ARM Cortex-M
22
*
23
* ARM Cortex-M uses lower numerical values for higher priority.
24
* These values map directly to ARM NVIC priority levels.
25
*/
26
enum class
Priority
: uint8_t {
27
Highest
= 0,
///< Highest priority (0)
28
High
= 4,
///< High priority
29
Medium
= 8,
///< Medium priority
30
Low
= 12,
///< Low priority
31
Lowest
= 15
///< Lowest priority (15)
32
};
33
34
/**
35
* @brief External interrupt trigger types
36
*/
37
enum class
Trigger
: uint8_t {
38
Rising
,
///< Rising edge trigger
39
Falling
,
///< Falling edge trigger
40
Change
,
///< Any edge (rising or falling)
41
Low
,
///< Low level trigger
42
High
///< High level trigger
43
};
44
45
/**
46
* @brief Interrupt handler function type
47
*
48
* Keep interrupt handlers fast and minimal.
49
* Avoid blocking operations in ISR context.
50
*/
51
using
Handler
= void(*)();
52
53
}
// namespace interrupts
54
}
// namespace hal
55
}
// namespace core
56
}
// namespace sbl
57
58
#endif
// SBL_HAL_INTERRUPTS_TYPES_HPP_
sbl::core::hal::interrupts::Priority
Priority
Interrupt priority levels for ARM Cortex-M.
Definition
types.hpp:26
sbl::core::hal::interrupts::Priority::Low
@ Low
Low priority.
sbl::core::hal::interrupts::Priority::Highest
@ Highest
Highest priority (0)
sbl::core::hal::interrupts::Priority::High
@ High
High priority
sbl::core::hal::interrupts::Priority::Medium
@ Medium
Medium priority.
sbl::core::hal::interrupts::Priority::Lowest
@ Lowest
Lowest priority (15)
sbl::core::hal::interrupts::Trigger
Trigger
External interrupt trigger types.
Definition
types.hpp:37
sbl::core::hal::interrupts::Trigger::Falling
@ Falling
Falling edge trigger
sbl::core::hal::interrupts::Trigger::Rising
@ Rising
Rising edge trigger.
sbl::core::hal::interrupts::Trigger::Change
@ Change
Any edge (rising or falling)
sbl::core::hal::interrupts::Handler
void(*)() Handler
Interrupt handler function type.
Definition
types.hpp:51
sbl
Root namespace for all Sound Byte Libs functionality.
Definition
aliases.hpp:24
Generated by
1.9.8