Commit graph

4 commits

Author SHA1 Message Date
Kay Sievers
8f1711f7cc Fix compilation warning
Add 'const' declaration to avoid:
  cores/arduino/pulse.c: In function 'pulseIn':
    cores/arduino/pulse.c:44:29: warning: initialization discards
  'const' qualifier from pointer target type [enabled by default]
     volatile uint32_t *port = &(PORT->Group[p.ulPort].IN.reg);
                             ^
2019-08-25 03:08:17 +02:00
GMagician
f937db2251 Fix compile warnings 2019-07-26 18:44:13 +02:00
Bill Westfield
f4b1ecfcea Fix pulseIn() on SAMD51 by writing it in plain C, so that (#76)
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
2019-01-09 12:05:51 -05:00
Cristian Maglie
6884e11252 Added pulseIn implementation 2015-03-25 12:38:48 +01:00