embd icon indicating copy to clipboard operation
embd copied to clipboard

Support GPIO pull-ups

Open captncraig opened this issue 9 years ago • 4 comments

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.

captncraig avatar Jun 29 '15 14:06 captncraig

I will give it a shot :)

Sent from my iPhone

On 29-Jun-2015, at 4:19 pm, Craig Peterson [email protected] 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.

kidoman avatar Jun 29 '15 15:06 kidoman

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

snikch avatar Apr 09 '16 00:04 snikch

+1

wallaceicy06 avatar Mar 15 '17 05:03 wallaceicy06

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

ivoras avatar Sep 29 '17 12:09 ivoras