aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/Board/UC3/EVK1100
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-01-29 14:33:36 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2012-01-29 14:33:36 +0000
commit4478a62f1160b53f57acecf68c182a67ad8a6bd2 (patch)
tree0d5ffd18c3d061f7b91443417ce61ff07b02af3e /LUFA/Drivers/Board/UC3/EVK1100
parent5e04af2c4afa4513fd95817423119e9b4871c02a (diff)
Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2013 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/Board/UC3/EVK1100')
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1100/Buttons.h6
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1100/Joystick.h6
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1100/LEDs.h7
3 files changed, 19 insertions, 0 deletions
diff --git a/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h b/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
index 10f02cf6..300e37ca 100644
--- 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);
}
+ 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)
{
diff --git a/LUFA/Drivers/Board/UC3/EVK1100/Joystick.h b/LUFA/Drivers/Board/UC3/EVK1100/Joystick.h
index aaf729b0..4bd61855 100644
--- 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;
};
+ 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)
{
diff --git a/LUFA/Drivers/Board/UC3/EVK1100/LEDs.h b/LUFA/Drivers/Board/UC3/EVK1100/LEDs.h
index 6fd1ac8c..96ae1a7b 100644
--- 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;
}
+ 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;