mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
@ -11,6 +11,7 @@ ARDUINO 1.5.6 BETA
|
|||||||
[core]
|
[core]
|
||||||
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
|
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
|
||||||
* sam: Fixed regression in analogRead() (fails to read multiple channels) (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
|
* Optimized Print::print(String&) method, now uses internal string buffer to perform block write
|
||||||
|
|
||||||
ARDUINO 1.5.5 BETA 2013.11.28
|
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) __attribute__((always_inline, unused));
|
||||||
static inline void delayMicroseconds(uint32_t usec){
|
static inline void delayMicroseconds(uint32_t usec){
|
||||||
|
if (usec == 0) return;
|
||||||
uint32_t n = usec * (VARIANT_MCK / 3000000);
|
uint32_t n = usec * (VARIANT_MCK / 3000000);
|
||||||
asm volatile(
|
asm volatile(
|
||||||
"L_%=_delayMicroseconds:" "\n\t"
|
"L_%=_delayMicroseconds:" "\n\t"
|
||||||
"subs %0, #1" "\n\t"
|
"subs %0, #1" "\n\t"
|
||||||
"bge L_%=_delayMicroseconds" "\n"
|
"bne L_%=_delayMicroseconds" "\n"
|
||||||
: "+r" (n) :
|
: "+r" (n) :
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user