aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/AudioOutput
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-06-11 01:52:53 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-06-11 01:52:53 +0000
commitb2330934b9ccd51a59183eb2a11fdd95183df27b (patch)
tree0a6003fd755b6c648ae6b0b0953a9c68bd2f91ee /Demos/Device/ClassDriver/AudioOutput
parent462fb500d76a352409886adb188246dcc6e06680 (diff)
downloadlufa-b2330934b9ccd51a59183eb2a11fdd95183df27b.tar.gz
lufa-b2330934b9ccd51a59183eb2a11fdd95183df27b.tar.bz2
lufa-b2330934b9ccd51a59183eb2a11fdd95183df27b.zip
Some minor whitespace corrections.
Diffstat (limited to 'Demos/Device/ClassDriver/AudioOutput')
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.c8
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/Descriptors.c40
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/Descriptors.h4
3 files changed, 26 insertions, 26 deletions
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
index 8c3bf6188..4497963de 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
@@ -99,7 +99,7 @@ void ProcessNextSample(void)
/* Massage signed 16-bit left and right audio samples into signed 8-bit */
int8_t LeftSample_8Bit = (LeftSample_16Bit >> 8);
int8_t RightSample_8Bit = (RightSample_16Bit >> 8);
-
+
/* Mix the two channels together to produce a mono, 8-bit sample */
int8_t MixedSample_8Bit = (((int16_t)LeftSample_8Bit + (int16_t)RightSample_8Bit) >> 1);
@@ -160,9 +160,9 @@ void EVENT_USB_Connect(void)
#if (defined(AUDIO_OUT_MONO) || defined(AUDIO_OUT_STEREO))
/* PWM speaker timer initialization */
TCCRxA = ((1 << WGMx0) | (1 << COMxA1) | (1 << COMxA0)
- | (1 << COMxB1) | (1 << COMxB0)); // Set on match, clear on TOP
+ | (1 << COMxB1) | (1 << COMxB0)); // Set on match, clear on TOP
TCCRxB = ((1 << WGMx2) | (1 << CSx0)); // Fast 8-Bit PWM, Fcpu speed
-#endif
+#endif
}
/** Event handler for the library USB Disconnection event. */
@@ -176,7 +176,7 @@ void EVENT_USB_Disconnect(void)
#if (defined(AUDIO_OUT_MONO) || defined(AUDIO_OUT_STEREO))
/* Stop the PWM generation timer */
TCCRxB = 0;
-#endif
+#endif
#if defined(AUDIO_OUT_MONO)
/* Set speaker as input to reduce current draw */
diff --git a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
index 0039c2ba8..01d3bc786 100644
--- a/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
+++ b/Demos/Device/ClassDriver/AudioOutput/Descriptors.c
@@ -45,22 +45,22 @@
USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
{
.Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
-
+
.USBSpecification = VERSION_BCD(02.00),
.Class = 0x00,
.SubClass = 0x00,
.Protocol = 0x00,
-
+
.Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE,
-
+
.VendorID = 0x03EB,
.ProductID = 0x2046,
.ReleaseNumber = 0x0000,
-
+
.ManufacturerStrIndex = 0x01,
.ProductStrIndex = 0x02,
.SerialNumStrIndex = NO_DESCRIPTOR,
-
+
.NumberOfConfigurations = 1
};
@@ -80,7 +80,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.ConfigurationNumber = 1,
.ConfigurationStrIndex = NO_DESCRIPTOR,
-
+
.ConfigAttributes = (USB_CONFIG_ATTR_BUSPOWERED | USB_CONFIG_ATTR_SELFPOWERED),
.MaxPowerConsumption = USB_CONFIG_POWER_MA(100)
@@ -94,12 +94,12 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.AlternateSetting = 0,
.TotalEndpoints = 0,
-
+
.Class = 0x01,
.SubClass = 0x01,
.Protocol = 0x00,
-
- .InterfaceStrIndex = NO_DESCRIPTOR
+
+ .InterfaceStrIndex = NO_DESCRIPTOR
},
.AudioControlInterface_SPC =
@@ -109,11 +109,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.ACSpecification = VERSION_BCD(01.00),
.TotalLength = (sizeof(USB_AudioInterface_AC_t) +
- sizeof(USB_AudioInputTerminal_t) +
- sizeof(USB_AudioOutputTerminal_t)),
+ sizeof(USB_AudioInputTerminal_t) +
+ sizeof(USB_AudioOutputTerminal_t)),
.InCollection = 1,
- .InterfaceNumbers = {1},
+ .InterfaceNumbers = {1},
},
.InputTerminal =
@@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.SourceID = 0x01,
- .TerminalStrIndex = NO_DESCRIPTOR
+ .TerminalStrIndex = NO_DESCRIPTOR
},
.AudioStreamInterface_Alt0 =
@@ -154,11 +154,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.AlternateSetting = 0,
.TotalEndpoints = 0,
-
+
.Class = 0x01,
.SubClass = 0x02,
.Protocol = 0x00,
-
+
.InterfaceStrIndex = NO_DESCRIPTOR
},
@@ -170,11 +170,11 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
.AlternateSetting = 1,
.TotalEndpoints = 1,
-
+
.Class = 0x01,
.SubClass = 0x02,
.Protocol = 0x00,
-
+
.InterfaceStrIndex = NO_DESCRIPTOR
},
@@ -239,7 +239,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
USB_Descriptor_String_t PROGMEM LanguageString =
{
.Header = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
-
+
.UnicodeString = {LANGUAGE_ID_ENG}
};
@@ -250,7 +250,7 @@ USB_Descriptor_String_t PROGMEM LanguageString =
USB_Descriptor_String_t PROGMEM ManufacturerString =
{
.Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
-
+
.UnicodeString = L"Dean Camera"
};
@@ -261,7 +261,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
USB_Descriptor_String_t PROGMEM ProductString =
{
.Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},
-
+
.UnicodeString = L"LUFA Audio Out Demo"
};
diff --git a/Demos/Device/ClassDriver/AudioOutput/Descriptors.h b/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
index 1f03f647f..f007890e6 100644
--- a/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
+++ b/Demos/Device/ClassDriver/AudioOutput/Descriptors.h
@@ -47,7 +47,7 @@
/** Endpoint number of the Audio isochronous streaming data endpoint. */
#define AUDIO_STREAM_EPNUM 1
#else
- #define AUDIO_STREAM_EPNUM 3
+ #define AUDIO_STREAM_EPNUM 3
#endif
/** Endpoint size in bytes of the Audio isochronous streaming data endpoint. The Windows audio stack requires
@@ -81,6 +81,6 @@
/* Function Prototypes: */
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint8_t wIndex, void** const DescriptorAddress)
- ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
+ ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
#endif