gpio

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2016 License: MPL-2.0

README

GPIO

GPIO package with support for Atmel GPIO Controller. This controller is used by many SoC's such as the Atmel AT91SAM9x series. The package is only a small wrapper around the gpio.Pin type of the package orangetux/gpio. Check it's documentation to learn how to use this type.

Usage

package main

import (
    "fmt"

    "github.com/orangetux/gpio"
    "github.com/advancedclimatesystems/gpio/atmel"
)

func main() {
    pin, err := atmel.OpenPin(115, gpio.ModeInput)
    if err != nil {
        fmt.Printf("Error opening pin %s.\n", err)
        return
    }
    defer pin.Close()

    fmt.Printf("State of pin %v.\n", pin.Get())
}

License

GPIO is licensed under Mozilla Public License © 2016 Advanced Climate System.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL