projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6fb6c62
)
Fixed inverted LED driving code for the Arduino Leonardo board. Fixed inverted LEDs_G...
author
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 12 Aug 2012 17:25:39 +0000
(17:25 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 12 Aug 2012 17:25:39 +0000
(17:25 +0000)
LUFA/DoxygenPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/LEONARDO/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/UNO/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/DoxygenPages/ChangeLog.txt
b/LUFA/DoxygenPages/ChangeLog.txt
index
b91d1ba
..
4f507ee
100644
(file)
--- a/
LUFA/DoxygenPages/ChangeLog.txt
+++ b/
LUFA/DoxygenPages/ChangeLog.txt
@@
-22,7
+22,7
@@
*
* <b>Fixed:</b>
* - Core:
*
* <b>Fixed:</b>
* - Core:
- * -
<i>None</i>
+ * -
Fixed inverted LEDs_GetLEDs() function implementation for the Benito, Minimus and Arduino UNO boards
* - Library Applications:
* - Fixed broken RESET_TOGGLES_LIBUSB_COMPAT compile time option in the AVRISP-MKII project
*
* - Library Applications:
* - Fixed broken RESET_TOGGLES_LIBUSB_COMPAT compile time option in the AVRISP-MKII project
*
diff --git
a/LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
b/LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
index
875130f
..
8e586c4
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
@@
-124,7
+124,7
@@
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
- return (PORTC & LEDS_ALL_LEDS);
+ return (
~
PORTC & LEDS_ALL_LEDS);
}
#endif
}
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/LEONARDO/LEDs.h
b/LUFA/Drivers/Board/AVR8/LEONARDO/LEDs.h
index
0a3c9fc
..
e8e9c49
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/LEONARDO/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/LEONARDO/LEDs.h
@@
-73,7
+73,7
@@
/* Macros: */
#define LEDS_PORTB_LEDS (LEDS_LED1)
#define LEDS_PORTD_LEDS (LEDS_LED2)
/* Macros: */
#define LEDS_PORTB_LEDS (LEDS_LED1)
#define LEDS_PORTD_LEDS (LEDS_LED2)
- #define LEDS_PORT
E
_LEDS (LEDS_LED3)
+ #define LEDS_PORT
C
_LEDS (LEDS_LED3)
#endif
/* Public Interface - May be used in end-application: */
#endif
/* Public Interface - May be used in end-application: */
@@
-85,7
+85,7
@@
#define LEDS_LED2 (1 << 0)
/** LED mask for the third LED on the board. */
#define LEDS_LED2 (1 << 0)
/** LED mask for the third LED on the board. */
- #define LEDS_LED3 (1 <<
6
)
+ #define LEDS_LED3 (1 <<
7
)
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
/** LED mask for all the LEDs on the board. */
#define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3)
@@
-98,11
+98,11
@@
static inline void LEDs_Init(void)
{
DDRB |= LEDS_PORTB_LEDS;
static inline void LEDs_Init(void)
{
DDRB |= LEDS_PORTB_LEDS;
- PORTB
&= ~
LEDS_PORTB_LEDS;
+ PORTB
|=
LEDS_PORTB_LEDS;
DDRD |= LEDS_PORTD_LEDS;
DDRD |= LEDS_PORTD_LEDS;
- PORTD
&= ~
LEDS_PORTD_LEDS;
- DDR
E |= LEDS_PORTE
_LEDS;
- PORT
E &= ~LEDS_PORTE
_LEDS;
+ PORTD
|=
LEDS_PORTD_LEDS;
+ DDR
C |= LEDS_PORTC
_LEDS;
+ PORT
C &= ~LEDS_PORTC
_LEDS;
}
static inline void LEDs_Disable(void)
}
static inline void LEDs_Disable(void)
@@
-111,50
+111,50
@@
PORTB &= ~LEDS_PORTB_LEDS;
DDRD &= ~LEDS_PORTD_LEDS;
PORTD &= ~LEDS_PORTD_LEDS;
PORTB &= ~LEDS_PORTB_LEDS;
DDRD &= ~LEDS_PORTD_LEDS;
PORTD &= ~LEDS_PORTD_LEDS;
- DDR
E &= ~LEDS_PORTE
_LEDS;
- PORT
E &= ~LEDS_PORTE
_LEDS;
+ DDR
C &= ~LEDS_PORTC
_LEDS;
+ PORT
C &= ~LEDS_PORTC
_LEDS;
}
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
}
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
- PORTB
|=
(LEDMask & LEDS_PORTB_LEDS);
- PORTD
|=
(LEDMask & LEDS_PORTD_LEDS);
- PORT
E |= (LEDMask & LEDS_PORTE
_LEDS);
+ PORTB
&= ~
(LEDMask & LEDS_PORTB_LEDS);
+ PORTD
&= ~
(LEDMask & LEDS_PORTD_LEDS);
+ PORT
C |= (LEDMask & LEDS_PORTC
_LEDS);
}
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
}
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
- PORTB
&= ~
(LEDMask & LEDS_PORTB_LEDS);
- PORTD
&= ~
(LEDMask & LEDS_PORTD_LEDS);
- PORT
E &= ~(LEDMask & LEDS_PORTE
_LEDS);
+ PORTB
|=
(LEDMask & LEDS_PORTB_LEDS);
+ PORTD
|=
(LEDMask & LEDS_PORTD_LEDS);
+ PORT
C &= ~(LEDMask & LEDS_PORTC
_LEDS);
}
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
{
}
static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
{
- PORTB = ((PORTB & ~LEDS_PORTB_LEDS) | (LEDMask & LEDS_PORTB_LEDS));
- PORTD = ((PORTD & ~LEDS_PORTD_LEDS) | (LEDMask & LEDS_PORTD_LEDS));
- PORT
E = ((PORTE & ~LEDS_PORTE_LEDS) | (LEDMask & LEDS_PORTE
_LEDS));
+ PORTB = ((PORTB & ~LEDS_PORTB_LEDS) |
(LEDMask & LEDS_PORTB_LEDS));
+ PORTD = ((PORTD & ~LEDS_PORTD_LEDS) |
(LEDMask & LEDS_PORTD_LEDS));
+ PORT
C = ((PORTC | LEDS_PORTC_LEDS) & ~(LEDMask & LEDS_PORTC
_LEDS));
}
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
}
static inline void LEDs_ChangeLEDs(const uint8_t LEDMask,
const uint8_t ActiveMask)
{
- PORTB = ((PORTB & ~(LEDMask & LEDS_PORTB_LEDS)) | (ActiveMask & LEDS_PORTB_LEDS));
- PORTD = ((PORTD & ~(LEDMask & LEDS_PORTD_LEDS)) | (ActiveMask & LEDS_PORTD_LEDS));
- PORT
E = ((PORTE & ~(LEDMask & LEDS_PORTE_LEDS)) | (ActiveMask & LEDS_PORTE
_LEDS));
+ PORTB = ((PORTB & ~(LEDMask & LEDS_PORTB_LEDS)) |
(ActiveMask & LEDS_PORTB_LEDS));
+ PORTD = ((PORTD & ~(LEDMask & LEDS_PORTD_LEDS)) |
(ActiveMask & LEDS_PORTD_LEDS));
+ PORT
C = ((PORTC | (LEDMask & LEDS_PORTC_LEDS)) | ~(ActiveMask & LEDS_PORTC
_LEDS));
}
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PINB = (LEDMask & LEDS_PORTB_LEDS);
PIND = (LEDMask & LEDS_PORTD_LEDS);
}
static inline void LEDs_ToggleLEDs(const uint8_t LEDMask)
{
PINB = (LEDMask & LEDS_PORTB_LEDS);
PIND = (LEDMask & LEDS_PORTD_LEDS);
- PIN
E = (LEDMask & LEDS_PORTE
_LEDS);
+ PIN
C = (LEDMask & LEDS_PORTC
_LEDS);
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
}
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
- return ((PORTB & LEDS_PORTB_LEDS) | (PORTD & LEDS_PORTD_LEDS) | (
PORTE & LEDS_PORTE
_LEDS));
+ return ((PORTB & LEDS_PORTB_LEDS) | (PORTD & LEDS_PORTD_LEDS) | (
~PORTC & LEDS_PORTC
_LEDS));
}
#endif
}
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
b/LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
index
f23317d
..
74c6d16
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
@@
-128,7
+128,7
@@
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
- return (PORTD & LEDS_ALL_LEDS);
+ return (
~
PORTD & LEDS_ALL_LEDS);
}
#endif
}
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/UNO/LEDs.h
b/LUFA/Drivers/Board/AVR8/UNO/LEDs.h
index
2a6178c
..
9c01c61
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/UNO/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/UNO/LEDs.h
@@
-124,7
+124,7
@@
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t LEDs_GetLEDs(void)
{
- return (PORTD & LEDS_ALL_LEDS);
+ return (
~
PORTD & LEDS_ALL_LEDS);
}
#endif
}
#endif
diff --git
a/LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
b/LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
index
25a90a7
..
fef8c06
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
@@
-44,10
+44,10
@@
*
* <table>
* <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
*
* <table>
* <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
- * <tr><td>LEDS_LED1</td><td>Red</td><td>Bicolor Indicator 1</td><td>
Low
</td><td>PORTD.4</td></tr>
- * <tr><td>LEDS_LED2</td><td>Green</td><td>Bicolor Indicator 1</td><td>
Low
</td><td>PORTD.5</td></tr>
- * <tr><td>LEDS_LED3</td><td>Red</td><td>Bicolor Indicator 2</td><td>
Low
</td><td>PORTD.6</td></tr>
- * <tr><td>LEDS_LED4</td><td>Green</td><td>Bicolor Indicator 2</td><td>
Low
</td><td>PORTD.7</td></tr>
+ * <tr><td>LEDS_LED1</td><td>Red</td><td>Bicolor Indicator 1</td><td>
High
</td><td>PORTD.4</td></tr>
+ * <tr><td>LEDS_LED2</td><td>Green</td><td>Bicolor Indicator 1</td><td>
High
</td><td>PORTD.5</td></tr>
+ * <tr><td>LEDS_LED3</td><td>Red</td><td>Bicolor Indicator 2</td><td>
High
</td><td>PORTD.6</td></tr>
+ * <tr><td>LEDS_LED4</td><td>Green</td><td>Bicolor Indicator 2</td><td>
High
</td><td>PORTD.7</td></tr>
* </table>
*
* @{
* </table>
*
* @{