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
15
namespace
sbl
{
16
namespace
hal {
17
namespace
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
*/
25
enum 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
*/
39
enum 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_
sbl::hal::gpio::PinMode
PinMode
GPIO pin modes.
Definition
types.hpp:25
sbl::hal::gpio::PinMode::Output
@ Output
sbl::hal::gpio::PinMode::Input
@ Input
sbl::hal::gpio::PinMode::Analog
@ Analog
sbl::hal::gpio::PinMode::OpenDrain
@ OpenDrain
sbl::hal::gpio::PinMode::InputPullup
@ InputPullup
sbl::hal::gpio::PinMode::InputPulldown
@ InputPulldown
sbl::hal::gpio::PinLevel
PinLevel
Digital logic levels.
Definition
types.hpp:39
sbl::hal::gpio::PinLevel::Low
@ Low
sbl::hal::gpio::PinLevel::High
@ High
sbl
Root namespace for all Sound Byte Libs code.
Definition
audio_capture.hpp:16
src
sbl
hw
hal
gpio
types.hpp
Generated by
1.9.8