Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RA8875 by
Revision 67:9f834f0ff97d, committed 2014-08-31
- Comitter:
- WiredHome
- Date:
- Sun Aug 31 14:47:59 2014 +0000
- Parent:
- 66:468a11f05580
- Child:
- 68:ab08efabfc88
- Commit message:
- Count idle time to improve performance metrics.
Changed in this revision
| RA8875.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/RA8875.cpp Sun Aug 31 14:37:37 2014 +0000
+++ b/RA8875.cpp Sun Aug 31 14:47:59 2014 +0000
@@ -244,7 +244,6 @@
idlecounter = 0;
}
-
void RA8875::RegisterPerformance(method_e method)
{
unsigned long elapsed = performance.read_us();
@@ -373,8 +372,10 @@
{
int i = 20000/POLLWAITuSec; // 20 msec max
- while (i-- && ReadStatus() & mask)
+ while (i-- && ReadStatus() & mask) {
wait_us(POLLWAITuSec);
+ CountIdleTime(POLLWAITuSec);
+ }
if (i)
return true;
else
@@ -387,8 +388,10 @@
{
int i = 20000/POLLWAITuSec; // 20 msec max
- while (i-- && ReadCommand(reg) & mask)
+ while (i-- && ReadCommand(reg) & mask) {
wait_us(POLLWAITuSec);
+ CountIdleTime(POLLWAITuSec);
+ }
if (i)
return true;
else
