|
HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
|
Subsystem for configuring general-purpose IOs (GPIOs). More...
#include <tmc9660.hpp>
Public Member Functions | |
| bool | setMode (uint8_t pin, bool output, bool pullEnable=false, bool pullUp=true) noexcept |
| Configure a GPIO pin as input or output. | |
| bool | writePin (uint8_t pin, bool value) noexcept |
| Write a digital value to a configured output pin. | |
| bool | readDigital (uint8_t pin, bool &value) noexcept |
| Read a digital input pin. | |
| bool | readAnalog (uint8_t pin, uint16_t &value) noexcept |
| Read an analog input (e.g. external temperature or potentiometer). | |
Private Member Functions | |
| GPIO (TMC9660 &parent) noexcept | |
Private Attributes | |
| TMC9660 & | driver |
Friends | |
| class | TMC9660 |
Subsystem for configuring general-purpose IOs (GPIOs).
Pins can be configured as digital inputs, digital outputs, or analog inputs. The input pull-up/down resistors and output state can also be controlled.
Refer to the GPIO section and TMCL commands SIO / GIO (Table 18). See datasheet page 19.
|
inlineexplicitprivatenoexcept |
|
noexcept |
Read an analog input (e.g. external temperature or potentiometer).
| pin | ADC input index | |
| [out] | value | Raw ADC value (typically 0–65535) |
|
noexcept |
Read a digital input pin.
| pin | GPIO pin index | |
| [out] | value | Logic level read from the pin |
|
noexcept |
Write a digital value to a configured output pin.
| pin | GPIO pin index |
| value | true = high, false = low |
|
private |