chip: correct docs to describe valid pin mappings

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-02-16 10:51:44 +01:00
parent 6ce713a959
commit a2f5f7bc91
1 changed files with 6 additions and 2 deletions

View File

@ -155,7 +155,9 @@ func (c *Adaptor) digitalPin(pin string, dir string) (sysfsPin sysfs.DigitalPin,
}
// 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) {
sysfsPin, err := c.digitalPin(pin, sysfs.IN)
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.
// 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) {
sysfsPin, err := c.digitalPin(pin, sysfs.OUT)
if err != nil {