Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
library_identity.hpp
Go to the documentation of this file.
1/**
2 * @file library_identity.hpp
3 * @brief Sound Byte Libs identity and constants
4 * @ingroup common
5 *
6 * Central location for library-wide constants and identity information.
7 */
8
9#ifndef SBL_COMMON_LIBRARY_IDENTITY_HPP_
10#define SBL_COMMON_LIBRARY_IDENTITY_HPP_
11
12namespace sbl {
13namespace common {
14
15/**
16 * @brief Library identity constants
17 */
19 static constexpr const char* NAME = "Sound Byte Libs";
20 static constexpr const char* VENDOR = "Sound Byte Labs";
21 static constexpr const char* LICENSE = "Copyright (c) 2025 Michael Skiles";
22};
23
24/**
25 * @brief ARM Cortex-M hardware constants
26 *
27 * These constants define ARM Cortex-M specific limitations that the
28 * library is designed around.
29 */
31 /// Maximum pins per GPIO port (ARM Cortex-M standard)
32 static constexpr uint32_t MAX_GPIO_PINS_PER_PORT = 32;
33
34 /// Typical interrupt priority levels (0 = highest)
35 static constexpr uint32_t INTERRUPT_PRIORITY_HIGHEST = 0;
36 static constexpr uint32_t INTERRUPT_PRIORITY_HIGH = 2;
37 static constexpr uint32_t INTERRUPT_PRIORITY_NORMAL = 4;
38 static constexpr uint32_t INTERRUPT_PRIORITY_LOW = 6;
39 static constexpr uint32_t INTERRUPT_PRIORITY_LOWEST = 7;
40};
41
42/**
43 * @brief Default timing constants
44 *
45 * Common timing values used throughout the library.
46 */
48 /// Default debounce time for buttons (milliseconds)
49 static constexpr uint32_t DEFAULT_DEBOUNCE_MS = 50;
50
51 /// Default blink interval (milliseconds)
52 static constexpr uint32_t DEFAULT_BLINK_INTERVAL_MS = 500;
53
54 /// Microseconds per millisecond
55 static constexpr uint32_t MICROS_PER_MILLI = 1000;
56
57 /// Milliseconds per second
58 static constexpr uint32_t MILLIS_PER_SECOND = 1000;
59};
60
61} // namespace common
62} // namespace sbl
63
64#endif // SBL_COMMON_LIBRARY_IDENTITY_HPP_
Root namespace for all Sound Byte Libs functionality.
Definition aliases.hpp:24
ARM Cortex-M hardware constants.
static constexpr uint32_t INTERRUPT_PRIORITY_LOW
static constexpr uint32_t MAX_GPIO_PINS_PER_PORT
Maximum pins per GPIO port (ARM Cortex-M standard)
static constexpr uint32_t INTERRUPT_PRIORITY_LOWEST
static constexpr uint32_t INTERRUPT_PRIORITY_NORMAL
static constexpr uint32_t INTERRUPT_PRIORITY_HIGHEST
Typical interrupt priority levels (0 = highest)
static constexpr uint32_t INTERRUPT_PRIORITY_HIGH
Library identity constants.
static constexpr const char * NAME
static constexpr const char * LICENSE
static constexpr const char * VENDOR
Default timing constants.
static constexpr uint32_t DEFAULT_DEBOUNCE_MS
Default debounce time for buttons (milliseconds)
static constexpr uint32_t MILLIS_PER_SECOND
Milliseconds per second.
static constexpr uint32_t MICROS_PER_MILLI
Microseconds per millisecond.
static constexpr uint32_t DEFAULT_BLINK_INTERVAL_MS
Default blink interval (milliseconds)