1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 11:57:38 +02:00

gpio: make analog pin support more versatile on the bbb

This commit is contained in:
Karan Misra 2014-03-23 05:37:28 +05:30
parent 5a1a40d53b
commit f7b316332e
2 changed files with 28 additions and 4 deletions

15
utils.go Normal file
View file

@ -0,0 +1,15 @@
package embd
import "path/filepath"
// Inspiration: https://github.com/mrmorphic/hwio/blob/master/hwio.go#L451
func findFirstMatchingFile(glob string) (string, error) {
matches, err := filepath.Glob(glob)
if err != nil {
return "", err
}
if len(matches) >= 1 {
return matches[0], nil
}
return "", nil
}