mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
cleanup
This commit is contained in:
parent
672758c45c
commit
6427804ee3
2 changed files with 7 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
|||
#define __ADDRESS_H__
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include "max3421e.h"
|
||||
|
||||
#define USB_NAK_MAX_POWER 15 //NAK binary order maximum value
|
||||
|
@ -179,8 +180,8 @@ public:
|
|||
// Allocates new address
|
||||
virtual uint8_t AllocAddress(uint8_t parent, bool is_hub = false, uint8_t port = 0)
|
||||
{
|
||||
if (parent != 0 && port == 0)
|
||||
Serial.println("PRT:0");
|
||||
/* if (parent != 0 && port == 0)
|
||||
Serial.println("PRT:0"); */
|
||||
|
||||
if (parent > 127 || port > 7)
|
||||
return 0;
|
||||
|
@ -222,14 +223,14 @@ public:
|
|||
addr.bmAddress = port;
|
||||
}
|
||||
thePool[index].address = *((uint8_t*)&addr);
|
||||
|
||||
/*
|
||||
Serial.print("Addr:");
|
||||
Serial.print(addr.bmHub, HEX);
|
||||
Serial.print(".");
|
||||
Serial.print(addr.bmParent, HEX);
|
||||
Serial.print(".");
|
||||
Serial.println(addr.bmAddress, HEX);
|
||||
|
||||
*/
|
||||
return thePool[index].address;
|
||||
};
|
||||
// Empties pool entry
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef _USBHOST_H_
|
||||
#define _USBHOST_H_
|
||||
|
||||
#include <WProgram.h>
|
||||
//#include <WProgram.h>
|
||||
#include "avrpins.h"
|
||||
#include "max3421e.h"
|
||||
#include "usb_ch9.h"
|
||||
|
@ -251,7 +251,7 @@ uint8_t MAX3421e< SS, INTR >::Task( void )
|
|||
//Serial.println( vbusState, HEX );
|
||||
pinvalue = INTR::IsSet(); //Read();
|
||||
//pinvalue = digitalRead( MAX_INT );
|
||||
if( pinvalue == LOW ) {
|
||||
if( pinvalue == 0 ) {
|
||||
rcode = IntHandler();
|
||||
}
|
||||
// pinvalue = digitalRead( MAX_GPX );
|
||||
|
|
Loading…
Reference in a new issue