From 2cab8f07254d13c226118679c84abb9c4afe5246 Mon Sep 17 00:00:00 2001
From: Dean Camera <dean@fourwalledcubicle.com>
Date: Fri, 18 Dec 2009 00:32:21 +0000
Subject: [PATCH] Fixed USB_CurrentMode not being reset to USB_MODE_NONE when
 the USB interface is shut down and both Host and Device modes can be used
 (thanks to Daniel Levy).

---
 LUFA/Drivers/USB/LowLevel/LowLevel.c | 2 +-
 LUFA/ManPages/ChangeLog.txt          | 2 ++
 LUFA/ManPages/MainPage.txt           | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/LowLevel.c
index f15db40aa..5ac476125 100644
--- a/LUFA/Drivers/USB/LowLevel/LowLevel.c
+++ b/LUFA/Drivers/USB/LowLevel/LowLevel.c
@@ -125,7 +125,7 @@ void USB_ShutDown(void)
 
 	USB_IsInitialized = false;
 
-	#if defined(CAN_BE_BOTH)
+	#if defined(USB_CAN_BE_BOTH)
 	USB_CurrentMode = USB_MODE_NONE;
 	#endif
 }
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index 64bfb1781..b6ef5b9aa 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -64,6 +64,8 @@
   *  - Fixed MIDI host Class driver MIDI_Host_SendEventPacket() routine not properly checking for Pipe ready before writing
   *  - Fixed use of deprecated struct initializers, removed library unused parameter warnings when compiled with -Wextra enabled
   *  - Fixed Still Image Host Class driver truncating the PIMA response code (thanks to Daniel Seibert)
+  *  - Fixed USB_CurrentMode not being reset to USB_MODE_NONE when the USB interface is shut down and both Host and Device modes can be
+  *    used (thanks to Daniel Levy)
   *
   *  \section Sec_ChangeLog091122 Version 091122
   *
diff --git a/LUFA/ManPages/MainPage.txt b/LUFA/ManPages/MainPage.txt
index 3c763bd4b..0626cdb61 100644
--- a/LUFA/ManPages/MainPage.txt
+++ b/LUFA/ManPages/MainPage.txt
@@ -11,7 +11,7 @@
  *  \image html LUFA.gif
  *  \n
  *
- *  For author and donation information, see \ref Page_Donating.
+ *  <b>For author and donation information, see \ref Page_Donating.</b>
  *
  *  LUFA is an open-source USB library for the USB-enabled AVR microcontrollers, released under the MIT license. It supports
  *  a large number of USB AVR models and boards (see \ref Page_DeviceSupport). It is designed to provide an easy to use, feature
-- 
GitLab