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.
Dependencies: mbed
Revision 15:5721a2648e5f, committed 2018-07-10
- Comitter:
- nolenbrown
- Date:
- Tue Jul 10 15:11:04 2018 +0000
- Parent:
- 14:f15157e3cbef
- Commit message:
- Ready for final testing.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jul 09 23:21:02 2018 +0000
+++ b/main.cpp Tue Jul 10 15:11:04 2018 +0000
@@ -75,7 +75,7 @@
void goto_STATE_TEST_LOGIC_RESET(void);
-void printTestResult(int, string);
+void printTestResultLED1(int, string);
string stateNames[STATE_UPDATE_IR + 1];
@@ -817,8 +817,10 @@
for (int j = BOUNDARY_SCAN_LENGTH; j < readVector.size(); j++) {
if (readVector[j] != writeVector[j - BOUNDARY_SCAN_LENGTH]) {
didTestPass = false;
- printf("\n\rFailed! Boundary scan data %0d != %0d", readVector[j], writeVector[j - BOUNDARY_SCAN_LENGTH]);
- fflush(stdout);
+ if (verbose) {
+ printf("\n\rFailed! Boundary scan data %0d != %0d", readVector[j], writeVector[j - BOUNDARY_SCAN_LENGTH]);
+ fflush(stdout);
+ }
}
}
@@ -880,8 +882,10 @@
for (int j = SCAN_CHAIN_LENGTH; j < readVector.size(); j++) {
if (readVector[j] != writeVector[j - SCAN_CHAIN_LENGTH]) {
didTestPass = false;
- printf("\n\rFailed! Internal scan data %0d != %0d", readVector[j], writeVector[j - SCAN_CHAIN_LENGTH]);
- fflush(stdout);
+ if (verbose) {
+ printf("\n\rFailed! Internal scan data %0d != %0d", readVector[j], writeVector[j - SCAN_CHAIN_LENGTH]);
+ fflush(stdout);
+ }
}
}
@@ -934,7 +938,11 @@
uint32_t val;
+
toggleLED1(OFF);
+ wait_ms(500);
+ toggleLED1(ON);
+ wait_ms(250);
goto_STATE_RUN_TEST_IDLE();
resultSAMPLE_PRELOAD = runTestSAMPLE_PRELOAD();
@@ -948,22 +956,22 @@
goto_STATE_RUN_TEST_IDLE();
resultBYPASS = runTestBYPASS();
- printTestResult(resultSAMPLE_PRELOAD, "Test SAMPLE_PRELOAD");
- printTestResult(resultIDCODE, "Test IDCODE");
- printTestResult(resultINTSCAN, "Test INTSCAN");
- printTestResult(resultBYPASS, "Test BYPASS");
+ printTestResultLED1(resultSAMPLE_PRELOAD, "Test SAMPLE_PRELOAD");
+ printTestResultLED1(resultIDCODE, "Test IDCODE");
+ printTestResultLED1(resultINTSCAN, "Test INTSCAN");
+ printTestResultLED1(resultBYPASS, "Test BYPASS");
if ((resultEXTEST) && (resultSAMPLE_PRELOAD) && (resultIDCODE) && (resultINTSCAN) && (resultBYPASS)) {
- printTestResult(PASS, "Overall test result.");
+ printTestResultLED1(PASS, "Overall test result.");
} else {
- printTestResult(FAIL, "Overall test result.");
+ printTestResultLED1(FAIL, "Overall test result.");
}
}
//------------------------------------------------------------------------------
-// printTestResult
+// printTestResultLED1
//------------------------------------------------------------------------------
-void printTestResult(int result, string description) {
+void printTestResultLED1(int result, string description) {
if (result) {
pc.printf("\n\rPASSED! %s", description);
toggleLED1(ON);
@@ -974,7 +982,6 @@
toggleLED1(OFF);
}
fflush(stdout);
- toggleLED1(ON);
}