Skip to content

GPIO package with support for Atmel GPIO Controller written in Go.

License

Notifications You must be signed in to change notification settings

AdvancedClimateSystems/gpio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

GPIO package with support for Atmel GPIO Controller written in Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages