aboutsummaryrefslogtreecommitdiffstats
path: root/Projects
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-12-23 01:51:39 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-12-23 01:51:39 +0000
commitf201f6697b7f99b63389509b42112026b8f6f76f (patch)
tree9f38b5271f3a5ff10083f4f3e27598ced92efe11 /Projects
parent77f354609f0411fb6541da31a889186ad402838e (diff)
downloadlufa-f201f6697b7f99b63389509b42112026b8f6f76f.tar.gz
lufa-f201f6697b7f99b63389509b42112026b8f6f76f.tar.bz2
lufa-f201f6697b7f99b63389509b42112026b8f6f76f.zip
Run wspurify script on /trunk/ and /branches/ C source files, to remove any trailing whitespace at the end of each line.
Diffstat (limited to 'Projects')
-rw-r--r--Projects/AVRISP-MKII/Descriptors.h2
-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
-rw-r--r--Projects/Benito/Benito.c2
-rw-r--r--Projects/HIDReportViewer/HIDReportViewer.c16
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Descriptors.h2
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h2
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h1
-rw-r--r--Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c6
-rw-r--r--Projects/LEDNotifier/Descriptors.h4
-rw-r--r--Projects/MIDIToneGenerator/MIDIToneGenerator.c39
-rw-r--r--Projects/MIDIToneGenerator/MIDIToneGenerator.h35
-rw-r--r--Projects/Magstripe/Descriptors.h2
-rw-r--r--Projects/MediaController/Descriptors.h2
-rw-r--r--Projects/MediaController/MediaController.c2
-rw-r--r--Projects/MissileLauncher/MissileLauncher.c2
-rw-r--r--Projects/RelayBoard/Descriptors.h2
-rw-r--r--Projects/TempDataLogger/Descriptors.h4
-rw-r--r--Projects/TempDataLogger/Lib/DS1307.c10
-rw-r--r--Projects/TempDataLogger/Lib/DS1307.h4
-rw-r--r--Projects/TempDataLogger/Lib/FATFs/ff.c7
-rw-r--r--Projects/TempDataLogger/Lib/FATFs/ff.h1
-rw-r--r--Projects/TempDataLogger/Lib/SCSI.c5
-rw-r--r--Projects/TempDataLogger/TempDataLogger.c2
-rw-r--r--Projects/USBtoSerial/Descriptors.h4
-rw-r--r--Projects/USBtoSerial/USBtoSerial.c2
-rw-r--r--Projects/Webserver/Descriptors.h6
-rw-r--r--Projects/Webserver/Lib/DHCPCommon.c1
-rw-r--r--Projects/Webserver/Lib/DHCPCommon.h2
-rw-r--r--Projects/Webserver/Lib/DHCPServerApp.c28
-rw-r--r--Projects/Webserver/Lib/FATFs/ff.c7
-rw-r--r--Projects/Webserver/Lib/FATFs/ff.h1
-rw-r--r--Projects/Webserver/Lib/SCSI.c5
-rw-r--r--Projects/Webserver/Lib/SCSI.h2
-rw-r--r--Projects/Webserver/Lib/uIPManagement.c10
-rw-r--r--Projects/Webserver/Lib/uIPManagement.h2
-rw-r--r--Projects/Webserver/USBDeviceMode.c2
-rw-r--r--Projects/Webserver/USBHostMode.c2
-rw-r--r--Projects/XPLAINBridge/AVRISPDescriptors.h2
-rw-r--r--Projects/XPLAINBridge/Lib/SoftUART.h1
-rw-r--r--Projects/XPLAINBridge/USARTDescriptors.h4
-rw-r--r--Projects/XPLAINBridge/XPLAINBridge.c2
49 files changed, 144 insertions, 132 deletions
diff --git a/Projects/AVRISP-MKII/Descriptors.h b/Projects/AVRISP-MKII/Descriptors.h
index 786e487bd..dd3663ca5 100644
--- a/Projects/AVRISP-MKII/Descriptors.h
+++ b/Projects/AVRISP-MKII/Descriptors.h
@@ -67,7 +67,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Atmel AVRISP-MKII Interface
USB_Descriptor_Interface_t AVRISP_Interface;
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
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++)
{
diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c
index 2c8f2cd34..3e63ae14d 100644
--- a/Projects/Benito/Benito.c
+++ b/Projects/Benito/Benito.c
@@ -150,7 +150,7 @@ int main(void)
{
break;
}
-
+
/* Dequeue the already sent byte from the buffer now we have confirmed that no transmission error occurred */
RingBuffer_Remove(&USARTtoUSB_Buffer);
}
diff --git a/Projects/HIDReportViewer/HIDReportViewer.c b/Projects/HIDReportViewer/HIDReportViewer.c
index f3126c080..14302c227 100644
--- a/Projects/HIDReportViewer/HIDReportViewer.c
+++ b/Projects/HIDReportViewer/HIDReportViewer.c
@@ -33,7 +33,7 @@
* Main source file for the HIDReportViewer project. This file contains the main tasks of
* the project and is responsible for the initial application hardware configuration.
*/
-
+
#include "HIDReportViewer.h"
/** Processed HID report descriptor items structure, containing information on each HID report element */
@@ -75,7 +75,7 @@ int main(void)
for (;;)
{
RetrieveDeviceData();
-
+
HID_Host_USBTask(&Device_HID_Interface);
USB_USBTask();
}
@@ -88,12 +88,12 @@ void RetrieveDeviceData(void)
{
if (USB_CurrentMode != USB_MODE_Host)
return;
-
+
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
-
+
OutputReportSizes();
OutputParsedReportItems();
-
+
LEDs_SetAllLEDs(LEDMASK_USB_READY);
USB_Host_SetDeviceConfiguration(0);
}
@@ -168,7 +168,7 @@ void OutputParsedReportItems(void)
RItem->Attributes.Logical.Maximum,
RItem->Attributes.Physical.Minimum,
RItem->Attributes.Physical.Maximum);
-
+
OutputCollectionPath(RItem->CollectionPath);
}
}
@@ -188,10 +188,10 @@ void OutputCollectionPath(const HID_CollectionPath_t* const CollectionPath)
" - Type: 0x%02" PRIX8 "\r\n"
" - Usage: 0x%02" PRIX8 "\r\n"),
CurrentNode->Type, CurrentNode->Usage);
-
+
CurrentNode = CurrentNode->Parent;
}
-
+
printf_P(PSTR(" |\r\n"
" END\r\n"));
}
diff --git a/Projects/Incomplete/StandaloneProgrammer/Descriptors.h b/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
index 0ebc36754..e77ccc14a 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
+++ b/Projects/Incomplete/StandaloneProgrammer/Descriptors.h
@@ -74,7 +74,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
index 96db7102e..1a547eb88 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
+++ b/Projects/Incomplete/StandaloneProgrammer/Lib/DataflashManager.h
@@ -66,7 +66,7 @@
/** Indicates if the disk is write protected or not. */
#define DISK_READ_ONLY false
-
+
/* Function Prototypes: */
#if defined(USB_CAN_BE_DEVICE)
void DataflashManager_WriteBlocks(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo,
diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
index 4d41717d6..82f8832c7 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
+++ b/Projects/Incomplete/StandaloneProgrammer/Lib/PetiteFATFs/pff.h
@@ -190,3 +190,4 @@ FRESULT pf_readdir (DIR*, FILINFO*); /* Read a directory item from the open di
#endif /* _FATFS */
+
diff --git a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
index 04469cad1..a6a1c0dff 100644
--- a/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
+++ b/Projects/Incomplete/StandaloneProgrammer/Lib/SCSI.c
@@ -288,7 +288,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@ -307,7 +307,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
return false;
}
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@ -341,4 +341,4 @@ static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
-#endif \ No newline at end of file
+#endif
diff --git a/Projects/LEDNotifier/Descriptors.h b/Projects/LEDNotifier/Descriptors.h
index 5ce8f34fa..fba6e031c 100644
--- a/Projects/LEDNotifier/Descriptors.h
+++ b/Projects/LEDNotifier/Descriptors.h
@@ -65,14 +65,14 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// CDC Command Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git a/Projects/MIDIToneGenerator/MIDIToneGenerator.c b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
index 851db252b..a068d75e6 100644
--- a/Projects/MIDIToneGenerator/MIDIToneGenerator.c
+++ b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
@@ -1,7 +1,7 @@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@ -9,13 +9,13 @@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@ -90,7 +90,7 @@ int main(void)
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
-
+
for (;;)
{
MIDI_EventPacket_t ReceivedMIDIEvent;
@@ -99,7 +99,7 @@ int main(void)
if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
DDSNoteData* LRUNoteStruct = &NoteData[0];
-
+
/* Find a free entry in the note table to use for the note being turned on */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
@@ -112,13 +112,13 @@ int main(void)
}
else if (NoteData[i].LRUAge >= LRUNoteStruct->LRUAge)
{
- /* If an older entry that the current entry has been found, prefer overwriting that one */
+ /* If an older entry that the current entry has been found, prefer overwriting that one */
LRUNoteStruct = &NoteData[i];
}
-
+
NoteData[i].LRUAge++;
}
-
+
/* Update the oldest note entry with the new note data and reset its age */
LRUNoteStruct->Pitch = ReceivedMIDIEvent.Data2;
LRUNoteStruct->TableIncrement = (uint32_t)(BASE_INCREMENT * SCALE_FACTOR) +
@@ -133,7 +133,7 @@ int main(void)
else if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_OFF >> 4)) && ((ReceivedMIDIEvent.Data1 & 0x0F) == 0))
{
bool FoundActiveNote = false;
-
+
/* Find the note in the note table to turn off */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
@@ -142,13 +142,13 @@ int main(void)
else if (NoteData[i].Pitch)
FoundActiveNote = true;
}
-
+
/* If all notes off, turn off the indicator LED */
if (!(FoundActiveNote))
LEDs_SetAllLEDs(LEDS_NO_LEDS);
}
}
-
+
MIDI_Device_USBTask(&Keyboard_MIDI_Interface);
USB_USBTask();
}
@@ -158,7 +158,7 @@ int main(void)
ISR(TIMER0_COMPA_vect, ISR_BLOCK)
{
uint16_t MixedSample = 0;
-
+
/* Sum together all the active notes to form a single sample */
for (uint8_t i = 0; i < MAX_SIMULTANEOUS_NOTES; i++)
{
@@ -167,13 +167,13 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
{
/* Use the top 8 bits of the table position as the sample table index */
uint8_t TableIndex = (NoteData[i].TablePosition >> 24);
-
+
/* Add the new tone sample to the accumulator and increment the table position */
MixedSample += SineTable[TableIndex];
NoteData[i].TablePosition += NoteData[i].TableIncrement;
}
}
-
+
/* Output clamped mixed sample value to the PWM */
OCR3A = (MixedSample <= 0xFF) ? MixedSample : 0xFF;
}
@@ -187,7 +187,7 @@ void SetupHardware(void)
/* Disable clock division */
clock_prescale_set(clock_div_1);
-
+
/* Hardware Initialization */
LEDs_Init();
USB_Init();
@@ -234,7 +234,7 @@ void EVENT_USB_Device_ConfigurationChanged(void)
bool ConfigSuccess = true;
ConfigSuccess &= MIDI_Device_ConfigureEndpoints(&Keyboard_MIDI_Interface);
-
+
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
}
@@ -243,3 +243,4 @@ void EVENT_USB_Device_ControlRequest(void)
{
MIDI_Device_ProcessControlRequest(&Keyboard_MIDI_Interface);
}
+
diff --git a/Projects/MIDIToneGenerator/MIDIToneGenerator.h b/Projects/MIDIToneGenerator/MIDIToneGenerator.h
index cf04b9f9a..333938df2 100644
--- a/Projects/MIDIToneGenerator/MIDIToneGenerator.h
+++ b/Projects/MIDIToneGenerator/MIDIToneGenerator.h
@@ -1,7 +1,7 @@
/*
LUFA Library
Copyright (C) Dean Camera, 2011.
-
+
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
@@ -9,13 +9,13 @@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
- Permission to use, copy, modify, distribute, and sell this
+ Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
- without fee, provided that the above copyright notice appear in
+ without fee, provided that the above copyright notice appear in
all copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of the author not be used in
- advertising or publicity pertaining to distribution of the
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaim all warranties with regard to this
@@ -32,7 +32,7 @@
*
* Header file for AudioOutput.c.
*/
-
+
#ifndef _AUDIO_OUTPUT_H_
#define _AUDIO_OUTPUT_H_
@@ -45,7 +45,7 @@
#include <stdbool.h>
#include "Descriptors.h"
-
+
#include <LUFA/Version.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Peripheral/ADC.h>
@@ -63,27 +63,27 @@
/** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
#define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
-
+
/** Scale factor used to convert the floating point frequencies and ratios into a fixed point number */
#define SCALE_FACTOR 65536
-
+
/** Base (lowest) allowable MIDI note frequency */
#define BASE_FREQUENCY 27.5
-
+
/** Ratio between each note in an octave */
#define NOTE_OCTIVE_RATIO 1.05946
-
+
/** Lowest valid MIDI pitch index */
#define BASE_PITCH_INDEX 21
-
+
/** Maximum number of MIDI notes that can be played simultaneously */
#define MAX_SIMULTANEOUS_NOTES 3
-
+
/** Number of samples in the virtual sample table (can be expanded to lower maximum frequency, but allow for
* more simultaneous notes due to the reduced amount of processing time needed when the samples are spaced out)
*/
#define VIRTUAL_SAMPLE_TABLE_SIZE 512
-
+
/** Sample table increments per period for the base MIDI note frequency */
#define BASE_INCREMENT (((F_CPU / VIRTUAL_SAMPLE_TABLE_SIZE / 2) / BASE_FREQUENCY))
@@ -98,10 +98,11 @@
/* Function Prototypes: */
void SetupHardware(void);
-
+
void EVENT_USB_Device_Connect(void);
void EVENT_USB_Device_Disconnect(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_UnhandledControlRequest(void);
-
+
#endif
+
diff --git a/Projects/Magstripe/Descriptors.h b/Projects/Magstripe/Descriptors.h
index 9a71ada96..a5436587a 100644
--- a/Projects/Magstripe/Descriptors.h
+++ b/Projects/Magstripe/Descriptors.h
@@ -50,7 +50,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config; /**< Configuration descriptor header structure */
-
+
// Keyboard HID Interface
USB_Descriptor_Interface_t HID_Interface; /**< Keyboard interface descriptor */
USB_HID_Descriptor_HID_t HID_KeyboardHID; /**< Keyboard HID descriptor */
diff --git a/Projects/MediaController/Descriptors.h b/Projects/MediaController/Descriptors.h
index 74331c27f..865b680ba 100644
--- a/Projects/MediaController/Descriptors.h
+++ b/Projects/MediaController/Descriptors.h
@@ -49,7 +49,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Media Controller HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_MediaControlHID;
diff --git a/Projects/MediaController/MediaController.c b/Projects/MediaController/MediaController.c
index 18f1a03e1..c1ec8669d 100644
--- a/Projects/MediaController/MediaController.c
+++ b/Projects/MediaController/MediaController.c
@@ -8,7 +8,7 @@
/*
Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
-
+
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
without fee, provided that the above copyright notice appear in
diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c
index e143bec72..f215cd340 100644
--- a/Projects/MissileLauncher/MissileLauncher.c
+++ b/Projects/MissileLauncher/MissileLauncher.c
@@ -104,7 +104,7 @@ int main(void)
{
Read_Joystick_Status();
DiscardNextReport();
-
+
USB_USBTask();
}
}
diff --git a/Projects/RelayBoard/Descriptors.h b/Projects/RelayBoard/Descriptors.h
index ac8a8e0aa..aeabfacfc 100644
--- a/Projects/RelayBoard/Descriptors.h
+++ b/Projects/RelayBoard/Descriptors.h
@@ -49,7 +49,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Relay Board Interface
USB_Descriptor_Interface_t RelayBoardInterface;
} USB_Descriptor_Configuration_t;
diff --git a/Projects/TempDataLogger/Descriptors.h b/Projects/TempDataLogger/Descriptors.h
index 0ba6204ec..e311e90bc 100644
--- a/Projects/TempDataLogger/Descriptors.h
+++ b/Projects/TempDataLogger/Descriptors.h
@@ -43,12 +43,12 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
-
+
// Settings Management Generic HID Interface
USB_Descriptor_Interface_t HID_Interface;
USB_HID_Descriptor_HID_t HID_GenericHID;
diff --git a/Projects/TempDataLogger/Lib/DS1307.c b/Projects/TempDataLogger/Lib/DS1307.c
index 2f84a18cf..8dbd596df 100644
--- a/Projects/TempDataLogger/Lib/DS1307.c
+++ b/Projects/TempDataLogger/Lib/DS1307.c
@@ -34,7 +34,7 @@ bool DS1307_SetTimeDate(const TimeDate_t* NewTimeDate)
NewRegValues.Byte6.Fields.Month = (NewTimeDate->Month % 10);
NewRegValues.Byte7.Fields.TenYear = (NewTimeDate->Year / 10);
NewRegValues.Byte7.Fields.Year = (NewTimeDate->Year % 10);
-
+
// Write the new Time and Date into the DS1307
if (TWI_WritePacket(DS1307_ADDRESS, 10, &WriteAddress, sizeof(WriteAddress),
(uint8_t*)&NewRegValues, sizeof(DS1307_DateTimeRegs_t)) != TWI_ERROR_NoError)
@@ -51,24 +51,24 @@ bool DS1307_GetTimeDate(TimeDate_t* const TimeDate)
TimeDate->Hour = 1;
TimeDate->Minute = 1;
TimeDate->Second = 1;
-
+
TimeDate->Day = 1;
TimeDate->Month = 1;
TimeDate->Year = 1;
-
+
return true;
#endif
DS1307_DateTimeRegs_t CurrentRegValues;
const uint8_t ReadAddress = 0;
-
+
// Read in the stored Time and Date from the DS1307
if (TWI_ReadPacket(DS1307_ADDRESS, 10, &ReadAddress, sizeof(ReadAddress),
(uint8_t*)&CurrentRegValues, sizeof(DS1307_DateTimeRegs_t)) != TWI_ERROR_NoError)
{
return false;
}
-
+
// Convert stored time value into decimal
TimeDate->Second = (CurrentRegValues.Byte1.Fields.TenSec * 10) + CurrentRegValues.Byte1.Fields.Sec;
TimeDate->Minute = (CurrentRegValues.Byte2.Fields.TenMin * 10) + CurrentRegValues.Byte2.Fields.Min;
diff --git a/Projects/TempDataLogger/Lib/DS1307.h b/Projects/TempDataLogger/Lib/DS1307.h
index 9d93f2c4c..65b816001 100644
--- a/Projects/TempDataLogger/Lib/DS1307.h
+++ b/Projects/TempDataLogger/Lib/DS1307.h
@@ -23,7 +23,7 @@
uint8_t Month;
uint8_t Year;
} TimeDate_t;
-
+
typedef struct
{
union
@@ -73,7 +73,7 @@
uint8_t IntVal;
} Byte4;
-
+
union
{
struct
diff --git a/Projects/TempDataLogger/Lib/FATFs/ff.c b/Projects/TempDataLogger/Lib/FATFs/ff.c
index 4f76915b6..1b7c7ca46 100644
--- a/Projects/TempDataLogger/Lib/FATFs/ff.c
+++ b/Projects/TempDataLogger/Lib/FATFs/ff.c
@@ -946,7 +946,7 @@ FRESULT remove_chain (
#if _USE_ERASE
if (ecl + 1 == nxt) { /* Next cluster is contiguous */
ecl = nxt;
- } else { /* End of contiguous clusters */
+ } else { /* End of contiguous clusters */
resion[0] = clust2sect(fs, scl); /* Start sector */
resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
@@ -2650,7 +2650,7 @@ FRESULT f_close (
#if _FS_REENTRANT
res = validate(fp->fs, fp->id);
if (res == FR_OK) {
- res = dec_lock(fp->lockid);
+ res = dec_lock(fp->lockid);
unlock_fs(fp->fs, FR_OK);
}
#else
@@ -2749,7 +2749,7 @@ FRESULT f_getcwd (
res = dir_read(&dj);
if (res != FR_OK) break;
if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
- res = dir_next(&dj, 0);
+ res = dir_next(&dj, 0);
} while (res == FR_OK);
if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
if (res != FR_OK) break;
@@ -3978,3 +3978,4 @@ int f_printf (
#endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC */
+
diff --git a/Projects/TempDataLogger/Lib/FATFs/ff.h b/Projects/TempDataLogger/Lib/FATFs/ff.h
index a3aad840a..b6a747154 100644
--- a/Projects/TempDataLogger/Lib/FATFs/ff.h
+++ b/Projects/TempDataLogger/Lib/FATFs/ff.h
@@ -333,3 +333,4 @@ int ff_del_syncobj (_SYNC_t); /* Delete a sync object */
#endif
#endif /* _FATFS */
+
diff --git a/Projects/TempDataLogger/Lib/SCSI.c b/Projects/TempDataLogger/Lib/SCSI.c
index a13fd1a35..bf7f5f55c 100644
--- a/Projects/TempDataLogger/Lib/SCSI.c
+++ b/Projects/TempDataLogger/Lib/SCSI.c
@@ -287,7 +287,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@ -306,7 +306,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
return false;
}
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@ -340,3 +340,4 @@ static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
+
diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c
index e8d79874b..843554147 100644
--- a/Projects/TempDataLogger/TempDataLogger.c
+++ b/Projects/TempDataLogger/TempDataLogger.c
@@ -304,7 +304,7 @@ void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDI
const uint16_t ReportSize)
{
Device_Report_t* ReportParams = (Device_Report_t*)ReportData;
-
+
DS1307_SetTimeDate(&ReportParams->TimeDate);
/* If the logging interval has changed from its current value, write it to EEPROM */
diff --git a/Projects/USBtoSerial/Descriptors.h b/Projects/USBtoSerial/Descriptors.h
index 5ce8f34fa..fba6e031c 100644
--- a/Projects/USBtoSerial/Descriptors.h
+++ b/Projects/USBtoSerial/Descriptors.h
@@ -65,14 +65,14 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// CDC Command Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c
index c34fcf70a..ad202178a 100644
--- a/Projects/USBtoSerial/USBtoSerial.c
+++ b/Projects/USBtoSerial/USBtoSerial.c
@@ -97,7 +97,7 @@ int main(void)
if (!(ReceivedByte < 0))
RingBuffer_Insert(&USBtoUSART_Buffer, ReceivedByte);
}
-
+
/* Check if the UART receive buffer flush timer has expired or the buffer is nearly full */
uint16_t BufferCount = RingBuffer_GetCount(&USARTtoUSB_Buffer);
if ((TIFR0 & (1 << TOV0)) || (BufferCount > (uint8_t)(sizeof(USARTtoUSB_Buffer_Data) * .75)))
diff --git a/Projects/Webserver/Descriptors.h b/Projects/Webserver/Descriptors.h
index da8456e93..b1825a0ff 100644
--- a/Projects/Webserver/Descriptors.h
+++ b/Projects/Webserver/Descriptors.h
@@ -74,7 +74,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// RNDIS CDC Command Interface
USB_Descriptor_Interface_Association_t CDC_IAD;
USB_Descriptor_Interface_t CDC_CCI_Interface;
@@ -82,12 +82,12 @@
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// RNDIS CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
-
+
// Mass Storage Interface
USB_Descriptor_Interface_t MS_Interface;
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
diff --git a/Projects/Webserver/Lib/DHCPCommon.c b/Projects/Webserver/Lib/DHCPCommon.c
index dac5fa797..818433b08 100644
--- a/Projects/Webserver/Lib/DHCPCommon.c
+++ b/Projects/Webserver/Lib/DHCPCommon.c
@@ -100,3 +100,4 @@ bool DHCPCommon_GetOption(const uint8_t* DHCPOptionList,
}
#endif
+
diff --git a/Projects/Webserver/Lib/DHCPCommon.h b/Projects/Webserver/Lib/DHCPCommon.h
index 652db683c..9fc9ad06e 100644
--- a/Projects/Webserver/Lib/DHCPCommon.h
+++ b/Projects/Webserver/Lib/DHCPCommon.h
@@ -40,7 +40,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
-
+
#include <uip.h>
/* Macros: */
diff --git a/Projects/Webserver/Lib/DHCPServerApp.c b/Projects/Webserver/Lib/DHCPServerApp.c
index 43d539f7a..fadb9e828 100644
--- a/Projects/Webserver/Lib/DHCPServerApp.c
+++ b/Projects/Webserver/Lib/DHCPServerApp.c
@@ -42,20 +42,20 @@
struct uip_conn* BroadcastConnection;
uint8_t LeasedIPs[255 / 8];
-
+
/** Initialization function for the DHCP server. */
void DHCPServerApp_Init(void)
{
/* Listen on port 67 for DHCP server connections from hosts */
uip_listen(HTONS(DHCP_SERVER_PORT));
-
+
/* Create a new UDP connection to the DHCP server port for the DHCP solicitation */
struct uip_udp_conn* BroadcastConnection = uip_udp_new(&uip_broadcast_addr, HTONS(DHCP_CLIENT_PORT));
/* If the connection was successfully created, bind it to the local DHCP client port */
if (BroadcastConnection != NULL)
uip_udp_bind(BroadcastConnection, HTONS(DHCP_SERVER_PORT));
-
+
/* Set all IP addresses as unleased */
memset(LeasedIPs, 0x00, sizeof(LeasedIPs));
}
@@ -88,8 +88,8 @@ void DHCPServerApp_Callback(void)
/* Try to extract out the client's preferred IP address if it is indicated in the packet */
if (!(DHCPCommon_GetOption(AppData->Options, DHCP_OPTION_REQ_IPADDR, &PreferredClientIP)))
- memcpy(&PreferredClientIP, &uip_all_zeroes_addr, sizeof(uip_ipaddr_t));
-
+ memcpy(&PreferredClientIP, &uip_all_zeroes_addr, sizeof(uip_ipaddr_t));
+
switch (DHCPMessageType)
{
case DHCP_DISCOVER:
@@ -116,7 +116,7 @@ void DHCPServerApp_Callback(void)
/* Check to see if the requested IP address has already been leased to a client */
if (!(DHCPServerApp_CheckIfIPLeased(&PreferredClientIP)))
{
- /* Create a new DHCP ACK packet to accept the IP address lease */
+ /* Create a new DHCP ACK packet to accept the IP address lease */
AppDataSize += DHCPServerApp_FillDHCPHeader(AppData, DHCP_ACK, &RemoteMACAddress, &PreferredClientIP, TransactionID);
/* Add network mask and router information to the list of DHCP ACK packet options */
@@ -133,12 +133,12 @@ void DHCPServerApp_Callback(void)
/* Create a new DHCP NAK packet to reject the requested allocation */
AppDataSize += DHCPServerApp_FillDHCPHeader(AppData, DHCP_NAK, &RemoteMACAddress, &uip_all_zeroes_addr, TransactionID);
}
-
+
/* Send the DHCP ACK or NAK packet */
uip_poll_conn(BroadcastConnection);
memcpy(&uip_udp_conn->ripaddr, &uip_broadcast_addr, sizeof(uip_ipaddr_t));
uip_udp_send(AppDataSize);
-
+
break;
case DHCP_RELEASE:
/* Mark the IP address as released in the allocation table */
@@ -179,7 +179,7 @@ static uint16_t DHCPServerApp_FillDHCPHeader(DHCP_Header_t* const DHCPHeader,
memcpy(&DHCPHeader->YourIP, PreferredClientIP, sizeof(uip_ipaddr_t));
memcpy(&DHCPHeader->ClientHardwareAddress, ClientHardwareAddress, sizeof(struct uip_eth_addr));
DHCPHeader->Cookie = DHCP_MAGIC_COOKIE;
-
+
/* Add a DHCP message type and terminator options to the start of the DHCP options field */
DHCPHeader->Options[0] = DHCP_OPTION_MSG_TYPE;
DHCPHeader->Options[1] = 1;
@@ -202,7 +202,7 @@ static bool DHCPServerApp_CheckIfIPLeased(const uip_ipaddr_t* const IPAddress)
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
-
+
/* Make sure that the requested IP address isn't already leased to the virtual server or another client */
if (IPAddress->u8[3] && !(IPAddress->u8[3] == uip_hostaddr.u8[3]) && !(LeasedIPs[Byte] & Mask))
return false;
@@ -217,13 +217,13 @@ static bool DHCPServerApp_CheckIfIPLeased(const uip_ipaddr_t* const IPAddress)
static void DHCPServerApp_GetUnleasedIP(uip_ipaddr_t* const NewIPAddress)
{
uip_ipaddr_copy(NewIPAddress, &uip_hostaddr);
-
+
/** Look through the current subnet, skipping the broadcast and zero IP addresses */
for (uint8_t IP = 1; IP < 254; IP++)
{
/* Update new IP address to lease with the current IP address to test */
NewIPAddress->u8[3] = IP;
-
+
/* If we've found an unleased IP, abort with the updated IP stored for the called */
if (!(DHCPServerApp_CheckIfIPLeased(NewIPAddress)))
return;
@@ -241,7 +241,7 @@ static void DHCPServerApp_LeaseIP(const uip_ipaddr_t* const IPAddress)
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
-
+
/* Mark the IP address as leased in the allocation table */
LeasedIPs[Byte] |= Mask;
}
@@ -257,7 +257,7 @@ static void DHCPServerApp_UnleaseIP(const uip_ipaddr_t* const IPAddress)
{
uint8_t Byte = (IPAddress->u8[3] / 8);
uint8_t Mask = (1 << (IPAddress->u8[3] % 8));
-
+
/* Mark the IP address as unleased in the allocation table */
LeasedIPs[Byte] &= ~Mask;
}
diff --git a/Projects/Webserver/Lib/FATFs/ff.c b/Projects/Webserver/Lib/FATFs/ff.c
index 4f76915b6..1b7c7ca46 100644
--- a/Projects/Webserver/Lib/FATFs/ff.c
+++ b/Projects/Webserver/Lib/FATFs/ff.c
@@ -946,7 +946,7 @@ FRESULT remove_chain (
#if _USE_ERASE
if (ecl + 1 == nxt) { /* Next cluster is contiguous */
ecl = nxt;
- } else { /* End of contiguous clusters */
+ } else { /* End of contiguous clusters */
resion[0] = clust2sect(fs, scl); /* Start sector */
resion[1] = clust2sect(fs, ecl) + fs->csize - 1; /* End sector */
disk_ioctl(fs->drv, CTRL_ERASE_SECTOR, resion); /* Erase the block */
@@ -2650,7 +2650,7 @@ FRESULT f_close (
#if _FS_REENTRANT
res = validate(fp->fs, fp->id);
if (res == FR_OK) {
- res = dec_lock(fp->lockid);
+ res = dec_lock(fp->lockid);
unlock_fs(fp->fs, FR_OK);
}
#else
@@ -2749,7 +2749,7 @@ FRESULT f_getcwd (
res = dir_read(&dj);
if (res != FR_OK) break;
if (ccl == LD_CLUST(dj.dir)) break; /* Found the entry */
- res = dir_next(&dj, 0);
+ res = dir_next(&dj, 0);
} while (res == FR_OK);
if (res == FR_NO_FILE) res = FR_INT_ERR;/* It cannot be 'not found'. */
if (res != FR_OK) break;
@@ -3978,3 +3978,4 @@ int f_printf (
#endif /* !_FS_READONLY */
#endif /* _USE_STRFUNC */
+
diff --git a/Projects/Webserver/Lib/FATFs/ff.h b/Projects/Webserver/Lib/FATFs/ff.h
index a3aad840a..b6a747154 100644
--- a/Projects/Webserver/Lib/FATFs/ff.h
+++ b/Projects/Webserver/Lib/FATFs/ff.h
@@ -333,3 +333,4 @@ int ff_del_syncobj (_SYNC_t); /* Delete a sync object */
#endif
#endif /* _FATFS */
+
diff --git a/Projects/Webserver/Lib/SCSI.c b/Projects/Webserver/Lib/SCSI.c
index a13fd1a35..bf7f5f55c 100644
--- a/Projects/Webserver/Lib/SCSI.c
+++ b/Projects/Webserver/Lib/SCSI.c
@@ -287,7 +287,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
SCSI_ASENSE_WRITE_PROTECTED,
SCSI_ASENSEQ_NO_QUALIFIER);
- return false;
+ return false;
}
/* Load in the 32-bit block address (SCSI uses big-endian, so have to reverse the byte order) */
@@ -306,7 +306,7 @@ static bool SCSI_Command_ReadWrite_10(USB_ClassInfo_MS_Device_t* const MSInterfa
return false;
}
-
+
/* Determine if the packet is a READ (10) or WRITE (10) command, call appropriate function */
if (IsDataRead == DATA_READ)
DataflashManager_ReadBlocks(MSInterfaceInfo, BlockAddress, TotalBlocks);
@@ -340,3 +340,4 @@ static bool SCSI_Command_ModeSense_6(USB_ClassInfo_MS_Device_t* const MSInterfac
return true;
}
+
diff --git a/Projects/Webserver/Lib/SCSI.h b/Projects/Webserver/Lib/SCSI.h
index 4351c571d..c5149caec 100644
--- a/Projects/Webserver/Lib/SCSI.h
+++ b/Projects/Webserver/Lib/SCSI.h
@@ -41,7 +41,7 @@
#include <avr/pgmspace.h>
#include <LUFA/Drivers/USB/USB.h>
-
+
#include "../Descriptors.h"
#include "DataflashManager.h"
diff --git a/Projects/Webserver/Lib/uIPManagement.c b/Projects/Webserver/Lib/uIPManagement.c
index 5e0a3082e..9225d92f6 100644
--- a/Projects/Webserver/Lib/uIPManagement.c
+++ b/Projects/Webserver/Lib/uIPManagement.c
@@ -70,7 +70,7 @@ void uIPManagement_Init(void)
MACAddress.addr[5] = SERVER_MAC_ADDRESS[5];
#if defined(ENABLE_DHCP_SERVER)
- DHCPServerApp_Init();
+ DHCPServerApp_Init();
#endif
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
@@ -84,7 +84,7 @@ void uIPManagement_Init(void)
else
{
#if defined(ENABLE_DHCP_CLIENT)
- DHCPClientApp_Init();
+ DHCPClientApp_Init();
#else
uip_ipaddr_t IPAddress, Netmask, GatewayIPAddress;
uip_ipaddr(&IPAddress, DEVICE_IP_ADDRESS[0], DEVICE_IP_ADDRESS[1], DEVICE_IP_ADDRESS[2], DEVICE_IP_ADDRESS[3]);
@@ -170,7 +170,7 @@ static void uIPManagement_ProcessIncomingPacket(void)
/* If no packet received, exit processing routine */
if (!(RNDIS_Device_IsPacketReceived(&Ethernet_RNDIS_Interface_Device)))
return;
-
+
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the Incoming packet straight into the UIP packet buffer */
@@ -181,13 +181,13 @@ static void uIPManagement_ProcessIncomingPacket(void)
/* If no packet received, exit processing routine */
if (!(RNDIS_Host_IsPacketReceived(&Ethernet_RNDIS_Interface_Host)))
return;
-
+
LEDs_SetAllLEDs(LEDMASK_USB_BUSY);
/* Read the Incoming packet straight into the UIP packet buffer */
RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface_Host, uip_buf, &uip_len);
}
-
+
/* If the packet contains an Ethernet frame, process it */
if (uip_len > 0)
{
diff --git a/Projects/Webserver/Lib/uIPManagement.h b/Projects/Webserver/Lib/uIPManagement.h
index 8fe656d68..0fd7d68cd 100644
--- a/Projects/Webserver/Lib/uIPManagement.h
+++ b/Projects/Webserver/Lib/uIPManagement.h
@@ -60,7 +60,7 @@
* (when DHCP is disabled).
*/
#define DEVICE_GATEWAY (uint8_t[]){10, 0, 0, 1}
-
+
/** Ethernet MAC address of the virtual webserver. When in device RNDIS mode, the virtual webserver requires
* a unique MAC address that it can use when sending packets to the RNDIS adapter, which contains a seperate
* MAC address as set in the RNDIS class driver configuration structure.
diff --git a/Projects/Webserver/USBDeviceMode.c b/Projects/Webserver/USBDeviceMode.c
index 54c626103..c555c4fab 100644
--- a/Projects/Webserver/USBDeviceMode.c
+++ b/Projects/Webserver/USBDeviceMode.c
@@ -62,7 +62,7 @@ USB_ClassInfo_RNDIS_Device_t Ethernet_RNDIS_Interface_Device =
.AdapterMACAddress = {{0x02, 0x00, 0x02, 0x00, 0x02, 0x00}},
},
};
-
+
/** LUFA Mass Storage Class driver interface configuration and state information. This structure is
* passed to all Mass Storage Class driver functions, so that multiple instances of the same class
* within a device can be differentiated from one another.
diff --git a/Projects/Webserver/USBHostMode.c b/Projects/Webserver/USBHostMode.c
index 1620cb5d8..524d442ef 100644
--- a/Projects/Webserver/USBHostMode.c
+++ b/Projects/Webserver/USBHostMode.c
@@ -67,7 +67,7 @@ void USBHostMode_USBTask(void)
return;
uIPManagement_ManageNetwork();
-
+
RNDIS_Host_USBTask(&Ethernet_RNDIS_Interface_Host);
}
diff --git a/Projects/XPLAINBridge/AVRISPDescriptors.h b/Projects/XPLAINBridge/AVRISPDescriptors.h
index e98ea24dc..68b50ba00 100644
--- a/Projects/XPLAINBridge/AVRISPDescriptors.h
+++ b/Projects/XPLAINBridge/AVRISPDescriptors.h
@@ -67,7 +67,7 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// Atmel AVRISP-MKII Interface
USB_Descriptor_Interface_t AVRISP_Interface;
USB_Descriptor_Endpoint_t AVRISP_DataInEndpoint;
diff --git a/Projects/XPLAINBridge/Lib/SoftUART.h b/Projects/XPLAINBridge/Lib/SoftUART.h
index 70707daf5..219acf309 100644
--- a/Projects/XPLAINBridge/Lib/SoftUART.h
+++ b/Projects/XPLAINBridge/Lib/SoftUART.h
@@ -67,3 +67,4 @@
void SoftUART_Init(void);
#endif
+
diff --git a/Projects/XPLAINBridge/USARTDescriptors.h b/Projects/XPLAINBridge/USARTDescriptors.h
index f504011eb..44a9fb978 100644
--- a/Projects/XPLAINBridge/USARTDescriptors.h
+++ b/Projects/XPLAINBridge/USARTDescriptors.h
@@ -65,14 +65,14 @@
typedef struct
{
USB_Descriptor_Configuration_Header_t Config;
-
+
// CDC Control Interface
USB_Descriptor_Interface_t CDC_CCI_Interface;
USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header;
USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM;
USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union;
USB_Descriptor_Endpoint_t CDC_NotificationEndpoint;
-
+
// CDC Data Interface
USB_Descriptor_Interface_t CDC_DCI_Interface;
USB_Descriptor_Endpoint_t CDC_DataOutEndpoint;
diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c
index d79c62da4..6dc1859a9 100644
--- a/Projects/XPLAINBridge/XPLAINBridge.c
+++ b/Projects/XPLAINBridge/XPLAINBridge.c
@@ -134,7 +134,7 @@ void UARTBridge_Task(void)
if (!(ReceivedByte < 0))
RingBuffer_Insert(&USBtoUART_Buffer, ReceivedByte);
}
-
+
/* Check if the UART receive buffer flush timer has expired or buffer is nearly full */
uint16_t BufferCount = RingBuffer_GetCount(&UARTtoUSB_Buffer);
if ((TIFR0 & (1 << TOV0)) || (BufferCount > 200))