Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug fix in board_test.pde/h

  • Loading branch information...
commit b2d754b8578950e54a4cefbf009f517a5f5ad5d2 1 parent 867e250
Oleg Mazurov authored
Showing with 8 additions and 3 deletions.
  1. +1 −1  examples/board_test.h
  2. +7 −2 examples/board_test.pde
2  examples/board_test.h
View
@@ -11,7 +11,7 @@ const char startBanner [] PROGMEM = "\r\nCircuits At Home 2010"
"\r\nUSB Host Shield QC test routine\r\n";
const char anykey_msg [] PROGMEM = "\r\nPress any key to continue...";
const char testpassed_msg [] PROGMEM = "\r\nTest PASSED";
-const char testfailed_msg [] PROGMEM = "\r\nTest FAILED!!!";
+const char testfailed_msg [] PROGMEM = "\r\nTest FAILED*!*";
const char osctest_oscstate_msg [] PROGMEM = " Oscillator state is ";
const char test_halted_msg [] PROGMEM = "\r\nTest Halted."
"\r\n0x55 pattern is being transmitted via SPI to aid in troubleshooting";
9 examples/board_test.pde
View
@@ -1,7 +1,7 @@
/* USB Host Shield Board test routine. Runs after assembly to check board functionality */
/* USB related */
-#include <Spi.h>
+//#include <Spi.h>
#include <Max3421e.h>
#include <Max3421e_constants.h>
#include <Usb.h>
@@ -19,6 +19,8 @@ USB Usb;
void setup()
{
Serial.begin( 115200 );
+ //Serial.println("Start");
+ //Serial.println( SCK_PIN, DEC );
Max.powerOn();
printProgStr( startBanner );
printProgStr( anykey_msg );
@@ -148,14 +150,17 @@ bool usbtest()
break;
case( USB_ATTACHED_SUBSTATE_WAIT_SOF ):
printProgStr(PSTR("\r\nReset complete. Waiting for the first SOF..."));
+ //delay( 1000 );
break;
case( USB_ATTACHED_SUBSTATE_GET_DEVICE_DESCRIPTOR_SIZE ):
printProgStr(PSTR("\r\nSOF generation started. Enumerating device."));
break;
case( USB_STATE_ADDRESSING ):
printProgStr(PSTR("\r\nSetting device address"));
+ //delay( 100 );
break;
case( USB_STATE_CONFIGURING ):
+ //delay( 1000 );
printProgStr(PSTR("\r\nGetting device descriptor"));
rcode = getdevdescr( 1 );
if( rcode ) {
@@ -245,7 +250,7 @@ void test_halted()
while( 1 ) { //System Stop. Generating pattern to keep SCLK, MISO, MOSI, SS busy
digitalWrite(MAX_SS,LOW);
//Max.regRd( rREVISION );
- Spi.transfer( 0x55 );
+// Spi.transfer( 0x55 );
digitalWrite(MAX_SS,HIGH);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.