Fixed attribution rights for SAM delayMicroseconds function

This commit is contained in:
Cristian Maglie 2014-09-16 12:29:36 +02:00
parent 44bcd2040b
commit 84518e442c
2 changed files with 6 additions and 1 deletions

View File

@ -214,7 +214,7 @@ ARDUINO 1.5.3 BETA - 2013.08.30
* Scrollable menus can now be scrolled with the mouse wheel
[arduino core]
* sam: Fixed delayMicrosecond() when interrupts are disabled
* sam: Fixed delayMicrosecond() when interrupts are disabled (Paul Stoffregen)
* sam: Upgraded libsam, and added missing modules (CAN, ETH, etc.) (Thibaut Viard)
* sam: Added compatibility for avr/pgmspace.h (Paul Stoffregen)
* sam: Added serialEvent*() support

View File

@ -1,5 +1,6 @@
/*
Copyright (c) 2011 Arduino. All right reserved.
Copyright (c) 2013 by Paul Stoffregen <paul@pjrc.com> (delayMicroseconds)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@ -65,6 +66,10 @@ extern void delay( uint32_t dwMs ) ;
*/
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
static inline void delayMicroseconds(uint32_t usec){
/*
* Based on Paul Stoffregen's implementation
* for Teensy 3.0 (http://www.pjrc.com/)
*/
if (usec == 0) return;
uint32_t n = usec * (VARIANT_MCK / 3000000);
asm volatile(