diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-01-29 14:33:36 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-01-29 14:33:36 +0000 |
commit | 5563da6a626a7301e5064a8df8b3a9b03421f8aa (patch) | |
tree | 0d5ffd18c3d061f7b91443417ce61ff07b02af3e /LUFA/Drivers/Board/UC3/EVK1101 | |
parent | a147cee95f5373902242e7b34b92f7103fc05ae4 (diff) | |
download | lufa-5563da6a626a7301e5064a8df8b3a9b03421f8aa.tar.gz lufa-5563da6a626a7301e5064a8df8b3a9b03421f8aa.tar.bz2 lufa-5563da6a626a7301e5064a8df8b3a9b03421f8aa.zip |
Added new LEDs_Disable(), Buttons_Disable() and Joystick_Disable() functions to the board hardware drivers.
Diffstat (limited to 'LUFA/Drivers/Board/UC3/EVK1101')
-rw-r--r-- | LUFA/Drivers/Board/UC3/EVK1101/Buttons.h | 6 | ||||
-rw-r--r-- | LUFA/Drivers/Board/UC3/EVK1101/Joystick.h | 9 | ||||
-rw-r--r-- | LUFA/Drivers/Board/UC3/EVK1101/LEDs.h | 7 |
3 files changed, 22 insertions, 0 deletions
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; |