X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/de5b16909a7d9cdedc5194cf74de9ec2e59b4d60..3a03da970558de9211fc1a43b12bf69e38854d09:/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c index 7c40ff847..6fea24435 100644 --- a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c +++ b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c @@ -37,7 +37,10 @@ #if defined(ENABLE_ISP_PROTOCOL) || defined(__DOXYGEN__) -/** List of hardware SPI prescaler masks for possible AVRStudio ISP programming speeds. */ +/** List of hardware SPI prescaler masks for possible AVRStudio ISP programming speeds. + * + * \hideinitializer + */ static uint8_t SPIMaskFromSCKDuration[] PROGMEM = { #if (F_CPU == 8000000) @@ -61,7 +64,10 @@ static uint8_t SPIMaskFromSCKDuration[] PROGMEM = #endif }; -/** Lookup table to convert the slower ISP speeds into a compare value for the software SPI driver. */ +/** Lookup table to convert the slower ISP speeds into a compare value for the software SPI driver. + * + * \hideinitializer + */ static uint16_t TimerCompareFromSCKDuration[] PROGMEM = { TIMER_COMP(96386), TIMER_COMP(89888), TIMER_COMP(84211), TIMER_COMP(79208), TIMER_COMP(74767), @@ -132,7 +138,7 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK) PORTB ^= (1 << 1); } -/** Initializes the appropriate SPI driver (hardware or software, depending on the selected ISP speed) ready for +/** Initialises the appropriate SPI driver (hardware or software, depending on the selected ISP speed) ready for * communication with the attached target. */ void ISPTarget_Init(void) @@ -210,7 +216,9 @@ void ISPTarget_ChangeTargetResetLine(const bool ResetTarget) AUX_LINE_DDR |= AUX_LINE_MASK; if (!(V2Params_GetParameterValue(PARAM_RESET_POLARITY))) - AUX_LINE_PORT |= AUX_LINE_MASK; + AUX_LINE_PORT |= AUX_LINE_MASK; + else + AUX_LINE_PORT &= ~AUX_LINE_MASK; } else { @@ -267,7 +275,7 @@ uint8_t ISPTarget_WaitForProgComplete(const uint8_t ProgrammingMode, const uint8_t DelayMS, const uint8_t ReadMemCommand) { - uint8_t ProgrammingStatus = STATUS_CMD_OK; + uint8_t ProgrammingStatus = STATUS_CMD_OK; /* Determine method of Programming Complete check */ switch (ProgrammingMode & ~(PROG_MODE_PAGED_WRITES_MASK | PROG_MODE_COMMIT_PAGE_MASK))