projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extra LUFA TAR archive export exclusions.
[pub/USBasp.git]
/
LUFA
/
Drivers
/
Board
/
AVR8
/
TEENSY
/
LEDs.h
diff --git
a/LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
b/LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
index
63b96b0
..
9a71cf5
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
@@
-1,13
+1,13
@@
/*
LUFA Library
/*
LUFA Library
- Copyright (C) Dean Camera, 201
1
.
+ Copyright (C) Dean Camera, 201
2
.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
*/
/*
- Copyright 201
1
Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 201
2
Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
@@
-35,7
+35,7
@@
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
* \note This file should not be included directly. It is automatically included as needed by the LEDs driver
* dispatch header located in LUFA/Drivers/Board/LEDs.h.
*/
-
+
/** \ingroup Group_LEDs
* \defgroup Group_LEDs_TEENSY2 TEENSY2
* \brief Board specific LED driver header for the PJRC Teensy 2 boards.
/** \ingroup Group_LEDs
* \defgroup Group_LEDs_TEENSY2 TEENSY2
* \brief Board specific LED driver header for the PJRC Teensy 2 boards.
@@
-88,16
+88,22
@@
DDRD |= LEDS_ALL_LEDS;
#if (BOARD == BOARD_TEENSY2)
DDRD |= LEDS_ALL_LEDS;
#if (BOARD == BOARD_TEENSY2)
- PORTD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
#else
PORTD |= LEDS_ALL_LEDS;
#endif
}
#else
PORTD |= LEDS_ALL_LEDS;
#endif
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
- PORTD |= LEDMask;
+ PORTD |= LEDMask;
#else
PORTD &= ~LEDMask;
#endif
#else
PORTD &= ~LEDMask;
#endif
@@
-106,7
+112,7
@@
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
{
#if (BOARD == BOARD_TEENSY2)
- PORTD &= ~LEDMask;
+ PORTD &= ~LEDMask;
#else
PORTD |= LEDMask;
#endif
#else
PORTD |= LEDMask;
#endif
@@
-125,7
+131,7
@@
const uint8_t ActiveMask)
{
#if (BOARD == BOARD_TEENSY2)
const uint8_t ActiveMask)
{
#if (BOARD == BOARD_TEENSY2)
- PORTD = ((PORTD & ~LEDMask) | ActiveMask);
+ PORTD = ((PORTD & ~LEDMask) | ActiveMask);
#else
PORTD = ((PORTD | LEDMask) & ~ActiveMask);
#endif
#else
PORTD = ((PORTD | LEDMask) & ~ActiveMask);
#endif
@@
-140,7
+146,7
@@
static inline uint8_t LEDs_GetLEDs(void)
{
#if (BOARD == BOARD_TEENSY2)
static inline uint8_t LEDs_GetLEDs(void)
{
#if (BOARD == BOARD_TEENSY2)
- return (PORTD & LEDS_ALL_LEDS);
+ return (PORTD & LEDS_ALL_LEDS);
#else
return (~PORTD & LEDS_ALL_LEDS);
#endif
#else
return (~PORTD & LEDS_ALL_LEDS);
#endif