Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
e92a9845
Commit
e92a9845
authored
Aug 12, 2012
by
Dean Camera
Browse files
Leonardo LEDs are RX/TX active Low and USER active high, not the other way around.
parent
40755d4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
LUFA/Drivers/Board/AVR8/LEONARDO/LEDs.h
View file @
e92a9845
...
...
@@ -131,17 +131,17 @@
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
));
PORTC
=
((
PORTC
|
LEDS_PORTC_LEDS
)
&
~
(
LEDMask
&
LEDS_PORTC_LEDS
));
PORTB
=
((
PORTB
|
LEDS_PORTB_LEDS
)
&
~
(
LEDMask
&
LEDS_PORTB_LEDS
));
PORTD
=
((
PORTD
|
LEDS_PORTD_LEDS
)
&
~
(
LEDMask
&
LEDS_PORTD_LEDS
));
PORTC
=
((
PORTC
&
~
LEDS_PORTC_LEDS
)
|
(
LEDMask
&
LEDS_PORTC_LEDS
));
}
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
));
PORTC
=
((
PORTC
|
(
LEDMask
&
LEDS_PORTC_LEDS
))
|
~
(
ActiveMask
&
LEDS_PORTC_LEDS
));
PORTB
=
((
PORTB
|
(
LEDMask
&
LEDS_PORTB_LEDS
))
&
~
(
ActiveMask
&
LEDS_PORTB_LEDS
));
PORTD
=
((
PORTD
|
(
LEDMask
&
LEDS_PORTD_LEDS
))
&
~
(
ActiveMask
&
LEDS_PORTD_LEDS
));
PORTC
=
((
PORTC
&
~
(
LEDMask
&
LEDS_PORTC_LEDS
))
|
(
ActiveMask
&
LEDS_PORTC_LEDS
));
}
static
inline
void
LEDs_ToggleLEDs
(
const
uint8_t
LEDMask
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment