Documentation ¶
Overview ¶
Package pin declare well known pins.
pin is about physical pins, not about their logical function.
While not a protocol strictly speaking, these are "well known constants".
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicPin ¶
type BasicPin struct {
N string
}
BasicPin implements Pin as a non-functional pin.
Example ¶
Output: Exotic
var ( INVALID *BasicPin // Either floating or invalid pin GROUND *BasicPin // Ground V1_8 *BasicPin // 1.8V (filtered) V3_3 *BasicPin // 3.3V (filtered) V5 *BasicPin // 5V (filtered) DC_IN *BasicPin // DC IN; this is normally the 5V input BAT_PLUS *BasicPin // LiPo Battery + connector )
These are well known pins.
type Pin ¶
type Pin interface { // String() typically returns the pin name and number, ex: "PD6(45)" fmt.Stringer // Name returns the name of the pin. Name() string // Number returns the logical pin number or a negative number if the pin is // not a GPIO, e.g. GROUND, V3_3, etc. Number() int // Function returns a user readable string representation of what the pin is // configured to do. Common case is In and Out but it can be bus specific pin // name. Function() string }
Pin is the minimal common interface shared between gpio.PinIO and analog.PinIO.
Click to show internal directories.
Click to hide internal directories.