japaric / stm32f103xx-hal

HAL for the STM32F103xx family of microcontrollers
Apache License 2.0
115 stars 40 forks source link

Reintroduced pull_down_input, pull_up_input for GPIOs #99

Closed TeXitoi closed 5 years ago

TeXitoi commented 5 years ago

I found this commit on @e-matteson repo that seems to take it from @burrbull repo. It's simple and working fine, and I need it to remove that useless 10k resistor that pull up my buttons.

OK @japaric @e-matteson @burrbull?

burrbull commented 5 years ago

This is not my own code. I collect this branch a few month ago from several sources. @kellerkindt or @tib888 can say more.

e-matteson commented 5 years ago

Similarly, I forked it just to save a snapshot to use as a dependency. I can say that I've successfully used it to enable pullups on a blue-pill board, but haven't thoroughly tested or reviewed it.

kellerkindt commented 5 years ago

Neat! I had an actual use case for this a few weeks back, but then used an actual pull-up-resistors instead. I would like to test it, but on the one hand I also only have the bluepill board at hand and on the other hand probably have not enough time in the near future to give it a more in-depth test :(

TeXitoi commented 5 years ago

I've ttested on a blue pill with a button connected to ground with mc pull up, and connected to VCC with mc pull down. Everything worked. I've reviewed the code and everything seems fine.

TheZoq2 commented 5 years ago

Looks very similar to my implementation here: https://github.com/TheZoq2/stm32f103xx-hal/commit/5c11436ed4f4e8e4a97eb2486bff9219d5d0c41d

gbip commented 5 years ago

Maybe this should be merged then ? Is japaric still the main maintainer of this crate ?

TeXitoi commented 5 years ago

AFAIK, @japaric is the only one that can merge.

TheZoq2 commented 5 years ago

I believe so as well, and I also believe that he is pretty busy with other embedded-wg work. Perhaps someone else could step in as co-maintainer until @japaric has more time. I'd be happy to do it if required and it also seems like @TeXitoi would make a very good candidate since they are already inoffically reviewing a bunch of PRs

gbip commented 5 years ago

I believe so as well, and I also believe that he is pretty busy with other embedded-wg work. Perhaps someone else could step in as co-maintainer until @japaric has more time. I'd be happy to do it if required and it also seems like @TeXitoi would make a very good candidate since they are already inoffically reviewing a bunch of PRs

Check out this issue in the workgroup repository :wink:

kellerkindt commented 5 years ago

Kinda related #51