1
0
mirror of https://github.com/kidoman/embd synced 2024-10-31 23:38:44 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Wu Jiang
aee34f1a02 Merge b02fcae87d into d3d8c0c5c6 2017-05-08 01:30:54 +00:00
Thorsten von Eicken
091d6f5588 gpio: don't fail if pin is already exported 2016-08-26 23:02:41 -07:00
Wu Jiang
b02fcae87d Give rpi some time to link digital pin property
It looks like Raspberry pi needs some time to get a digital pin
link properly after it is being exported.

Sample code to run:

```go
package main

import (
        "fmt"

        "github.com/kidoman/embd"
         _ "github.com/kidoman/embd/host/rpi"
)

func main() {
        defer embd.CloseGPIO()
        fmt.Println(embd.SetDirection(10, embd.Out))
}

```

- before the change, the output is:
`open /sys/class/gpio/gpio10/direction: permission denied`

- after the change, the output is `<nil>`

Close #52
2016-01-21 15:42:27 -05:00
SjB
0fa1d1b61c gpio: adding interrupt
this is inspired by Dave Cheney's gpio library and his work on EPOLL
2014-09-02 23:12:55 -04:00
Karan Misra
c35deeb17c host specific drivers can now be loaded separately
this ensures cleaner abstractions/code and will ensure that the produced
binary is as small as possible. a convenience package is provided to
easily load all hosts easily: "github.com/kidoman/embd/host/all"
2014-04-06 06:50:09 +05:30