kidoman / embd

Embedded Programming Framework in Go
http://embd.kidoman.io
MIT License
1.28k stars 156 forks source link

Support GPIO pull-ups #32

Open captncraig opened 9 years ago

captncraig commented 9 years ago

The pull-up and down functionality is currently unimplemented in the generic host. I would really like this functionality to be available for rpi.

My current workaround is using github.com/stianeikeland/go-rpio only to set the pull-ups. I'd really rather stick to embd only because I need the i2c and other awesome features.

Their implementation is at https://github.com/stianeikeland/go-rpio/blob/master/rpio.go#L232. It involves some tricky memory mapping of a register file that I am not super comfortable with.

kidoman commented 9 years ago

I will give it a shot :)

Sent from my iPhone

On 29-Jun-2015, at 4:19 pm, Craig Peterson notifications@github.com wrote:

The pull-up and down functionality is currently unimplemented in the generic host. I would really like this functionality to be available for rpi.

My current workaround is using github.com/stianeikeland/go-rpio only to set the pull-ups. I'd really rather stick to embd only because I need the i2c and other awesome features.

Their implementation is at https://github.com/stianeikeland/go-rpio/blob/master/rpio.go#L232. It involves some tricky memory mapping of a register file that I am not super comfortable with.

— Reply to this email directly or view it on GitHub.

snikch commented 8 years ago

Hey @kidoman - did you ever get a chance to have a look up pull up/down?

wallaceicy06 commented 7 years ago

+1

ivoras commented 6 years ago

Just as a notice to anyone in 2017: pullups/pulldowns are still not implemented. Basically this library cannot be used for driving buttons without additional hardware. And it's possible to implement them: https://github.com/stianeikeland/go-rpio/blob/master/rpio.go#L232