File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
hardware/arduino/sam/cores/arduino Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ ARDUINO 1.5.6 BETA
88* TFT: warning messages in PImage class and strings inside examples now stored in flash to save RAM.
99* Ethernet: added operator == for EthernetClient class (Norbert Truchsess)
1010
11+ [core]
12+ * sam: Fixed wrap-around bug in delay() (Mark Tillotson)
13+
1114ARDUINO 1.5.5 BETA 2013.11.28
1215
1316NOTICE:
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ extern "C" {
2525uint32_t millis ( void )
2626{
2727// todo: ensure no interrupts
28- return GetTickCount () ;
28+ return GetTickCount () ;
2929}
3030
3131// Interrupt-compatible version of micros
@@ -74,9 +74,12 @@ uint32_t micros( void )
7474
7575void delay ( uint32_t ms )
7676{
77- uint32_t end = GetTickCount () + ms ;
78- while (GetTickCount () < end )
79- yield ();
77+ if (ms == 0 )
78+ return ;
79+ uint32_t start = GetTickCount ();
80+ do {
81+ yield ();
82+ } while (GetTickCount () - start < ms );
8083}
8184
8285#if defined ( __ICCARM__ ) /* IAR Ewarm 5.41+ */
You can’t perform that action at this time.
0 commit comments