An open API service indexing awesome lists of open source software.

https://github.com/advancedclimatesystems/gpio

GPIO package with support for Atmel GPIO Controller written in Go.
https://github.com/advancedclimatesystems/gpio

Last synced: 9 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# GPIO

GPIO package with support for [Atmel GPIO Controller][atmel]. 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][gpio].
Check it's documentation to learn how to use this type.

## Usage

```go
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][mpl] © 2016 [Advanced Climate
System][acs].

[acs]: http://advancedclimate.nl
[mpl]: LICENSE
[atmel]: https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
[gpio]: https://github.com/orangetux/gpio