aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/ChangeLog.txt1
-rw-r--r--LUFA/Common/Common.h21
-rw-r--r--LUFA/MigrationInformation.txt2
3 files changed, 3 insertions, 21 deletions
diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt
index f699507dd..1a2b9f8a1 100644
--- a/LUFA/ChangeLog.txt
+++ b/LUFA/ChangeLog.txt
@@ -28,6 +28,7 @@
* - Mass Storage Host demo now uses a USB_STREAM_TIMEOUT_MS of two seconds to maintain compatibility with poorly designed devices
* - Function attribute ATTR_ALWAYSINLINE renamed to ATTR_ALWAYS_INLINE to match other function attribute macro naming conventions
* - Added ATTR_ALWAYS_INLINE attribute to several key inlined library components, to ensure they are inlined in all circumstances
+ * - Removed SetSystemClockPrescaler() macro, the clock_prescale_set() avr-libc macro has been corrected in recent avr-libc versions
*
* \section Sec_ChangeLog090209 Version 090209
*
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h
index 97e9ce931..ed2d1bc90 100644
--- a/LUFA/Common/Common.h
+++ b/LUFA/Common/Common.h
@@ -88,27 +88,6 @@
} }MACROE
/* Inline Functions: */
- /** Function for reliably setting the AVR's system clock prescaler, using inline assembly. This function
- * is guaranteed to operate reliably regardless of optimization setting or other compile time options.
- *
- * \param PrescalerMask The mask of the new prescaler setting for CLKPR
- */
- static inline void SetSystemClockPrescaler(uint8_t PrescalerMask)
- {
- uint8_t tmp = (1 << CLKPCE);
- __asm__ __volatile__ (
- "in __tmp_reg__,__SREG__" "\n\t"
- "cli" "\n\t"
- "sts %1, %0" "\n\t"
- "sts %1, %2" "\n\t"
- "out __SREG__, __tmp_reg__"
- : /* no outputs */
- : "d" (tmp),
- "M" (_SFR_MEM_ADDR(CLKPR)),
- "d" (PrescalerMask)
- : "r0");
- }
-
/** Function to reverse the individual bits in a byte - i.e. bit 7 is moved to bit 0, bit 6 to bit 1,
* etc.
*
diff --git a/LUFA/MigrationInformation.txt b/LUFA/MigrationInformation.txt
index ebfc364d0..364f09c3e 100644
--- a/LUFA/MigrationInformation.txt
+++ b/LUFA/MigrationInformation.txt
@@ -17,6 +17,8 @@
* defined in the project makefile and passed to the compiler via the -D switch.
* - The makefile EEPROM programming targets for FLIP and dfu-programmer no longer program in the FLASH data in addition to the
* EEPROM data into the device. If both are to be programmed, both the EEPROM and FLASH programming targets must be called.
+ * - As the avr-libc macro has been corrected in recent avr-libc distributions, the SetSystemClockPrescaler() macro has been removed.
+ * Include <avr/power.h> and call clock_prescale_set(clock_div_1); instead on recent avr-libc distributions.
*
* <b>Library Demos</b>
* - The USBtoSerial demo now discards all data when not connected to a host, rather than buffering it for later transmission.