diff --git a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h index b0fa0f66c6a4217c2778dade98cf02a897e17998..1fe71de2f0636c83d9d1da1b8b436f184ac864e5 100644 --- a/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h +++ b/LUFA/Drivers/Board/ATAVRUSBRF01/LEDs.h @@ -115,12 +115,12 @@ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) { - PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS)); + PORTD = ((PORTD & ~LEDMask) | ActiveMask); } static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/Board/BUMBLEB/LEDs.h b/LUFA/Drivers/Board/BUMBLEB/LEDs.h index 1453da4d7b485298c9b7c502b08a5799802a72af..6446d1241e67f91c5844fac59d10ac7baa14f2eb 100644 --- a/LUFA/Drivers/Board/BUMBLEB/LEDs.h +++ b/LUFA/Drivers/Board/BUMBLEB/LEDs.h @@ -120,6 +120,11 @@ PORTB = ((PORTB & ~LedMask) | ActiveMask); } + static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + { + PORTB ^= LEDMask; + } + static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { diff --git a/LUFA/Drivers/Board/EVK527/LEDs.h b/LUFA/Drivers/Board/EVK527/LEDs.h index 7612ba060a957c4be7d97d6930a7e40e2c8e86a8..9f36ec8287cbe75d323c116fa49692869c96b1c2 100644 --- a/LUFA/Drivers/Board/EVK527/LEDs.h +++ b/LUFA/Drivers/Board/EVK527/LEDs.h @@ -114,7 +114,7 @@ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/Board/JMDBU2/LEDs.h b/LUFA/Drivers/Board/JMDBU2/LEDs.h index 1acf2a9f46a46d03bc3f47bd62b305fb5f145140..70013a31e25b4a3dc2080fa6101cea2a18724c8b 100644 --- a/LUFA/Drivers/Board/JMDBU2/LEDs.h +++ b/LUFA/Drivers/Board/JMDBU2/LEDs.h @@ -108,7 +108,7 @@ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/Board/OLIMEX162/LEDs.h b/LUFA/Drivers/Board/OLIMEX162/LEDs.h index 625d953dc039d98e03da077e8e802a9df5ceedc7..c4a4b3f2f46b0d6a2afccfe0438b629419e4a77b 100644 --- a/LUFA/Drivers/Board/OLIMEX162/LEDs.h +++ b/LUFA/Drivers/Board/OLIMEX162/LEDs.h @@ -122,7 +122,7 @@ #if defined(__cplusplus) } #endif - + #endif /** @} */ diff --git a/LUFA/Drivers/Board/STK525/LEDs.h b/LUFA/Drivers/Board/STK525/LEDs.h index d2d1bbb2c371d303ad5f4940e3295954a30e5e14..407c892783265a6901e0ecd0f5fcfa4b4afbf9ef 100644 --- a/LUFA/Drivers/Board/STK525/LEDs.h +++ b/LUFA/Drivers/Board/STK525/LEDs.h @@ -117,7 +117,7 @@ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/Board/STK526/LEDs.h b/LUFA/Drivers/Board/STK526/LEDs.h index 2d20e546672c0b82c4aa92793ad1f8d6a07a1c07..de65d26b3ebbda13ad8580977876546f5919396a 100644 --- a/LUFA/Drivers/Board/STK526/LEDs.h +++ b/LUFA/Drivers/Board/STK526/LEDs.h @@ -112,12 +112,12 @@ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) { - PORTD = ((PORTD & ~(LEDMask & LEDS_ALL_LEDS)) | (ActiveMask & LEDS_ALL_LEDS)); + PORTD = ((PORTD & ~LEDMask) | ActiveMask); } static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/Board/USBKEY/LEDs.h b/LUFA/Drivers/Board/USBKEY/LEDs.h index 86981f5236d0ec60f014750c57eff23ef07c3920..ebac08e839a4bb23bb5e233b8c943671112ab78b 100644 --- a/LUFA/Drivers/Board/USBKEY/LEDs.h +++ b/LUFA/Drivers/Board/USBKEY/LEDs.h @@ -117,7 +117,7 @@ static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTD ^ (LEDMask & LEDS_ALL_LEDS)); + PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/Drivers/Board/USBTINYMKII/LEDs.h b/LUFA/Drivers/Board/USBTINYMKII/LEDs.h index b0383a64a4b2788d5142ad76e720dcc82889b0aa..f394ec01430e48d515eeed43f56e7974d0edd578 100644 --- a/LUFA/Drivers/Board/USBTINYMKII/LEDs.h +++ b/LUFA/Drivers/Board/USBTINYMKII/LEDs.h @@ -110,6 +110,11 @@ PORTB = ((PORTB & ~LedMask) | ActiveMask); } + static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) + { + PORTB ^= LEDMask; + } + static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { diff --git a/LUFA/Drivers/Board/XPLAIN/LEDs.h b/LUFA/Drivers/Board/XPLAIN/LEDs.h index 00f7bc2a34e8ea6d3a890a9714370f80cf0b73b4..697ec9677cf8b62855972578639a3c79977c06df 100644 --- a/LUFA/Drivers/Board/XPLAIN/LEDs.h +++ b/LUFA/Drivers/Board/XPLAIN/LEDs.h @@ -103,12 +103,12 @@ static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) { - PORTB = ((PORTB | (LEDMask & LEDS_ALL_LEDS)) & (~ActiveMask & LEDS_ALL_LEDS)); + PORTB = ((PORTB | LEDMask) & ~ActiveMask); } static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { - PORTD = (PORTB ^ (LEDMask & LEDS_ALL_LEDS)); + PORTB ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 253d40d28c0d8aedb41da1195f99ca950937a4d4..c92a944643c63a1ef40fcf8343cbaef902495f6d 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -46,6 +46,7 @@ * - Fixed USBtoSerial and Benito project SetLineEncoding calls failing if the USART is busy, due to the RX ISR delaying the control * request handler * - Fixed LowLevel PrinterHost demo not sending control requests to the attached printer with the correct printer interface wIndex value + * - Added LEDs_ToggleLEDs() function to several board LED drivers which were missing it (thanks to Andrei Krainev) * * \section Sec_ChangeLog100807 Version 100807 * <b>New:</b> diff --git a/LUFA/ManPages/LUFAPoweredProjects.txt b/LUFA/ManPages/LUFAPoweredProjects.txt index b6961306824afed96a2da0018d4c8b90379a865a..05634623d905f7e6f2b5ac517abb66b6ef4c2c9f 100644 --- a/LUFA/ManPages/LUFAPoweredProjects.txt +++ b/LUFA/ManPages/LUFAPoweredProjects.txt @@ -19,11 +19,12 @@ * are open design, and all are available for purchase as completed development boards suitable for project development. * * - AT90USB162 Breadboard PCB (Russian): http://microsin.ru/content/view/685/44/ + * - AVR-USB-162, a USBKEY-like development board for the AT90USB162: http://olimex.com/dev/avr-usb-162.html * - Benito #7, a no-frills USB board: http://www.dorkbotpdx.org/wiki/benito * - JM-DB-U2, an ATMEGA32U2 development board: http://u2.mattair.net/index.html * - Micropendous, an open design/source set of AVR USB development boards: http://micropendous.org/ + * - Minimus USB, a board specially designed for PSGroove: http://www.minimususb.com/ * - Nanduino, a do-it-yourself AT90USB162 board: http://www.makestuff.eu/wordpress/?page_id=569 - * - AVR-USB-162, a USBKEY-like development board for the AT90USB162: http://olimex.com/dev/avr-usb-162.html * - Teensy and Teensy++, two other AVR USB development boards: http://www.pjrc.com/teensy/index.html * - U2DIL/U4DIL, a set of DIP layout USB AVR boards: http://www.reworld.eu/re/en/products/u2dil/ * - USBFOO 2, AT90USB162 based development board: http://shop.kernelconcepts.de/product_info.php?products_id=102 @@ -88,4 +89,5 @@ * - Elektor Magazine, "My First AVR-USB" by Antoine Authier (feature), January 2010 Issue * - Elektor Magazine, "USB is Cool/Sucks" by Jerry Jacobs and Chris Vossen (minor mention), January 2010 Issue * - Elektor Magazine, "20 x Open Source" by Jens Nickel, March 2010 Issue + * - Circuit Cellar Magazine, "Advanced USB Design Debugging" by Collin O'Flynn, August 2010 Issue */ \ No newline at end of file