[riot-notifications] [RIOT-OS/RIOT] Some problem about how to capture how many times high voltage appeared of a PWM wave in a certain time? (#11669)

Peter Kietzmann notifications at github.com
Tue Jun 18 09:35:53 CEST 2019

@zpw199062 it's very hard to follow your code. Next time, please prepare a tested clean version that you share. However, your `main()` should be relatively simple. Initialize one pin as interrupt pin that triggers on rising edge. When this occurs, the callback you passed during initialization will be called. In there, you can increment your counter. Please refer to [`gpio_init_int()`](https://riot-os.org/api/group__drivers__periph__gpio.html#ga48ba4c318486db320a4bf6237b49d61c). I recommend to grep through the RIOT code base if it's not clear how to use that function. Also *tests/periph_gpio* implements it, but it has all the overhead of the shell parsing...

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190618/54871360/attachment.html>

More information about the notifications mailing list