projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a147cee
)
Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the...
author
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 29 Jan 2012 14:33:36 +0000
(14:33 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 29 Jan 2012 14:33:36 +0000
(14:33 +0000)
65 files changed:
LUFA/CodeTemplates/DriverStubs/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/CodeTemplates/DriverStubs/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/CodeTemplates/DriverStubs/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/DoxygenPages/ChangeLog.txt
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/ADAFRUITU4/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BENITO/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BUI/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BUMBLEB/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/BUMBLEB/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/CULV3/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/CULV3/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/EVK527/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/JMDBU2/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/JMDBU2/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MICROSIN162/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MICROSIN162/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/OLIMEX162/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/RZUSBSTICK/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/SPARKFUN8U2/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/STK525/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/STK525/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/STK525/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/STK526/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/STK526/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/STK526/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/TUL/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/TUL/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/UDIP/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/UDIP/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/UNO/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBFOO/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBFOO/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBKEY/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBTINYMKII/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/USBTINYMKII/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
patch
|
blob
|
blame
|
history
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
patch
|
blob
|
blame
|
history
diff --git
a/LUFA/CodeTemplates/DriverStubs/Buttons.h
b/LUFA/CodeTemplates/DriverStubs/Buttons.h
index
f1a1846
..
a1de82d
100644
(file)
--- a/
LUFA/CodeTemplates/DriverStubs/Buttons.h
+++ b/
LUFA/CodeTemplates/DriverStubs/Buttons.h
@@
-67,6
+67,11
@@
// TODO: Initialize the appropriate port pins as an inputs here, with pull-ups
}
// TODO: Initialize the appropriate port pins as an inputs here, with pull-ups
}
+ static inline void Buttons_Disable(void)
+ {
+ // TODO: Clear the appropriate port pins as high impedance inputs here
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/CodeTemplates/DriverStubs/Joystick.h
b/LUFA/CodeTemplates/DriverStubs/Joystick.h
index
bfde26b
..
cc6d295
100644
(file)
--- a/
LUFA/CodeTemplates/DriverStubs/Joystick.h
+++ b/
LUFA/CodeTemplates/DriverStubs/Joystick.h
@@
-79,6
+79,11
@@
// TODO: Initialize joystick port pins as inputs with pull-ups
}
// TODO: Initialize joystick port pins as inputs with pull-ups
}
+ static inline void Joystick_Disable(void)
+ {
+ // TODO: Clear the joystick pins as high impedance inputs here
+ }
+
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
{
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Joystick_GetStatus(void)
{
diff --git
a/LUFA/CodeTemplates/DriverStubs/LEDs.h
b/LUFA/CodeTemplates/DriverStubs/LEDs.h
index
e698c9d
..
24b4288
100644
(file)
--- a/
LUFA/CodeTemplates/DriverStubs/LEDs.h
+++ b/
LUFA/CodeTemplates/DriverStubs/LEDs.h
@@
-82,6
+82,11
@@
// TODO: Add code to initialize LED port pins as outputs here
}
// TODO: Add code to initialize LED port pins as outputs here
}
+ static inline void LEDs_Disable(void)
+ {
+ // TODO: Clear the LED port pins as high impedance inputs here
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
// TODO: Add code to turn on LEDs given in the LEDMask mask here, leave others as-is
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
// TODO: Add code to turn on LEDs given in the LEDMask mask here, leave others as-is
diff --git
a/LUFA/DoxygenPages/ChangeLog.txt
b/LUFA/DoxygenPages/ChangeLog.txt
index
6b9477e
..
79a9aad
100644
(file)
--- a/
LUFA/DoxygenPages/ChangeLog.txt
+++ b/
LUFA/DoxygenPages/ChangeLog.txt
@@
-16,6
+16,7
@@
* - Added new Android Accessory Host class driver
* - Added new USB_Host_GetDescriptor(), USB_Host_GetDeviceConfiguration() and USB_Host_GetInterfaceAltSetting() functions
* - Added new CALLBACK_Audio_Device_GetSetInterfaceProperty() callback to the Audio Device Class driver
* - Added new Android Accessory Host class driver
* - Added new USB_Host_GetDescriptor(), USB_Host_GetDeviceConfiguration() and USB_Host_GetInterfaceAltSetting() functions
* - Added new CALLBACK_Audio_Device_GetSetInterfaceProperty() callback to the Audio Device Class driver
+ * - Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers
* - Library Applications:
* - Added User Application APIs to the CDC and DFU class bootloaders
* - Added INVERTED_ISP_MISO compile time option to the AVRISP-MKII clone project (thanks to Chuck Rohs)
* - Library Applications:
* - Added User Application APIs to the CDC and DFU class bootloaders
* - Added INVERTED_ISP_MISO compile time option to the AVRISP-MKII clone project (thanks to Chuck Rohs)
diff --git
a/LUFA/Drivers/Board/AVR8/ADAFRUITU4/LEDs.h
b/LUFA/Drivers/Board/AVR8/ADAFRUITU4/LEDs.h
index
7fa3b47
..
329abb9
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/ADAFRUITU4/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/ADAFRUITU4/LEDs.h
@@
-80,6
+80,12
@@
PORTE &= ~LEDS_ALL_LEDS;
}
PORTE &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRE &= ~LEDS_ALL_LEDS;
+ PORTE &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTE |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTE |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/Buttons.h
b/LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/Buttons.h
index
0c382df
..
78d715c
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/LEDs.h
b/LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/LEDs.h
index
858b21e
..
339e9ee
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/ATAVRUSBRF01/LEDs.h
@@
-92,6
+92,12
@@
PORTD &= ~LEDS_ALL_LEDS;
}
PORTD &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= (LEDMask & LEDS_ALL_LEDS);
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= (LEDMask & LEDS_ALL_LEDS);
diff --git
a/LUFA/Drivers/Board/AVR8/BENITO/Buttons.h
b/LUFA/Drivers/Board/AVR8/BENITO/Buttons.h
index
3e722d6
..
b24482c
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BENITO/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/BENITO/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
b/LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
index
7909600
..
dd52d83
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/BENITO/LEDs.h
@@
-83,6
+83,12
@@
PORTC |= LEDS_ALL_LEDS;
}
PORTC |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRC &= ~LEDS_ALL_LEDS;
+ PORTC &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTC &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTC &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
b/LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
index
04a6a84
..
bed5345
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/BLACKCAT/LEDs.h
@@
-83,6
+83,12
@@
PORTD &= ~LEDS_ALL_LEDS;
}
PORTD &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/BUI/LEDs.h
b/LUFA/Drivers/Board/AVR8/BUI/LEDs.h
index
aeb757a
..
66a1959
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BUI/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/BUI/LEDs.h
@@
-82,7
+82,14
@@
#if !defined(__DOXYGEN__)
static inline void LEDs_Init(void)
{
#if !defined(__DOXYGEN__)
static inline void LEDs_Init(void)
{
- DDRC |= LEDS_ALL_LEDS;
+ DDRC |= LEDS_ALL_LEDS;
+ PORTC &= ~LEDS_ALL_LEDS;
+ }
+
+ static inline void LEDs_Disable(void)
+ {
+ DDRC &= ~LEDS_ALL_LEDS;
+ PORTC &= ~LEDS_ALL_LEDS;
}
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
}
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
diff --git
a/LUFA/Drivers/Board/AVR8/BUMBLEB/Buttons.h
b/LUFA/Drivers/Board/AVR8/BUMBLEB/Buttons.h
index
c3860e0
..
7ea526d
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BUMBLEB/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/BUMBLEB/Buttons.h
@@
-76,6
+76,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h
b/LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h
index
9866574
..
3c44beb
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/BUMBLEB/Joystick.h
@@
-91,7
+91,13
@@
static inline void Joystick_Init(void)
{
DDRD &= ~JOY_MASK;
static inline void Joystick_Init(void)
{
DDRD &= ~JOY_MASK;
- PORTD |= JOY_MASK;
+ PORTD |= JOY_MASK;
+ }
+
+ static inline void Joystick_Disable(void)
+ {
+ DDRD &= ~JOY_MASK;
+ PORTD &= ~JOY_MASK;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
diff --git
a/LUFA/Drivers/Board/AVR8/BUMBLEB/LEDs.h
b/LUFA/Drivers/Board/AVR8/BUMBLEB/LEDs.h
index
fa53764
..
acf125a
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/BUMBLEB/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/BUMBLEB/LEDs.h
@@
-91,6
+91,12
@@
PORTB &= ~LEDS_ALL_LEDS;
}
PORTB &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= ~LEDS_ALL_LEDS;
+ PORTB &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LedMask)
{
PORTB |= LedMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LedMask)
{
PORTB |= LedMask;
diff --git
a/LUFA/Drivers/Board/AVR8/CULV3/Buttons.h
b/LUFA/Drivers/Board/AVR8/CULV3/Buttons.h
index
8a39fa6
..
caa700d
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/CULV3/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/CULV3/Buttons.h
@@
-74,6
+74,12
@@
PORTE |= BUTTONS_BUTTON1;
}
PORTE |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/CULV3/LEDs.h
b/LUFA/Drivers/Board/AVR8/CULV3/LEDs.h
index
86e5c0c
..
dede020
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/CULV3/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/CULV3/LEDs.h
@@
-80,6
+80,12
@@
PORTE &= ~LEDS_ALL_LEDS;
}
PORTE &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRE &= ~LEDS_ALL_LEDS;
+ PORTE &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTE |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTE |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/EVK527/Buttons.h
b/LUFA/Drivers/Board/AVR8/EVK527/Buttons.h
index
03c51d2
..
748299f
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/EVK527/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/EVK527/Buttons.h
@@
-74,6
+74,12
@@
PORTE |= BUTTONS_BUTTON1;
}
PORTE |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
b/LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
index
19d19ee
..
811b5f1
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/EVK527/Joystick.h
@@
-91,11
+91,20
@@
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
{
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
{
- DDRF &= ~
(JOY_FMASK)
;
- DDRC &= ~
(JOY_CMASK)
;
+ DDRF &= ~
JOY_FMASK
;
+ DDRC &= ~
JOY_CMASK
;
- PORTF |= JOY_FMASK;
- PORTC |= JOY_CMASK;
+ PORTF |= JOY_FMASK;
+ PORTC |= JOY_CMASK;
+ }
+
+ static inline void Joystick_Disable(void)
+ {
+ DDRF &= ~JOY_FMASK;
+ DDRC &= ~JOY_CMASK;
+
+ PORTF &= ~JOY_FMASK;
+ PORTC &= ~JOY_CMASK;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
diff --git
a/LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
b/LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
index
4cb6aeb
..
fddb99d
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/EVK527/LEDs.h
@@
-86,6
+86,12
@@
PORTD &= ~LEDS_ALL_LEDS;
}
PORTD &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/JMDBU2/Buttons.h
b/LUFA/Drivers/Board/AVR8/JMDBU2/Buttons.h
index
170eaea
..
8486744
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/JMDBU2/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/JMDBU2/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/JMDBU2/LEDs.h
b/LUFA/Drivers/Board/AVR8/JMDBU2/LEDs.h
index
b3847b7
..
f24bc32
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/JMDBU2/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/JMDBU2/LEDs.h
@@
-80,6
+80,12
@@
PORTD &= ~LEDS_ALL_LEDS;
}
PORTD &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
b/LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
index
f211e65
..
aa55737
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/MAXIMUS/LEDs.h
@@
-83,6
+83,12
@@
PORTB &= ~LEDS_ALL_LEDS;
}
PORTB &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= ~LEDS_ALL_LEDS;
+ PORTB &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/MICROSIN162/Buttons.h
b/LUFA/Drivers/Board/AVR8/MICROSIN162/Buttons.h
index
e3ba957
..
0b07103
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MICROSIN162/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/MICROSIN162/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/MICROSIN162/LEDs.h
b/LUFA/Drivers/Board/AVR8/MICROSIN162/LEDs.h
index
6e84729
..
ec61a04
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MICROSIN162/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/MICROSIN162/LEDs.h
@@
-80,6
+80,12
@@
PORTD |= LEDS_ALL_LEDS;
}
PORTD |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
b/LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
index
ef30a9b
..
f58762a
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/MINIMUS/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
b/LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
index
124fbaa
..
349e0ff
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/MINIMUS/LEDs.h
@@
-83,6
+83,12
@@
PORTD |= LEDS_ALL_LEDS;
}
PORTD |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/OLIMEX162/Buttons.h
b/LUFA/Drivers/Board/AVR8/OLIMEX162/Buttons.h
index
32a7511
..
c6d1b79
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/OLIMEX162/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/OLIMEX162/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h
b/LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h
index
9872b94
..
9452604
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/OLIMEX162/LEDs.h
@@
-80,6
+80,12
@@
PORTD |= LEDS_ALL_LEDS;
}
PORTD |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/RZUSBSTICK/LEDs.h
b/LUFA/Drivers/Board/AVR8/RZUSBSTICK/LEDs.h
index
ed5c2c1
..
bc2001e
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/RZUSBSTICK/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/RZUSBSTICK/LEDs.h
@@
-102,6
+102,15
@@
PORTE |= (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT);
}
PORTE |= (LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT);
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_PORTD_LEDS;
+ PORTD &= ~LEDS_PORTD_LEDS;
+
+ DDRE &= ~(LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT);
+ PORTE &= ~(LEDS_PORTE_LEDS << LEDS_PORTE_MASK_SHIFT);
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= (LEDMask & LEDS_LED1);
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= (LEDMask & LEDS_LED1);
diff --git
a/LUFA/Drivers/Board/AVR8/SPARKFUN8U2/LEDs.h
b/LUFA/Drivers/Board/AVR8/SPARKFUN8U2/LEDs.h
index
278bee5
..
cf058b7
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/SPARKFUN8U2/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/SPARKFUN8U2/LEDs.h
@@
-80,6
+80,12
@@
PORTB |= LEDS_ALL_LEDS;
}
PORTB |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= ~LEDS_ALL_LEDS;
+ PORTB &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/STK525/Buttons.h
b/LUFA/Drivers/Board/AVR8/STK525/Buttons.h
index
d67a51d
..
fdabb95
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK525/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/STK525/Buttons.h
@@
-74,6
+74,12
@@
PORTE |= BUTTONS_BUTTON1;
}
PORTE |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/STK525/Joystick.h
b/LUFA/Drivers/Board/AVR8/STK525/Joystick.h
index
dcf7f2e
..
a1e2fd0
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK525/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/STK525/Joystick.h
@@
-91,11
+91,20
@@
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
{
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
{
- DDRB &= ~
(JOY_BMASK)
;
- DDRE &= ~
(JOY_EMASK)
;
+ DDRB &= ~
JOY_BMASK
;
+ DDRE &= ~
JOY_EMASK
;
- PORTB |= JOY_BMASK;
- PORTE |= JOY_EMASK;
+ PORTB |= JOY_BMASK;
+ PORTE |= JOY_EMASK;
+ }
+
+ static inline void Joystick_Disable(void)
+ {
+ DDRB &= ~JOY_BMASK;
+ DDRE &= ~JOY_EMASK;
+
+ PORTB &= ~JOY_BMASK;
+ PORTE &= ~JOY_EMASK;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
diff --git
a/LUFA/Drivers/Board/AVR8/STK525/LEDs.h
b/LUFA/Drivers/Board/AVR8/STK525/LEDs.h
index
2c81fd4
..
ca21f9e
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK525/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/STK525/LEDs.h
@@
-89,6
+89,12
@@
PORTD &= ~LEDS_ALL_LEDS;
}
PORTD &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/STK526/Buttons.h
b/LUFA/Drivers/Board/AVR8/STK526/Buttons.h
index
e2000a9
..
55826e0
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK526/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/STK526/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/STK526/Joystick.h
b/LUFA/Drivers/Board/AVR8/STK526/Joystick.h
index
7c024fb
..
443d701
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK526/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/STK526/Joystick.h
@@
-90,7
+90,14
@@
{
DDRB &= ~JOY_BMASK;
{
DDRB &= ~JOY_BMASK;
- PORTB |= JOY_BMASK;
+ PORTB |= JOY_BMASK;
+ }
+
+ static inline void Joystick_Disable(void)
+ {
+ DDRB &= ~JOY_BMASK;
+
+ PORTB &= ~JOY_BMASK;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
diff --git
a/LUFA/Drivers/Board/AVR8/STK526/LEDs.h
b/LUFA/Drivers/Board/AVR8/STK526/LEDs.h
index
b77c691
..
5aeb13f
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/STK526/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/STK526/LEDs.h
@@
-89,6
+89,12
@@
PORTD &= ~LEDS_ALL_LEDS;
}
PORTD &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
b/LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
index
1722fe7
..
8184fb9
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/TEENSY/LEDs.h
@@
-94,6
+94,12
@@
#endif
}
#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)
diff --git
a/LUFA/Drivers/Board/AVR8/TUL/Buttons.h
b/LUFA/Drivers/Board/AVR8/TUL/Buttons.h
index
191caa9
..
ae5f8c8
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/TUL/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/TUL/Buttons.h
@@
-74,6
+74,12
@@
PORTE |= BUTTONS_BUTTON1;
}
PORTE |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/TUL/LEDs.h
b/LUFA/Drivers/Board/AVR8/TUL/LEDs.h
index
4968a18
..
def25fd
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/TUL/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/TUL/LEDs.h
@@
-80,6
+80,12
@@
PORTF &= ~LEDS_ALL_LEDS;
}
PORTF &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRF &= ~LEDS_ALL_LEDS;
+ PORTF &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTF |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTF |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/UDIP/Buttons.h
b/LUFA/Drivers/Board/AVR8/UDIP/Buttons.h
index
61ae9b8
..
5146cc2
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/UDIP/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/UDIP/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/UDIP/LEDs.h
b/LUFA/Drivers/Board/AVR8/UDIP/LEDs.h
index
5378903
..
f3aca6a
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/UDIP/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/UDIP/LEDs.h
@@
-98,6
+98,12
@@
DDRD |= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
}
DDRD |= (LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= ~LEDS_PORTB_LEDS;
+ DDRD &= ~(LEDS_PORTD_LEDS << LEDS_PORTD_MASK_SHIFT);
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB |= (LEDMask & LEDS_PORTB_LEDS);
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB |= (LEDMask & LEDS_PORTB_LEDS);
diff --git
a/LUFA/Drivers/Board/AVR8/UNO/LEDs.h
b/LUFA/Drivers/Board/AVR8/UNO/LEDs.h
index
0205b2d
..
579a1b2
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/UNO/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/UNO/LEDs.h
@@
-83,6
+83,12
@@
PORTD |= LEDS_ALL_LEDS;
}
PORTD |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
b/LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
index
4e1e500
..
7d8984a
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
@@
-83,6
+83,12
@@
PORTD |= BUTTONS_BUTTON1;
\r
}
\r
\r
PORTD |= BUTTONS_BUTTON1;
\r
}
\r
\r
+ static inline void Buttons_Disable(void)
\r
+ {
\r
+ DDRD &= ~BUTTONS_BUTTON1;
\r
+ PORTD &= ~BUTTONS_BUTTON1;
\r
+ }
\r
+
\r
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
\r
static inline uint8_t Buttons_GetStatus(void)
\r
{
\r
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
\r
static inline uint8_t Buttons_GetStatus(void)
\r
{
\r
diff --git
a/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
b/LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
index
541da26
..
e236ded
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
@@
-104,6
+104,17
@@
#endif
\r
}
\r
\r
#endif
\r
}
\r
\r
+ static inline void LEDs_Disable(void)
\r
+ {
\r
+ #if (BOARD == BOARD_USB2AX)
\r
+ DDRC &= ~LEDS_ALL_LEDS;
\r
+ PORTC &= ~LEDS_ALL_LEDS;
\r
+ #else
\r
+ DDRD &= ~LEDS_ALL_LEDS;
\r
+ PORTD &= ~LEDS_ALL_LEDS;
\r
+ #endif
\r
+ }
\r
+
\r
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
\r
{
\r
#if (BOARD == BOARD_USB2AX)
\r
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
\r
{
\r
#if (BOARD == BOARD_USB2AX)
\r
diff --git
a/LUFA/Drivers/Board/AVR8/USBFOO/Buttons.h
b/LUFA/Drivers/Board/AVR8/USBFOO/Buttons.h
index
21c6a1f
..
617ca27
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBFOO/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/USBFOO/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/USBFOO/LEDs.h
b/LUFA/Drivers/Board/AVR8/USBFOO/LEDs.h
index
cb46258
..
82f1051
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBFOO/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/USBFOO/LEDs.h
@@
-80,6
+80,12
@@
PORTD |= LEDS_ALL_LEDS;
}
PORTD |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/USBKEY/Buttons.h
b/LUFA/Drivers/Board/AVR8/USBKEY/Buttons.h
index
018bf6b
..
3aa19b1
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBKEY/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/USBKEY/Buttons.h
@@
-74,6
+74,12
@@
PORTE |= BUTTONS_BUTTON1;
}
PORTE |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRE &= ~BUTTONS_BUTTON1;
+ PORTE &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
b/LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
index
5e80a53
..
fa7f218
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
+++ b/
LUFA/Drivers/Board/AVR8/USBKEY/Joystick.h
@@
-91,11
+91,20
@@
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
{
#if !defined(__DOXYGEN__)
static inline void Joystick_Init(void)
{
- DDRB &= ~
(JOY_BMASK)
;
- DDRE &= ~
(JOY_EMASK)
;
+ DDRB &= ~
JOY_BMASK
;
+ DDRE &= ~
JOY_EMASK
;
- PORTB |= JOY_BMASK;
- PORTE |= JOY_EMASK;
+ PORTB |= JOY_BMASK;
+ PORTE |= JOY_EMASK;
+ }
+
+ static inline void Joystick_Disable(void)
+ {
+ DDRB &= ~JOY_BMASK;
+ DDRE &= ~JOY_EMASK;
+
+ PORTB &= ~JOY_BMASK;
+ PORTE &= ~JOY_EMASK;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
}
static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
diff --git
a/LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
b/LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
index
e4a7002
..
e4a4db1
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/USBKEY/LEDs.h
@@
-89,6
+89,12
@@
PORTD &= ~LEDS_ALL_LEDS;
}
PORTD &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRD &= ~LEDS_ALL_LEDS;
+ PORTD &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTD |= LEDMask;
diff --git
a/LUFA/Drivers/Board/AVR8/USBTINYMKII/Buttons.h
b/LUFA/Drivers/Board/AVR8/USBTINYMKII/Buttons.h
index
20cb340
..
530c3ce
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBTINYMKII/Buttons.h
+++ b/
LUFA/Drivers/Board/AVR8/USBTINYMKII/Buttons.h
@@
-74,6
+74,12
@@
PORTD |= BUTTONS_BUTTON1;
}
PORTD |= BUTTONS_BUTTON1;
}
+ static inline void Buttons_Disable(void)
+ {
+ DDRD &= ~BUTTONS_BUTTON1;
+ PORTD &= ~BUTTONS_BUTTON1;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/AVR8/USBTINYMKII/LEDs.h
b/LUFA/Drivers/Board/AVR8/USBTINYMKII/LEDs.h
index
00cfd2b
..
368f833
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/USBTINYMKII/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/USBTINYMKII/LEDs.h
@@
-86,6
+86,12
@@
PORTB &= ~LEDS_ALL_LEDS;
}
PORTB &= ~LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= ~LEDS_ALL_LEDS;
+ PORTB &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LedMask)
{
PORTB |= LedMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LedMask)
{
PORTB |= LedMask;
diff --git
a/LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
b/LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
index
3abe98e
..
870d7a3
100644
(file)
--- a/
LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
+++ b/
LUFA/Drivers/Board/AVR8/XPLAIN/LEDs.h
@@
-87,6
+87,12
@@
PORTB |= LEDS_ALL_LEDS;
}
PORTB |= LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ DDRB &= ~LEDS_ALL_LEDS;
+ PORTB &= ~LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB &= ~LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTB &= ~LEDMask;
diff --git
a/LUFA/Drivers/Board/Buttons.h
b/LUFA/Drivers/Board/Buttons.h
index
f60dbb5
..
3dd89a9
100644
(file)
--- a/
LUFA/Drivers/Board/Buttons.h
+++ b/
LUFA/Drivers/Board/Buttons.h
@@
-141,13
+141,16
@@
/* Pseudo-Functions for Doxygen: */
#if defined(__DOXYGEN__)
/* Pseudo-Functions for Doxygen: */
#if defined(__DOXYGEN__)
- /** Initializes the
BUTTONS
driver, so that the current button position can be read. This sets the appropriate
+ /** Initializes the
buttons
driver, so that the current button position can be read. This sets the appropriate
* I/O pins to an inputs with pull-ups enabled.
*
* This must be called before any Button driver functions are used.
*/
static inline void Buttons_Init(void);
* I/O pins to an inputs with pull-ups enabled.
*
* This must be called before any Button driver functions are used.
*/
static inline void Buttons_Init(void);
+ /** Disables the buttons driver, releasing the I/O pins back to their default high-impedence input mode. */
+ static inline void Buttons_Disable(void);
+
/** Returns a mask indicating which board buttons are currently pressed.
*
* \return Mask indicating which board buttons are currently pressed.
/** Returns a mask indicating which board buttons are currently pressed.
*
* \return Mask indicating which board buttons are currently pressed.
diff --git
a/LUFA/Drivers/Board/Joystick.h
b/LUFA/Drivers/Board/Joystick.h
index
95e90fa
..
452689c
100644
(file)
--- a/
LUFA/Drivers/Board/Joystick.h
+++ b/
LUFA/Drivers/Board/Joystick.h
@@
-126,6
+126,9
@@
*/
static inline void Joystick_Init(void);
*/
static inline void Joystick_Init(void);
+ /** Disables the joystick driver, releasing the I/O pins back to their default high-impedence input mode. */
+ static inline void Joystick_Disable(void);
+
/** Returns the current status of the joystick, as a mask indicating the direction the joystick is
* currently facing in (multiple bits can be set).
*
/** Returns the current status of the joystick, as a mask indicating the direction the joystick is
* currently facing in (multiple bits can be set).
*
diff --git
a/LUFA/Drivers/Board/LEDs.h
b/LUFA/Drivers/Board/LEDs.h
index
e1f6b4c
..
839a059
100644
(file)
--- a/
LUFA/Drivers/Board/LEDs.h
+++ b/
LUFA/Drivers/Board/LEDs.h
@@
-205,6
+205,9
@@
*/
static inline void LEDs_Init(void);
*/
static inline void LEDs_Init(void);
+ /** Disables the board LED driver, releasing the I/O pins back to their default high-impedence input mode. */
+ static inline void LEDs_Disable(void);
+
/** Turns on the LEDs specified in the given LED mask.
*
* \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file).
/** Turns on the LEDs specified in the given LED mask.
*
* \param[in] LEDMask Mask of the board LEDs to manipulate (see board-specific LEDs.h driver file).
diff --git
a/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
b/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
index
10f02cf
..
300e37c
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
@@
-86,6
+86,12
@@
AVR32_GPIO.port[BUTTONS_PORT].puers = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
}
AVR32_GPIO.port[BUTTONS_PORT].puers = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
}
+ static inline void Buttons_Disable(void)
+ {
+ AVR32_GPIO.port[BUTTONS_PORT].gperc = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
+ AVR32_GPIO.port[BUTTONS_PORT].puerc = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
+ }
+
static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Buttons_GetStatus(void)
{
static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
b/LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
index
aaf729b
..
4bd6185
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
@@
-93,6
+93,12
@@
AVR32_GPIO.port[JOY_PORT].gpers = JOY_MASK;
};
AVR32_GPIO.port[JOY_PORT].gpers = JOY_MASK;
};
+ static inline void Joystick_Disable(void)
+ {
+ AVR32_GPIO.port[JOY_PORT].gperc = JOY_MASK;
+ AVR32_GPIO.port[JOY_PORT].gperc = JOY_MASK;
+ };
+
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
b/LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
index
6fd1ac8
..
96ae1a7
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
@@
-109,6
+109,13
@@
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ AVR32_GPIO.port[LEDS_PORT].gperc = LEDS_ALL_LEDS;
+ AVR32_GPIO.port[LEDS_PORT].oderc = LEDS_ALL_LEDS;
+ AVR32_GPIO.port[LEDS_PORT].ovrc = LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
diff --git
a/LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
b/LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
index
18c7117
..
3ce1afe
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
@@
-83,6
+83,12
@@
AVR32_GPIO.port[BUTTONS_PORT].puers = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
}
AVR32_GPIO.port[BUTTONS_PORT].puers = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
}
+ static inline void Buttons_Disable(void)
+ {
+ AVR32_GPIO.port[BUTTONS_PORT].gperc = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
+ AVR32_GPIO.port[BUTTONS_PORT].puerc = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
+ }
+
static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Buttons_GetStatus(void)
{
static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
b/LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
index
0481f83
..
7334909
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
@@
-98,6
+98,15
@@
AVR32_GPIO.port[JOY_PRESS_PORT].puers = JOY_PRESS_MASK;
};
AVR32_GPIO.port[JOY_PRESS_PORT].puers = JOY_PRESS_MASK;
};
+ static inline void Joystick_Disable(void)
+ {
+ AVR32_GPIO.port[JOY_MOVE_PORT].gperc = JOY_MOVE_MASK;
+ AVR32_GPIO.port[JOY_PRESS_PORT].gperc = JOY_PRESS_MASK;
+
+ AVR32_GPIO.port[JOY_MOVE_PORT].puerc = JOY_MOVE_MASK;
+ AVR32_GPIO.port[JOY_PRESS_PORT].puerc = JOY_PRESS_MASK;
+ };
+
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
static inline uint32_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Joystick_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
b/LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
index
6feadbc
..
65a3481
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
@@
-96,6
+96,13
@@
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
AVR32_GPIO.port[LEDS_PORT].ovrs = LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ AVR32_GPIO.port[LEDS_PORT].gperc = LEDS_ALL_LEDS;
+ AVR32_GPIO.port[LEDS_PORT].oderc = LEDS_ALL_LEDS;
+ AVR32_GPIO.port[LEDS_PORT].ovrc = LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[LEDS_PORT].ovrc = LEDMask;
diff --git
a/LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
b/LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
index
934f922
..
597c8e9
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
@@
-80,6
+80,12
@@
AVR32_GPIO.port[BUTTONS_PORT].puers = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
}
AVR32_GPIO.port[BUTTONS_PORT].puers = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
}
+ static inline void Buttons_Disable(void)
+ {
+ AVR32_GPIO.port[BUTTONS_PORT].gperc = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
+ AVR32_GPIO.port[BUTTONS_PORT].puerc = (BUTTONS_BUTTON1 | BUTTONS_BUTTON2);
+ }
+
static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Buttons_GetStatus(void)
{
static inline uint32_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint32_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
b/LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
index
5813e89
..
6d25626
100644
(file)
--- a/
LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
+++ b/
LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
@@
-101,6
+101,17
@@
AVR32_GPIO.port[3].ovrs = LEDS_LEDMASK3;
}
AVR32_GPIO.port[3].ovrs = LEDS_LEDMASK3;
}
+ static inline void LEDs_Disable(void)
+ {
+ AVR32_GPIO.port[2].gperc = LEDS_LEDMASK2;
+ AVR32_GPIO.port[2].oderc = LEDS_LEDMASK2;
+ AVR32_GPIO.port[2].ovrc = LEDS_LEDMASK2;
+
+ AVR32_GPIO.port[3].gperc = LEDS_LEDMASK3;
+ AVR32_GPIO.port[3].oderc = LEDS_LEDMASK3;
+ AVR32_GPIO.port[3].ovrc = LEDS_LEDMASK3;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[2].ovrc = (LEDMask & LEDS_LEDMASK2);
static inline void LEDs_TurnOnLEDs(const uint32_t LEDMask)
{
AVR32_GPIO.port[2].ovrc = (LEDMask & LEDS_LEDMASK2);
diff --git
a/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
b/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
index
1665fa4
..
6f6b875
100644
(file)
--- a/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
+++ b/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/Buttons.h
@@
-84,6
+84,16
@@
PORTF_PIN2CTRL = PORT_OPC_PULLUP_gc;
}
PORTF_PIN2CTRL = PORT_OPC_PULLUP_gc;
}
+ static inline void Buttons_Disable(void)
+ {
+ PORTE_OUTCLR = BUTTONS_BUTTON1;
+ PORTF_OUTCLR = (BUTTONS_BUTTON2 | BUTTONS_BUTTON3);
+
+ PORTE_PIN5CTRL = 0;
+ PORTF_PIN1CTRL = 0;
+ PORTF_PIN2CTRL = 0;
+ }
+
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
static inline uint8_t Buttons_GetStatus(void)
{
diff --git
a/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
b/LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
index
d555ac2
..
f4a5d0e
100644
(file)
--- a/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
+++ b/
LUFA/Drivers/Board/XMEGA/A3BU_XPLAINED/LEDs.h
@@
-83,6
+83,12
@@
PORTR_OUTSET = LEDS_ALL_LEDS;
}
PORTR_OUTSET = LEDS_ALL_LEDS;
}
+ static inline void LEDs_Disable(void)
+ {
+ PORTR_DIRCLR = LEDS_ALL_LEDS;
+ PORTR_OUTCLR = LEDS_ALL_LEDS;
+ }
+
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTR_OUTCLR = LEDMask;
static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
{
PORTR_OUTCLR = LEDMask;