X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1645c3d243e57134228d36c23687c2ab664c3f9c..1ed6925b5bf417848b83887b32e3ede05a1c691b:/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