Skip to content

Commit 84518e4

Browse files
committed
Fixed attribution rights for SAM delayMicroseconds function
1 parent 44bcd20 commit 84518e4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

build/shared/revisions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ ARDUINO 1.5.3 BETA - 2013.08.30
214214
* Scrollable menus can now be scrolled with the mouse wheel
215215

216216
[arduino core]
217-
* sam: Fixed delayMicrosecond() when interrupts are disabled
217+
* sam: Fixed delayMicrosecond() when interrupts are disabled (Paul Stoffregen)
218218
* sam: Upgraded libsam, and added missing modules (CAN, ETH, etc.) (Thibaut Viard)
219219
* sam: Added compatibility for avr/pgmspace.h (Paul Stoffregen)
220220
* sam: Added serialEvent*() support

hardware/arduino/sam/cores/arduino/wiring.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
Copyright (c) 2011 Arduino. All right reserved.
3+
Copyright (c) 2013 by Paul Stoffregen <paul@pjrc.com> (delayMicroseconds)
34
45
This library is free software; you can redistribute it and/or
56
modify it under the terms of the GNU Lesser General Public
@@ -65,6 +66,10 @@ extern void delay( uint32_t dwMs ) ;
6566
*/
6667
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
6768
static inline void delayMicroseconds(uint32_t usec){
69+
/*
70+
* Based on Paul Stoffregen's implementation
71+
* for Teensy 3.0 (http://www.pjrc.com/)
72+
*/
6873
if (usec == 0) return;
6974
uint32_t n = usec * (VARIANT_MCK / 3000000);
7075
asm volatile(

0 commit comments

Comments
 (0)