Conversation
cpu/native/include/periph_conf.h
Outdated
There was a problem hiding this comment.
#if defined(MODULE_NATIVE_GPIO_DUMMY) || defined(MODULE_NATIVE_GPIO_SYSFS)?
There was a problem hiding this comment.
I was thinking of making this configurable from the outside because the host might not have as many GPIOs.. I wasn't sure how to solve the _EN setting and just ignored it - adding to TODO
There was a problem hiding this comment.
-DNATIVE_GPIO_NUMOF=42
#ifdef NATIVE_GPIO_NUMOF
# if NATIVE_GPIO_NUMOF > 16
# define GPIO_NUMOF 16
# else
# define GPIO_NUMOF NATIVE_GPIO_NUMOF
# endif
#else
# define GPIO_NUMOF 0
#endif
#if GPIO_NUMOF > 0
# define GPIO_0_EN 1
#endif
#if GPIO_NUMOF > 1
# define GPIO_1_EN 1
#endif
…
#if GPIO_NUMOF > 15
# define GPIO_15_EN 1
#endif?
There was a problem hiding this comment.
seems to work, TA!
cpu/native/gpio/dummy/gpio.c
Outdated
There was a problem hiding this comment.
what is INT_OUT? I don't think there is something as an output interrupt for gpios...
|
rename "dummy" to "virtual" --> +1 |
|
Found to work on Raspberry PI =) |
|
I like :-) |
084f4bd to
a7e0baa
Compare
|
rebased on master |
|
@LudwigOrtmann PR needs rebase |
4865094 to
4792bea
Compare
|
Again... |
4792bea to
4b3dee2
Compare
4b3dee2 to
e2e7a6b
Compare
|
rebased on #1838 |
d4bd239 to
138ed1c
Compare
|
rebased on master |
138ed1c to
50053ee
Compare
|
rebased |
There was a problem hiding this comment.
hm, above you define, that there can be up to 32 GPIOs, but here you stop at 15...
|
I've been thinking to have the virtual interface do more or less the same as the sysfs does, namely write to / read from files in some directory structure. Any opinions? |
|
Not really, sounds sensible to me. |
|
I too think that this idea has it's merits. Do you have some kind of documentation on how to use it? Ideally for both the rpi and the virtual implementation. |
2953cc0 to
63229dc
Compare
9f184dd to
45554bf
Compare
|
Any progress? |
|
still waiting for native file descriptor infrastructure pr |
|
Shall we close as memo? |

TODO:
- [ ] enable pullup/pulldown on sysfs (if possible)not posssible- [ ] enable mapping of host GPIO numbers to native GPIO numbersExternal GPIO/sysfs documentation:
http://pi.gadgetoid.com/pinout
http://wiki.openwrt.org/doc/hardware/port.gpio
Based on #1838