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