mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
parent
660c7d86fd
commit
825d8c8455
@ -11,6 +11,7 @@ ARDUINO 1.5.6 BETA
|
||||
[core]
|
||||
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
|
||||
* sam: Fixed regression in analogRead() (fails to read multiple channels) (Mark Tillotson)
|
||||
* sam: Optimized delayMicroseconds() (Rob Tillaart) #1121
|
||||
* Optimized Print::print(String&) method, now uses internal string buffer to perform block write
|
||||
|
||||
ARDUINO 1.5.5 BETA 2013.11.28
|
||||
|
@ -64,11 +64,12 @@ extern void delay( uint32_t dwMs ) ;
|
||||
*/
|
||||
static inline void delayMicroseconds(uint32_t) __attribute__((always_inline, unused));
|
||||
static inline void delayMicroseconds(uint32_t usec){
|
||||
if (usec == 0) return;
|
||||
uint32_t n = usec * (VARIANT_MCK / 3000000);
|
||||
asm volatile(
|
||||
"L_%=_delayMicroseconds:" "\n\t"
|
||||
"subs %0, #1" "\n\t"
|
||||
"bge L_%=_delayMicroseconds" "\n"
|
||||
"bne L_%=_delayMicroseconds" "\n"
|
||||
: "+r" (n) :
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user