Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1/**
2 * @file types.hpp
3 * @brief GPIO common types and enumerations
4 * @ingroup hal
5 *
6 * Common GPIO types shared across the HAL layer.
7 * These types are used by both the HAL interface and platform implementations.
8 */
9
10#ifndef SBL_HAL_GPIO_TYPES_HPP_
11#define SBL_HAL_GPIO_TYPES_HPP_
12
13namespace sbl {
14namespace core {
15namespace hal {
16namespace gpio {
17
18/**
19 * @brief GPIO pin modes
20 *
21 * Standard pin configuration modes supported across ARM Cortex-M platforms.
22 * Platform implementations map these to hardware-specific configurations.
23 */
24enum class PinMode {
25 Input, ///< Digital input (high impedance)
26 Output, ///< Digital output (push-pull)
27 InputPullup, ///< Digital input with internal pull-up resistor
28 InputPulldown, ///< Digital input with internal pull-down resistor
29 OpenDrain, ///< Open-drain output (requires external pull-up)
30 Analog ///< Analog input (for ADC)
31};
32
33/**
34 * @brief Digital logic levels
35 *
36 * Standard digital logic levels for GPIO operations.
37 */
38enum class PinLevel {
39 Low = 0, ///< Logic low (0V, GND)
40 High = 1 ///< Logic high (Vdd, 3.3V typically)
41};
42
43} // namespace gpio
44} // namespace hal
45} // namespace core
46} // namespace sbl
47
48#endif // SBL_HAL_GPIO_TYPES_HPP_
PinMode
GPIO pin modes.
Definition types.hpp:24
@ Output
Digital output (push-pull)
@ Input
Digital input (high impedance)
@ Analog
Analog input (for ADC)
@ OpenDrain
Open-drain output (requires external pull-up)
@ InputPullup
Digital input with internal pull-up resistor.
@ InputPulldown
Digital input with internal pull-down resistor.
PinLevel
Digital logic levels.
Definition types.hpp:38
@ Low
Logic low (0V, GND)
@ High
Logic high (Vdd, 3.3V typically)
Root namespace for all Sound Byte Libs functionality.
Definition aliases.hpp:24