Sound Byte Libs 29c5ff3
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 hal {
15namespace gpio {
16
17/**
18 * @brief GPIO pin modes
19 *
20 * Standard pin configuration modes supported across ARM Cortex-M platforms.
21 * Platform implementations map these to hardware-specific configurations.
22 */
23enum class PinMode {
24 Input, ///< Digital input (high impedance)
25 Output, ///< Digital output (push-pull)
26 InputPullup, ///< Digital input with internal pull-up resistor
27 InputPulldown, ///< Digital input with internal pull-down resistor
28 OpenDrain, ///< Open-drain output (requires external pull-up)
29 Analog ///< Analog input (for ADC)
30};
31
32/**
33 * @brief Digital logic levels
34 *
35 * Standard digital logic levels for GPIO operations.
36 */
37enum class PinLevel {
38 Low = 0, ///< Logic low (0V, GND)
39 High = 1 ///< Logic high (Vdd, 3.3V typically)
40};
41
42} // namespace gpio
43} // namespace hal
44} // namespace sbl
45
46#endif // SBL_HAL_GPIO_TYPES_HPP_
PinMode
GPIO pin modes.
Definition types.hpp:23
@ 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:37
@ Low
Logic low (0V, GND)
@ High
Logic high (Vdd, 3.3V typically)
Root namespace for all Sound Byte Libs functionality.
Definition aliases.hpp:24