mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-14 19:29:32 +08:00
chip: correct docs to describe valid pin mappings
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
6ce713a959
commit
a2f5f7bc91
@ -155,7 +155,9 @@ func (c *Adaptor) digitalPin(pin string, dir string) (sysfsPin sysfs.DigitalPin,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DigitalRead reads digital value from the specified pin.
|
// DigitalRead reads digital value from the specified pin.
|
||||||
// Valids pins are XIO-P0 through XIO-P7 (pins 13-20 on header 14).
|
// Valids pins are the XIO-P0 through XIO-P7 pins from the
|
||||||
|
// extender (pins 13-20 on header 14), as well as the SoC pins
|
||||||
|
// aka all the other pins.
|
||||||
func (c *Adaptor) DigitalRead(pin string) (val int, err error) {
|
func (c *Adaptor) DigitalRead(pin string) (val int, err error) {
|
||||||
sysfsPin, err := c.digitalPin(pin, sysfs.IN)
|
sysfsPin, err := c.digitalPin(pin, sysfs.IN)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -165,7 +167,9 @@ func (c *Adaptor) DigitalRead(pin string) (val int, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DigitalWrite writes digital value to the specified pin.
|
// DigitalWrite writes digital value to the specified pin.
|
||||||
// Valids pins are XIO-P0 through XIO-P7 (pins 13-20 on header 14).
|
// Valids pins are the XIO-P0 through XIO-P7 pins from the
|
||||||
|
// extender (pins 13-20 on header 14), as well as the SoC pins
|
||||||
|
// aka all the other pins.
|
||||||
func (c *Adaptor) DigitalWrite(pin string, val byte) (err error) {
|
func (c *Adaptor) DigitalWrite(pin string, val byte) (err error) {
|
||||||
sysfsPin, err := c.digitalPin(pin, sysfs.OUT)
|
sysfsPin, err := c.digitalPin(pin, sysfs.OUT)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user