aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-08-25 08:09:49 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-08-25 08:09:49 +0000
commit6d1adf7339b71952d1ba8616af9422fbc7333eb1 (patch)
tree1af4c2655f56f847b4b56cb1551a77e0d3afb054 /Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h
parentf070902bdb96795c497bce283288affaa9a4fc5b (diff)
downloadlufa-6d1adf7339b71952d1ba8616af9422fbc7333eb1.tar.gz
lufa-6d1adf7339b71952d1ba8616af9422fbc7333eb1.tar.bz2
lufa-6d1adf7339b71952d1ba8616af9422fbc7333eb1.zip
Updated Benito project -- added hardware interrupt and software buffering for serial data reception to prevent missed characters, condensed pulse generation counters into a struct for clarity.
Added check to CDC_Device_BytesReceived() to ensure 0 is returned when device is not enumerated to a host. Move AVRISP project's V2Protocol_DelayMS() function to be static inline, as it is now very minimal. Added extra project doxygen documentation.
Diffstat (limited to 'Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h')
-rw-r--r--Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h b/Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h
index 2156225a5..6dce59d6c 100644
--- a/Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h
+++ b/Projects/Incomplete/AVRISP/Lib/V2ProtocolTarget.h
@@ -48,11 +48,22 @@
#include "V2ProtocolParams.h"
/* Macros: */
+ /** Total number of allowable ISP programming speeds supported by the device */
+ #define TOTAL_PROGRAMMING_SPEEDS 7
+
+ /** Timeout in milliseconds of target busy-wait loops waiting for a command to complete */
#define TARGET_BUSY_TIMEOUT_MS 150
-
+
/* External Variables: */
extern uint32_t CurrentAddress;
+ /* Inline Functions: */
+ static inline void V2Protocol_DelayMS(uint8_t MS)
+ {
+ TCNT0 = 0;
+ while (TCNT0 < MS);
+ }
+
/* Function Prototypes: */
uint8_t V2Protocol_GetSPIPrescalerMask(void);
void V2Protocol_ChangeTargetResetLine(bool ResetTarget);