aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Board/UC3
diff options
context:
space:
mode:
Diffstat (limited to 'LUFA/Drivers/Board/UC3')
-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
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1101/Buttons.h6
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1101/Joystick.h9
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1101/LEDs.h7
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1104/Buttons.h6
-rw-r--r--LUFA/Drivers/Board/UC3/EVK1104/LEDs.h11
8 files changed, 58 insertions, 0 deletions
diff --git a/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h b/LUFA/Drivers/Board/UC3/EVK1100/Buttons.h
index 10f02cf6a..300e37ca2 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 aaf729b02..4bd618552 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 6fd1ac8c2..96ae1a7b9 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;
diff --git a/LUFA/Drivers/Board/UC3/EVK1101/Buttons.h b/LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
index 18c711706..3ce1afe9b 100644
--- 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);
}
+ 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/EVK1101/Joystick.h b/LUFA/Drivers/Board/UC3/EVK1101/Joystick.h
index 0481f8335..733490995 100644
--- 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;
};
+ 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)
{
diff --git a/LUFA/Drivers/Board/UC3/EVK1101/LEDs.h b/LUFA/Drivers/Board/UC3/EVK1101/LEDs.h
index 6feadbce3..65a34813f 100644
--- 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;
}
+ 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;
diff --git a/LUFA/Drivers/Board/UC3/EVK1104/Buttons.h b/LUFA/Drivers/Board/UC3/EVK1104/Buttons.h
index 934f92265..597c8e9b5 100644
--- 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);
}
+ 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/EVK1104/LEDs.h b/LUFA/Drivers/Board/UC3/EVK1104/LEDs.h
index 5813e892c..6d25626c8 100644
--- 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;
}
+ 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);