mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Fixed attribution rights for SAM delayMicroseconds function
This commit is contained in:
parent
44bcd2040b
commit
84518e442c
@ -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
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user