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.
- Host: GitHub
- URL: https://github.com/advancedclimatesystems/gpio
- Owner: AdvancedClimateSystems
- License: mpl-2.0
- Created: 2016-09-16T11:41:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-12T16:00:24.000Z (over 9 years ago)
- Last Synced: 2025-06-06T03:41:18.402Z (10 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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