|
HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
|
BaseGpio adapter for a single TMC9660 internal GPIO channel. More...
#include <Tmc9660Handler.h>
Public Member Functions | |
| Gpio (Tmc9660Handler &parent, uint8_t gpioNumber) | |
| Construct a GPIO wrapper for a specific TMC9660 internal pin. | |
| ~Gpio () noexcept override=default | |
| Default destructor. | |
BaseGpio Interface Implementation | |
| bool | Initialize () noexcept override |
| Initialize the GPIO pin (configures as output by default on the TMC9660). | |
| bool | Deinitialize () noexcept override |
| Deinitialize (no-op; TMC9660 GPIO persists until device reset). | |
| bool | IsPinAvailable () const noexcept override |
| Check if this GPIO number is a valid TMC9660 pin (17 or 18). | |
| hf_u8_t | GetMaxPins () const noexcept override |
| Returns 2 (GPIO17 and GPIO18 are exposed). | |
| const char * | GetDescription () const noexcept override |
| Returns a description string like "TMC9660 GPIO17". | |
Private Attributes | |
| Tmc9660Handler & | parent_ |
| Owning handler instance. | |
| uint8_t | gpioNumber_ |
| TMC9660 internal GPIO pin number. | |
| char | description_ [32] |
| Human-readable description (e.g., "TMC9660 GPIO17"). | |
| hf_gpio_direction_t | direction_ = hf_gpio_direction_t::HF_GPIO_DIRECTION_OUTPUT |
| Current direction. | |
BaseGpio adapter for a single TMC9660 internal GPIO channel.
Wraps one of the TMC9660's internal GPIO pins (e.g., GPIO17, GPIO18) as a HardFOC BaseGpio instance. Supports digital read/write via the TMC9660 driver's gpio subsystem.
The TMC9660 GPIO pins are configured as push-pull outputs by default. Pull mode is limited to floating (the TMC9660 configures pull via bootloader config, not at runtime through TMCL).
| Tmc9660Handler::Gpio::Gpio | ( | Tmc9660Handler & | parent, |
| uint8_t | gpioNumber ) |
Construct a GPIO wrapper for a specific TMC9660 internal pin.
| parent | Reference to the owning Tmc9660Handler. |
| gpioNumber | TMC9660 internal GPIO number (e.g., 17 or 18). |
|
overridedefaultnoexcept |
Default destructor.
|
overridenoexcept |
Deinitialize (no-op; TMC9660 GPIO persists until device reset).
Returns a description string like "TMC9660 GPIO17".
|
overrideprotectednoexcept |
Returns the current configured direction (INPUT or OUTPUT).
|
overridenoexcept |
Returns 2 (GPIO17 and GPIO18 are exposed).
|
overrideprotectednoexcept |
Returns PUSH_PULL.
|
overrideprotectednoexcept |
Read the current level of the TMC9660 GPIO pin via the driver.
|
overrideprotectednoexcept |
Returns FLOATING (TMC9660 pull is set via bootloader config).
|
overridenoexcept |
Initialize the GPIO pin (configures as output by default on the TMC9660).
|
overridenoexcept |
Check if this GPIO number is a valid TMC9660 pin (17 or 18).
|
overrideprotectednoexcept |
Set pin direction (INPUT or OUTPUT supported).
|
overrideprotectednoexcept |
Set output mode. Only PUSH_PULL is supported.
|
overrideprotectednoexcept |
Write HIGH or LOW to the TMC9660 GPIO pin via the driver.
|
overrideprotectednoexcept |
Set pull mode. Only FLOATING is supported.
|
private |
Human-readable description (e.g., "TMC9660 GPIO17").
|
private |
Current direction.
|
private |
TMC9660 internal GPIO pin number.
|
private |
Owning handler instance.