aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/AVRISP-MKII/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/AVRISP-MKII/Lib')
-rw-r--r--Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c11
-rw-r--r--Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c4
-rw-r--r--Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h4
-rw-r--r--Projects/AVRISP-MKII/Lib/V2Protocol.c2
-rw-r--r--Projects/AVRISP-MKII/Lib/V2Protocol.h6
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c2
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c4
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c4
-rw-r--r--Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c4
9 files changed, 21 insertions, 20 deletions
diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
index 797fa3655..7368125f6 100644
--- a/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
+++ b/Projects/AVRISP-MKII/Lib/ISP/ISPProtocol.c
@@ -150,7 +150,7 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
Endpoint_Read_Stream_LE(&Write_Memory_Params, (sizeof(Write_Memory_Params) -
sizeof(Write_Memory_Params.ProgData)), NULL);
Write_Memory_Params.BytesToWrite = SwapEndian_16(Write_Memory_Params.BytesToWrite);
-
+
if (Write_Memory_Params.BytesToWrite > sizeof(Write_Memory_Params.ProgData))
{
Endpoint_ClearOUT();
@@ -236,7 +236,7 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
/* Must reset the polling address afterwards, so it is not erroneously used for the next byte */
PollAddress = 0;
}
-
+
/* EEPROM just increments the address each byte, flash needs to increment on each word and
* also check to ensure that a LOAD EXTENDED ADDRESS command is issued each time the extended
* address boundary has been crossed during FLASH memory programming */
@@ -248,7 +248,7 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
MustLoadExtendedAddress = true;
}
}
-
+
/* If the current page must be committed, send the PROGRAM PAGE command to the target */
if (Write_Memory_Params.ProgrammingMode & PROG_MODE_COMMIT_PAGE_MASK)
{
@@ -271,7 +271,7 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
/* Check to see if the FLASH address has crossed the extended address boundary */
if ((V2Command == CMD_PROGRAM_FLASH_ISP) && !(CurrentAddress & 0xFFFF))
MustLoadExtendedAddress = true;
- }
+ }
Endpoint_Write_8(V2Command);
Endpoint_Write_8(ProgrammingStatus);
@@ -293,7 +293,7 @@ void ISPProtocol_ReadMemory(uint8_t V2Command)
Endpoint_Read_Stream_LE(&Read_Memory_Params, sizeof(Read_Memory_Params), NULL);
Read_Memory_Params.BytesToRead = SwapEndian_16(Read_Memory_Params.BytesToRead);
-
+
Endpoint_ClearOUT();
Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
@@ -526,3 +526,4 @@ void ISPProtocol_DelayMS(uint8_t DelayMS)
}
#endif
+
diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
index a6ec53600..04bfcb5f8 100644
--- a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
+++ b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
@@ -178,7 +178,7 @@ void ISPTarget_DisableTargetISP(void)
{
DDRB &= ~((1 << 1) | (1 << 2));
PORTB &= ~((1 << 0) | (1 << 3));
-
+
/* Must re-enable rescue clock once software ISP has exited, as the timer for the rescue clock is
* re-purposed for software SPI */
ISPTarget_ConfigureRescueClock();
@@ -195,7 +195,7 @@ void ISPTarget_ConfigureRescueClock(void)
#if defined(XCK_RESCUE_CLOCK_ENABLE)
/* Configure XCK as an output for the specified AVR model */
DDRD |= (1 << 5);
-
+
/* Start USART to generate a 4MHz clock on the XCK pin */
UBRR1 = ((F_CPU / 2 / ISP_RESCUE_CLOCK_SPEED) - 1);
UCSR1B = (1 << TXEN1);
diff --git a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
index 350283f5e..d8ace7a7d 100644
--- a/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
+++ b/Projects/AVRISP-MKII/Lib/ISP/ISPTarget.h
@@ -113,7 +113,7 @@
if (HardwareSPIMode)
return ~SPI_ReceiveByte();
else
- return ~ISPTarget_TransferSoftSPIByte(0x00);
+ return ~ISPTarget_TransferSoftSPIByte(0x00);
#endif
}
@@ -135,7 +135,7 @@
if (HardwareSPIMode)
return ~SPI_TransferByte(Byte);
else
- return ~ISPTarget_TransferSoftSPIByte(Byte);
+ return ~ISPTarget_TransferSoftSPIByte(Byte);
#endif
}
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.c b/Projects/AVRISP-MKII/Lib/V2Protocol.c
index 65e34fad9..8f008106f 100644
--- a/Projects/AVRISP-MKII/Lib/V2Protocol.c
+++ b/Projects/AVRISP-MKII/Lib/V2Protocol.c
@@ -61,7 +61,7 @@ void V2Protocol_Init(void)
#endif
V2Params_LoadNonVolatileParamValues();
-
+
#if defined(ENABLE_ISP_PROTOCOL)
ISPTarget_ConfigureRescueClock();
#endif
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.h b/Projects/AVRISP-MKII/Lib/V2Protocol.h
index 33ef431cd..59752e58f 100644
--- a/Projects/AVRISP-MKII/Lib/V2Protocol.h
+++ b/Projects/AVRISP-MKII/Lib/V2Protocol.h
@@ -40,7 +40,7 @@
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
-
+
#include <LUFA/Drivers/USB/USB.h>
#include "../Descriptors.h"
@@ -61,11 +61,11 @@
#if defined(USB_SERIES_4_AVR) && ((VTARGET_ADC_CHANNEL == 2) || (VTARGET_ADC_CHANNEL == 3)) && !defined(NO_VTARGET_DETECT)
#error The U4 AVR chips do not contain ADC channels 2 or 3. Please change VTARGET_ADC_CHANNEL or define NO_VTARGET_DETECT in the makefile.
#endif
-
+
#if defined(VTARGET_USE_INTERNAL_REF)
#undef VTARGET_REF_VOLTS
#define VTARGET_REF_VOLTS 2.56
-
+
#define VTARGET_REF_MASK ADC_REFERENCE_INT2560MV
#else
#define VTARGET_REF_MASK ADC_REFERENCE_AVCC
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
index 8d74dd47f..526837cd0 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/TINYNVM.c
@@ -151,7 +151,7 @@ void TINYNVM_DisableTPI(void)
/* Clear the NVMEN bit in the TPI STATUS register to disable TPI mode */
XPROGTarget_SendByte(TPI_CMD_SSTCS | TPI_STATUS_REG);
XPROGTarget_SendByte(0x00);
-
+
/* Read back the STATUS register, check to see if it took effect */
XPROGTarget_SendByte(TPI_CMD_SLDCS | PDI_RESET_REG);
} while (XPROGTarget_ReceiveByte() != 0x00);
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
index 71fa78222..d0e6d7335 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c
@@ -149,7 +149,7 @@ void XMEGANVM_DisablePDI(void)
{
XMEGANVM_WaitWhileNVMBusBusy();
- /* Clear the RESET key in the RESET PDI register to allow the XMEGA to run - must perform this until the
+ /* Clear the RESET key in the RESET PDI register to allow the XMEGA to run - must perform this until the
* change takes effect, as in some cases it takes multiple writes (silicon bug?).
*/
do
@@ -157,7 +157,7 @@ void XMEGANVM_DisablePDI(void)
/* Clear reset register */
XPROGTarget_SendByte(PDI_CMD_STCS | PDI_RESET_REG);
XPROGTarget_SendByte(0x00);
-
+
/* Read back the reset register, check to see if it took effect */
XPROGTarget_SendByte(PDI_CMD_LDCS | PDI_RESET_REG);
} while (XPROGTarget_ReceiveByte() != 0x00);
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
index 72cc53636..132acf154 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGProtocol.c
@@ -143,7 +143,7 @@ static void XPROGProtocol_LeaveXPROGMode(void)
TINYNVM_DisableTPI();
#if defined(XCK_RESCUE_CLOCK_ENABLE) && defined(ENABLE_ISP_PROTOCOL)
- /* If the XCK rescue clock option is enabled, we need to restart it once the
+ /* If the XCK rescue clock option is enabled, we need to restart it once the
* XPROG mode has been exited, since the XPROG protocol stops it after use. */
ISPTarget_ConfigureRescueClock();
#endif
@@ -258,7 +258,7 @@ static void XPROGProtocol_WriteMemory(void)
Endpoint_ClearOUT();
Endpoint_WaitUntilReady();
}
-
+
Endpoint_ClearOUT();
Endpoint_SelectEndpoint(AVRISP_DATA_IN_EPNUM);
Endpoint_SetEndpointDirection(ENDPOINT_DIR_IN);
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
index 58df78559..0ba3c7674 100644
--- a/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
+++ b/Projects/AVRISP-MKII/Lib/XPROG/XPROGTarget.c
@@ -120,7 +120,7 @@ void XPROGTarget_DisableTargetTPI(void)
/* Set all USART lines as inputs, tristate */
DDRD &= ~((1 << 5) | (1 << 3));
PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
-
+
/* Tristate target /RESET line */
AUX_LINE_DDR &= ~AUX_LINE_MASK;
AUX_LINE_PORT &= ~AUX_LINE_MASK;
@@ -164,7 +164,7 @@ void XPROGTarget_SendIdle(void)
/* Switch to Tx mode if currently in Rx mode */
if (!(IsSending))
XPROGTarget_SetTxMode();
-
+
/* Need to do nothing for a full frame to send an IDLE */
for (uint8_t i = 0; i < BITS_IN_USART_FRAME; i++)
{