From 1ed6925b5bf417848b83887b32e3ede05a1c691b Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Wed, 2 Dec 2009 12:02:01 +0000 Subject: 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. --- Projects/AVRISP/Lib/V2ProtocolTarget.h | 36 +++++++++------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) (limited to 'Projects/AVRISP/Lib/V2ProtocolTarget.h') 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 @@ -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 -- cgit v1.2.3