Changed per-device controller preprocessor checks over to per-device series for better device control.
Fixed error in Endpoint.c using HSOFI rather than SOFI for counting elapsed milliseconds.
This commit is contained in:
parent
9798440ca4
commit
4d3a594f3e
21 changed files with 77 additions and 65 deletions
|
|
@ -43,7 +43,7 @@
|
|||
#include <avr/pgmspace.h>
|
||||
|
||||
/* Macros: */
|
||||
#if defined(USB_FULL_CONTROLLER) || defined(__DOXYGEN__)
|
||||
#if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__)
|
||||
/** Endpoint number of the Audio isochronous streaming data endpoint. */
|
||||
#define AUDIO_STREAM_EPNUM 1
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
#include <LUFA/Drivers/USB/Class/Device/Audio.h>
|
||||
|
||||
/* Macros: */
|
||||
#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER)
|
||||
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
|
||||
#define TCCRxA TCCR3A
|
||||
#define TCCRxB TCCR3B
|
||||
#define OCRxA OCR3A
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#include <avr/pgmspace.h>
|
||||
|
||||
/* Macros: */
|
||||
#if defined(USB_FULL_CONTROLLER) || defined(__DOXYGEN__)
|
||||
#if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__)
|
||||
/** Endpoint number of the Audio isochronous streaming data endpoint. */
|
||||
#define AUDIO_STREAM_EPNUM 1
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
*/
|
||||
#define EP_ACCEPTS_SMALL_PACKETS (0 << 7)
|
||||
|
||||
#if defined(USB_FULL_CONTROLLER) || defined(__DOXYGEN__)
|
||||
#if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__)
|
||||
/** Endpoint number of the Audio isochronous streaming data endpoint. */
|
||||
#define AUDIO_STREAM_EPNUM 1
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
#include <LUFA/Drivers/Board/LEDs.h>
|
||||
|
||||
/* Macros: */
|
||||
#if defined(USB_FULL_CONTROLLER) || defined(USB_MODIFIED_FULL_CONTROLLER)
|
||||
#if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
|
||||
#define TCCRxA TCCR3A
|
||||
#define TCCRxB TCCR3B
|
||||
#define OCRxA OCR3A
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@
|
|||
*/
|
||||
#define EP_ACCEPTS_SMALL_PACKETS (0 << 7)
|
||||
|
||||
#if defined(USB_FULL_CONTROLLER) || defined(__DOXYGEN__)
|
||||
#if defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) || defined(__DOXYGEN__)
|
||||
/** Endpoint number of the Audio isochronous streaming data endpoint. */
|
||||
#define AUDIO_STREAM_EPNUM 1
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -111,15 +111,15 @@ void EVENT_USB_ConfigurationChanged(void)
|
|||
|
||||
/* Setup Mass Storage In and Out Endpoints */
|
||||
if (!(Endpoint_ConfigureEndpoint(MASS_STORAGE_IN_EPNUM, EP_TYPE_BULK,
|
||||
ENDPOINT_DIR_IN, MASS_STORAGE_IO_EPSIZE,
|
||||
ENDPOINT_BANK_DOUBLE)))
|
||||
ENDPOINT_DIR_IN, MASS_STORAGE_IO_EPSIZE,
|
||||
ENDPOINT_BANK_DOUBLE)))
|
||||
{
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
}
|
||||
|
||||
if (!(Endpoint_ConfigureEndpoint(MASS_STORAGE_OUT_EPNUM, EP_TYPE_BULK,
|
||||
ENDPOINT_DIR_OUT, MASS_STORAGE_IO_EPSIZE,
|
||||
ENDPOINT_BANK_DOUBLE)))
|
||||
ENDPOINT_DIR_OUT, MASS_STORAGE_IO_EPSIZE,
|
||||
ENDPOINT_BANK_DOUBLE)))
|
||||
{
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
void Bluetooth_ProcessACLPackets(void)
|
||||
{
|
||||
Bluetooth_ACL_Header_t ACLPacketHeader;
|
||||
Bluetooth_DataPacket_Header_t DataHeader;
|
||||
|
||||
Pipe_SelectPipe(BLUETOOTH_DATA_IN_PIPE);
|
||||
Pipe_SetToken(PIPE_TOKEN_IN);
|
||||
|
|
@ -46,8 +47,6 @@ void Bluetooth_ProcessACLPackets(void)
|
|||
}
|
||||
|
||||
Pipe_Read_Stream_LE(&ACLPacketHeader, sizeof(ACLPacketHeader));
|
||||
|
||||
Bluetooth_DataPacket_Header_t DataHeader;
|
||||
Pipe_Read_Stream_LE(&DataHeader, sizeof(DataHeader));
|
||||
|
||||
BT_DEBUG("(ACL) Packet Received", NULL);
|
||||
|
|
@ -68,7 +67,14 @@ void Bluetooth_ProcessACLPackets(void)
|
|||
break;
|
||||
case BLUETOOTH_SIGNAL_CONFIGURATION_REQUEST:
|
||||
Bluetooth_ProcessSignalPacket_ConfigurationRequest(&ACLPacketHeader, &DataHeader, &SignalCommandHeader);
|
||||
break;
|
||||
break;
|
||||
case BLUETOOTH_SIGNAL_INFORMATION_REQUEST:
|
||||
BT_DEBUG("(ACL) -- Information Request, Discarded");
|
||||
|
||||
Pipe_Discard_Stream(ACLPacketHeader.DataLength);
|
||||
Pipe_ClearIN();
|
||||
Pipe_Freeze();
|
||||
break;
|
||||
default:
|
||||
BT_DEBUG("(ACL) >> Unknown Signalling Command 0x%02X", SignalCommandHeader.Code);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
#define BLUETOOTH_SIGNAL_CONNECTION_RESPONSE 0x03
|
||||
#define BLUETOOTH_SIGNAL_CONFIGURATION_REQUEST 0x04
|
||||
#define BLUETOOTH_SIGNAL_CONFIGURATION_RESPONSE 0x05
|
||||
#define BLUETOOTH_SIGNAL_INFORMATION_REQUEST 0x0A
|
||||
|
||||
#define BLUETOOTH_CONNECTION_SUCCESSFUL 0x0000
|
||||
#define BLUETOOTH_CONNECTION_REFUSED_RESOURCES 0x0004
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
|
||||
|
||||
# MCU name
|
||||
MCU = at90usb1287
|
||||
MCU = at90usb647
|
||||
|
||||
|
||||
# Target board (see library "Board Types" documentation, USER or blank for projects not requiring
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue