Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lufa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
lufa
Commits
1482f778
Commit
1482f778
authored
Feb 6, 2012
by
Dean Camera
Browse files
Options
Downloads
Patches
Plain Diff
Oops - XMEGA-B1 Xplained LEDs are on PORTB and PORTE, not PORTF and PORTE.
parent
4d131de8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h
+13
-13
13 additions, 13 deletions
LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h
with
13 additions
and
13 deletions
LUFA/Drivers/Board/XMEGA/B1_XPLAINED/LEDs.h
+
13
−
13
View file @
1482f778
...
...
@@ -64,7 +64,7 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Macros: */
#define LEDS_PORT
F
_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
#define LEDS_PORT
B
_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3 | LEDS_LED4)
#define LEDS_PORTE_LEDS LEDS_LED5
#define LEDS_PORTE_MASK_SHIFT 1
...
...
@@ -97,8 +97,8 @@
#if !defined(__DOXYGEN__)
static
inline
void
LEDs_Init
(
void
)
{
PORT
F
_DIRSET
=
LEDS_PORT
F
_LEDS
;
PORT
F
_OUTSET
=
LEDS_PORT
F
_LEDS
;
PORT
B
_DIRSET
=
LEDS_PORT
B
_LEDS
;
PORT
B
_OUTSET
=
LEDS_PORT
B
_LEDS
;
PORTE_DIRSET
=
(
LEDS_PORTE_LEDS
<<
LEDS_PORTE_MASK_SHIFT
);
PORTE_OUTCLR
=
(
LEDS_PORTE_LEDS
<<
LEDS_PORTE_MASK_SHIFT
);
...
...
@@ -106,8 +106,8 @@
static
inline
void
LEDs_Disable
(
void
)
{
PORT
F
_DIRCLR
=
LEDS_PORT
F
_LEDS
;
PORT
F
_OUTCLR
=
LEDS_PORT
F
_LEDS
;
PORT
B
_DIRCLR
=
LEDS_PORT
B
_LEDS
;
PORT
B
_OUTCLR
=
LEDS_PORT
B
_LEDS
;
PORTE_DIRCLR
=
(
LEDS_PORTE_LEDS
<<
LEDS_PORTE_MASK_SHIFT
);
PORTE_OUTCLR
=
(
LEDS_PORTE_LEDS
<<
LEDS_PORTE_MASK_SHIFT
);
...
...
@@ -115,42 +115,42 @@
static
inline
void
LEDs_TurnOnLEDs
(
const
uint8_t
LEDMask
)
{
PORT
F
_OUTCLR
=
(
LEDMask
&
LEDS_PORT
F
_LEDS
);
PORT
B
_OUTCLR
=
(
LEDMask
&
LEDS_PORT
B
_LEDS
);
PORTE_OUTSET
=
((
LEDMask
&
LEDS_PORTE_LEDS
)
<<
LEDS_PORTE_MASK_SHIFT
);
}
static
inline
void
LEDs_TurnOffLEDs
(
const
uint8_t
LEDMask
)
{
PORT
F
_OUTSET
=
(
LEDMask
&
LEDS_PORT
F
_LEDS
);
PORT
B
_OUTSET
=
(
LEDMask
&
LEDS_PORT
B
_LEDS
);
PORTE_OUTCLR
=
((
LEDMask
&
LEDS_PORTE_LEDS
)
<<
LEDS_PORTE_MASK_SHIFT
);
}
static
inline
void
LEDs_SetAllLEDs
(
const
uint8_t
LEDMask
)
{
PORT
F
_OUTSET
=
LEDS_PORT
F
_LEDS
;
PORT
B
_OUTSET
=
LEDS_PORT
B
_LEDS
;
PORTE_OUTCLR
=
(
LEDS_PORTE_LEDS
<<
LEDS_PORTE_MASK_SHIFT
);
PORT
F
_OUTCLR
=
(
LEDMask
&
LEDS_PORT
F
_LEDS
);
PORT
B
_OUTCLR
=
(
LEDMask
&
LEDS_PORT
B
_LEDS
);
PORTE_OUTSET
=
((
LEDMask
&
LEDS_PORTE_LEDS
)
<<
LEDS_PORTE_MASK_SHIFT
);
}
static
inline
void
LEDs_ChangeLEDs
(
const
uint8_t
LEDMask
,
const
uint8_t
ActiveMask
)
{
PORT
F
_OUT
=
(
PORT
F
.
OUT
&
(
~
LEDMask
&
LEDS_PORT
F
_LEDS
))
|
(
ActiveMask
&
LEDS_PORT
F
_LEDS
);
PORTE_OUT
=
(
PORT
F
.
OUT
&
(((
~
LEDMask
&
LEDS_PORT
F
_LEDS
))
<<
LEDS_PORTE_MASK_SHIFT
)
&
PORT
B
_OUT
=
(
PORT
B
.
OUT
&
(
~
LEDMask
&
LEDS_PORT
B
_LEDS
))
|
(
ActiveMask
&
LEDS_PORT
B
_LEDS
);
PORTE_OUT
=
(
PORT
B
.
OUT
&
(((
~
LEDMask
&
LEDS_PORT
B
_LEDS
))
<<
LEDS_PORTE_MASK_SHIFT
)
&
~
((
ActiveMask
&
LEDS_PORTE_LEDS
)
<<
LEDS_PORTE_MASK_SHIFT
));
}
static
inline
void
LEDs_ToggleLEDs
(
const
uint8_t
LEDMask
)
{
PORT
F
_OUTTGL
=
(
LEDMask
&
LEDS_PORT
F
_LEDS
);
PORT
B
_OUTTGL
=
(
LEDMask
&
LEDS_PORT
B
_LEDS
);
PORTE_OUTTGL
=
((
LEDMask
&
LEDS_PORTE_LEDS
)
<<
LEDS_PORTE_MASK_SHIFT
);
}
static
inline
uint8_t
LEDs_GetLEDs
(
void
)
ATTR_WARN_UNUSED_RESULT
;
static
inline
uint8_t
LEDs_GetLEDs
(
void
)
{
return
((
~
PORT
F
_OUT
&
LEDS_PORT
F
_LEDS
)
|
(
PORTE_OUT
&
(
LEDS_PORTE_LEDS
<<
LEDS_PORTE_MASK_SHIFT
)));
return
((
~
PORT
B
_OUT
&
LEDS_PORT
B
_LEDS
)
|
(
PORTE_OUT
&
(
LEDS_PORTE_LEDS
<<
LEDS_PORTE_MASK_SHIFT
)));
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment