Commit graph

14 commits

Author SHA1 Message Date
Bill Westfield
2ca67fc36b Fix delayMicroseconds() on SAMD51 (#77)
* Fix pulseIn() on SAMD51 by writing it in plain C, so that
the CM0+-specific pulse_asm won't need to be linked.
The SAMD51 is fast enough that we can time pulses with micros()
Tested with a bunch of pulse lengths from <1us to >1s

* Implement a new delayMicroseconds() function for SAMD51
This version enables the "Debug Watchpoint and Trace" module (DWT)
in startup.c and then uses the 32bit cycle counter that is part
of DWT to count cycles indepenent of instruction timing.
Tested for good accuracy with various values between 1 and 2000us.
2019-01-09 19:57:43 -05:00
dean
87eae6f55c DM: add copyrights 2018-08-30 15:12:51 -04:00
dean
9b30cd8a59 DM: fix delay microseconds 2018-08-30 15:08:17 -04:00
Martino Facchin
503a9b3954 Make RingBuffer class template-based
This commit prepares to enlarge the ringbuffer for specific needs (at compile time).
Also, it fixes a spurious include in delay.h
2018-01-25 10:48:26 -05:00
Cristian Maglie
08de7f176c Fix prototypes to strictly match Arduino API
See https://github.com/arduino/Arduino/issues/4525
2017-07-11 16:00:11 +02:00
Cristian Maglie
1a1856c2fc License fix and cosmetic changes. 2015-06-14 17:16:37 +02:00
Cristian Maglie
56c096bd6a Fixed delayMicrosecond for non-constant case. 2014-09-23 14:30:02 +02:00
Thibaut VIARD
7722eb9cc9 Fixing delayMicroseconds() 2014-09-17 17:17:22 +02:00
Jonathan BAUDIN
ae441981d7 Validation Interrupt 2014-06-02 13:40:20 +02:00
Thibaut VIARD
919bd67524 Adding Delay API 2014-05-08 18:03:15 +02:00
Thibaut VIARD
0070eed06f compilation checkpoint 2 2014-05-05 12:29:33 +02:00
Thibaut VIARD
ce9b9285cb checkpoint 2014-05-05 11:37:53 +02:00
Thibaut VIARD
ca9316a7ed compilation fixes 2014-04-30 11:23:26 +02:00
Thibaut VIARD
d2f66d93cd Bring startup and syscalls 2014-04-23 20:22:27 +02:00