Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
sbl::GpioHandle Struct Reference

GPIO pin handle with port, pin number, and polarity. More...

#include <handle.hpp>

Collaboration diagram for sbl::GpioHandle:

Public Member Functions

constexpr bool effective_level (bool logical_state) const noexcept
 Get the effective physical level accounting for active_low.
 

Public Attributes

uint32_t port
 GPIO port number (0 for single-port MCUs)
 
uint32_t pin
 Pin number within port.
 
bool active_low
 True if signal is active-low (inverted)
 

Detailed Description

GPIO pin handle with port, pin number, and polarity.

Represents a GPIO pin as resolved from hardware manifests. Used to pass pin configuration to driver functions.

Examples:

Definition at line 29 of file handle.hpp.

Member Function Documentation

◆ effective_level()

constexpr bool sbl::GpioHandle::effective_level ( bool  logical_state) const
inlineconstexprnoexcept

Get the effective physical level accounting for active_low.

Parameters
logical_stateLogical state (true = active/on, false = inactive/off)
Returns
Physical level to write to hardware

Definition at line 39 of file handle.hpp.

References active_low.

Member Data Documentation

◆ active_low

bool sbl::GpioHandle::active_low

True if signal is active-low (inverted)

Definition at line 32 of file handle.hpp.

Referenced by effective_level().

◆ pin

uint32_t sbl::GpioHandle::pin

Pin number within port.

Definition at line 31 of file handle.hpp.

◆ port

uint32_t sbl::GpioHandle::port

GPIO port number (0 for single-port MCUs)

Definition at line 30 of file handle.hpp.


The documentation for this struct was generated from the following file: