mongoose-os icon indicating copy to clipboard operation
mongoose-os copied to clipboard

mgos_bitbang support clock signal?

Open Harvie opened this issue 5 years ago • 3 comments

Hello, can you please add possibility to output clock signal on second GPIO using mgos_bitbang ?

Harvie avatar Apr 08 '20 20:04 Harvie

mgos_bitbang is not currently suited for outputting continuous signals. you are better off using hardware timer.

rojer avatar Apr 10 '20 08:04 rojer

what does "continuous signal" mean? My use case is not exactly streaming a lot of data non-stop. Just sending few bytes now and then. Just short commands to configure external IC...

Harvie avatar Apr 16 '20 08:04 Harvie

ok, so you need to drive two pins - clock and then bitbang data, correct? i see how it might be useful, but making it generic is a bit problematic. you'll need to specify whether to change data on rising or falling edge of the clock, etc. i'd say, you'll need to build your own solution, if more people come along and ask for it, we can think about making it a library feature.

rojer avatar Apr 16 '20 16:04 rojer