diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-12-02 12:02:01 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-12-02 12:02:01 +0000 |
commit | 1ed6925b5bf417848b83887b32e3ede05a1c691b (patch) | |
tree | e99aac1a5cbf4e1be0006e6f5fa8939afa1f00e4 /Projects/AVRISP/Lib/V2ProtocolTarget.h | |
parent | 1645c3d243e57134228d36c23687c2ab664c3f9c (diff) | |
download | lufa-1ed6925b5bf417848b83887b32e3ede05a1c691b.tar.gz lufa-1ed6925b5bf417848b83887b32e3ede05a1c691b.tar.bz2 lufa-1ed6925b5bf417848b83887b32e3ede05a1c691b.zip |
Factor out all the ISP related code into a seperate ISPProtocol set of files in the AVRISP Clone programmer project, to clearly seperate out the programming protocols when PDI programming is implemented.
Diffstat (limited to 'Projects/AVRISP/Lib/V2ProtocolTarget.h')
-rw-r--r-- | Projects/AVRISP/Lib/V2ProtocolTarget.h | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/Projects/AVRISP/Lib/V2ProtocolTarget.h b/Projects/AVRISP/Lib/V2ProtocolTarget.h index 0de7b39cc..121d7893f 100644 --- a/Projects/AVRISP/Lib/V2ProtocolTarget.h +++ b/Projects/AVRISP/Lib/V2ProtocolTarget.h @@ -30,11 +30,11 @@ /** \file
*
- * Header file for V2ProtocolTarget.c.
+ * Header file for ISPTarget.c.
*/
-#ifndef _V2_PROTOCOL_TARGET_
-#define _V2_PROTOCOL_TARGET_
+#ifndef _ISP_TARGET_
+#define _ISP_TARGET_
/* Includes: */
#include <avr/io.h>
@@ -49,32 +49,14 @@ /* 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 240
-
- /* External Variables: */
- extern uint32_t CurrentAddress;
-
- /* Inline Functions: */
- /** Blocking delay for a given number of milliseconds, via a hardware timer.
- *
- * \param[in] DelayMS Number of milliseconds to delay for
- */
- static inline void V2Protocol_DelayMS(uint8_t DelayMS)
- {
- TCNT0 = 0;
- while (TCNT0 < DelayMS);
- }
+ #define TOTAL_ISP_PROGRAMMING_SPEEDS 7
/* Function Prototypes: */
- uint8_t V2Protocol_GetSPIPrescalerMask(void);
- void V2Protocol_ChangeTargetResetLine(bool ResetTarget);
- void V2Protocol_DelayMS(uint8_t MS);
- uint8_t V2Protocol_WaitForProgComplete(uint8_t ProgrammingMode, uint16_t PollAddress, uint8_t PollValue,
+ uint8_t ISPTarget_GetSPIPrescalerMask(void);
+ void ISPTarget_ChangeTargetResetLine(bool ResetTarget);
+ uint8_t ISPTarget_WaitForProgComplete(uint8_t ProgrammingMode, uint16_t PollAddress, uint8_t PollValue,
uint8_t DelayMS, uint8_t ReadMemCommand);
- uint8_t V2Protocol_WaitWhileTargetBusy(void);
- void V2Protocol_LoadExtendedAddress(void);
+ uint8_t ISPTarget_WaitWhileTargetBusy(void);
+ void ISPTarget_LoadExtendedAddress(void);
#endif
|