projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix TeensyHID bootloader - change vendor page in the descriptors to match the undocum...
[pub/USBasp.git]
/
Projects
/
AVRISP
/
Lib
/
V2Protocol.h
diff --git
a/Projects/AVRISP/Lib/V2Protocol.h
b/Projects/AVRISP/Lib/V2Protocol.h
index
7a181e3
..
1777e0f
100644
(file)
--- a/
Projects/AVRISP/Lib/V2Protocol.h
+++ b/
Projects/AVRISP/Lib/V2Protocol.h
@@
-45,10
+45,19
@@
#include "V2ProtocolParams.h"
#include "ISPProtocol.h"
\r
#include "PDIProtocol.h"
\r
#include "V2ProtocolParams.h"
#include "ISPProtocol.h"
\r
#include "PDIProtocol.h"
\r
+
\r
+ /* Preprocessor Checks: */
\r
+ #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
\r
+ #undef ENABLE_ISP_PROTOCOL
\r
+
\r
+ #if !defined(ENABLE_PDI_PROTOCOL)
\r
+ #define ENABLE_PDI_PROTOCOL
\r
+ #endif
\r
+ #endif
\r
/* Macros: */
\r
/** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing */
/* Macros: */
\r
/** Programmer ID string, returned to the host during the CMD_SIGN_ON command processing */
- #define PROGRAMMER_ID
"AVRISP_MK2"
\r
+ #define PROGRAMMER_ID "AVRISP_MK2"
\r
\r
/** Timeout in milliseconds of target busy-wait loops waiting for a command to complete */
\r
#define TARGET_BUSY_TIMEOUT_MS 240
\r
\r
/** Timeout in milliseconds of target busy-wait loops waiting for a command to complete */
\r
#define TARGET_BUSY_TIMEOUT_MS 240
\r
@@
-61,7
+70,16
@@
static inline void V2Protocol_DelayMS(uint8_t DelayMS)
\r
{
\r
TCNT0 = 0;
\r
static inline void V2Protocol_DelayMS(uint8_t DelayMS)
\r
{
\r
TCNT0 = 0;
\r
- while (TCNT0 < DelayMS);
\r
+ TIFR0 = (1 << OCF1A);
\r
+
\r
+ while (DelayMS)
\r
+ {
\r
+ if (TIFR0 & (1 << OCF1A))
\r
+ {
\r
+ TIFR0 = (1 << OCF1A);
\r
+ DelayMS--;
\r
+ }
\r
+ }
\r
}
\r
/* External Variables: */
\r
}
\r
/* External Variables: */
\r