This commit is contained in:
Oleg Mazurov 2011-05-20 21:39:35 -06:00
parent 2e52a1dfa6
commit b30f62d931
3 changed files with 5 additions and 4 deletions

2
README
View file

@ -1,5 +1,5 @@
This is Rev.2.0 of MAX3421E-based USB Host Library for Arduino. At the moment, this repo contains current development copy
of the code facilitating developer's exchange. For those not involved in the project, the code in its' current state doesn't bear any value.
of the code facilitating developer's exchange. For those not involved in the project, the code in its current state doesn't bear any value.
In other words, nothing works yet.
The code uses slightly modified Konstantin Chizhov's AVR pin templates, see the original here -> https://github.com/KonstantinChizhov/AvrProjects

4
Usb.h
View file

@ -134,8 +134,8 @@ public:
};
typedef MAX3421e<P6, P3> MAX3421E; // Black Widdow
//typedef MAX3421e<P10, P9> MAX3421E; // Duemielanove
//typedef MAX3421e<P6, P3> MAX3421E; // Black Widdow
typedef MAX3421e<P10, P9> MAX3421E; // Duemielanove
class USB : public MAX3421E
{

View file

@ -249,7 +249,8 @@ uint8_t ACM::Poll()
for (uint8_t i=0; i<constBufSize; i++)
buf[i] = 0;
uint16_t read = constBufSize;
uint16_t read = (constBufSize > epInfo[epInterruptInIndex].maxPktSize)
? epInfo[epInterruptInIndex].maxPktSize : constBufSize;
rcode = pUsb->inTransfer(bAddress, epInfo[epInterruptInIndex].epAddr, &read, buf);
if (rcode)