forked from mfulz_github/qmk_firmware
Fix redefinition warning when USB_DEVICE_ONLY is set on an AVR which does not support USB host mode.
This commit is contained in:
parent
fef185a409
commit
5ca1d7bf8f
|
@ -67,6 +67,7 @@ int main(void)
|
||||||
{
|
{
|
||||||
CheckJoystickMovement();
|
CheckJoystickMovement();
|
||||||
|
|
||||||
|
/* Must acknowedge MIDI packets from the host even though they aren't used, or the host locks up */
|
||||||
MIDI_EventPacket_t DummyMIDIEvent;
|
MIDI_EventPacket_t DummyMIDIEvent;
|
||||||
MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &DummyMIDIEvent);
|
MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &DummyMIDIEvent);
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
/** Type define for a USB MIDI event packet, used to encapsulate sent and received MIDI messages from a USB MIDI interface. */
|
/** Type define for a USB MIDI event packet, used to encapsulate sent and received MIDI messages from a USB MIDI interface. */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
unsigned char Command : 4; /**< MIDI command being sent or received in the event packet */
|
unsigned char Command : 4; /**< Upper nibble of the MIDI command being sent or received in the event packet */
|
||||||
unsigned char CableNumber : 4; /**< Virtual cable number of the event being sent or received in the given MIDI interface */
|
unsigned char CableNumber : 4; /**< Virtual cable number of the event being sent or received in the given MIDI interface */
|
||||||
|
|
||||||
uint8_t Data1; /**< First byte of data in the MIDI event */
|
uint8_t Data1; /**< First byte of data in the MIDI event */
|
||||||
|
|
|
@ -50,8 +50,10 @@
|
||||||
#error USB_HOST_ONLY is not available for the currently selected USB AVR model.
|
#error USB_HOST_ONLY is not available for the currently selected USB AVR model.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(USB_DEVICE_ONLY)
|
||||||
#define USB_DEVICE_ONLY
|
#define USB_DEVICE_ONLY
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (!defined(USB_DEVICE_ONLY) && !defined(USB_HOST_ONLY))
|
#if (!defined(USB_DEVICE_ONLY) && !defined(USB_HOST_ONLY))
|
||||||
#define USB_CAN_BE_BOTH
|
#define USB_CAN_BE_BOTH
|
||||||
|
|
Loading…
Reference in New Issue