daisy::Pin¶
representation of hardware port/pin combination
#include <daisy_core.h>
Public Functions¶
Name | |
---|---|
constexpr | Pin(const GPIOPort pt, const uint8_t pn) Constructor creates a valid pin. |
constexpr | Pin() Basic Constructor creates an invalid Pin object. |
constexpr bool | IsValid() const checks validity of a Pin |
constexpr bool | operator==(const Pin & rhs) const comparison operator for checking equality between Pin objects |
constexpr bool | operator!=(const Pin & rhs) const comparison operator for checking inequality between Pin objects |
constexpr | operator dsy_gpio_pin() const conversion operation for converting to the old-style representation of a pin. |
Public Attributes¶
Name | |
---|---|
GPIOPort | port |
uint8_t | pin |
Public Functions Documentation¶
function Pin¶
Constructor creates a valid pin.
Parameters:
- pt GPIOPort between PA, and PK corresponding to STM32 Port.
- pn pin number in range of 0-15
function Pin¶
Basic Constructor creates an invalid Pin object.
function IsValid¶
checks validity of a Pin
Returns:
- returns true if the port is a valid hardware pin, otherwise false.
function operator==¶
comparison operator for checking equality between Pin objects
function operator!=¶
comparison operator for checking inequality between Pin objects
function operator dsy_gpio_pin¶
conversion operation for converting to the old-style representation of a pin.
This allows the new Pin type to be used in place of the older, dsy_gpio_pin type.
Public Attributes Documentation¶
variable port¶
variable pin¶
Updated on 2024-01-03 at 19:41:00 +0000