machine: move PinMode to central location

It is always implemented exactly the same way (as an uint8) so there is
no reason to implement it in each target separately.

This also makes it easier to add some documentation to it.
This commit is contained in:
Ayke van Laethem
2021-05-06 12:51:06 +02:00
committed by Ron Evans
parent 6f61b83ad5
commit 2f1f8fb075
14 changed files with 5 additions and 25 deletions
+5
View File
@@ -10,6 +10,11 @@ var (
ErrNoPinChangeChannel = errors.New("machine: no channel available for pin interrupt")
)
// PinMode sets the direction and pull mode of the pin. For example, PinOutput
// sets the pin as an output and PinInputPullup sets the pin as an input with a
// pull-up.
type PinMode uint8
type PinConfig struct {
Mode PinMode
}