Run wspurify script on /trunk/ and /branches/ C source files, to remove any trailing whitespace at the end of each line.
This commit is contained in:
parent
77f354609f
commit
f201f6697b
278 changed files with 1000 additions and 910 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void V2Protocol_Init(void)
|
|||
#endif
|
||||
|
||||
V2Params_LoadNonVolatileParamValues();
|
||||
|
||||
|
||||
#if defined(ENABLE_ISP_PROTOCOL)
|
||||
ISPTarget_ConfigureRescueClock();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue